Find Gists & Code Snippets

You don't have to remmeber a code snippet anymore, search and find a code snippets for your coding question.

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall.sh)"
ptr = (castType*)calloc(n, size);
Allocate Memory C
content_copy

<script
  src="https://code.jquery.com/jquery-3.5.1.min.js"
  integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0="
  crossorigin="anonymous"></script>
Jquery Cdn
content_copy
expo install react-native-gesture-handler
#Hacks:
# Type these in your console which you can open by 
# pressing STRG + SHIFT + J (Chrome) or STRG + SHIFT + K (Firefox)

	# changes the amount of cookies
	Game.cookies = amount in int
    
    # unlimted cookies
    Game.cookies = Infinity
    
    # If you want to get out of Infinity cookies
    Game.cookiesd = 0
    
    # set up the CookiesPerSecond Rate by the number you want
    Game.cookiesPS= amount in int
    
    # clicks on cookie forever without moving your mouse in the highest speed
	var autoclicker = setInterval(function() { Game.ClickCookie(); }, 10);
    
    # stoping autoclicker
    clearInterval(autoClicker)

	# clicks on golden cookie without moving your mouse
    setInterval(Game.goldenCookie.click, 500)
    
    # Get the achievement you want by changing it to the achievement name you want
    # Game.Win(‚ACHIEVEMENT‘)
Cookie Clicker
content_copy
1) RESTful
2) API
An API is an interface through which one program or web site talks to another.
They are used to share data and services, and they come in many different
formats and types.

A RESTful API is one of the many possible ways that programs, servers, 
and web sites can share data and services. REST (Representational State Transfer
) describes the general rules for how the data and services are represented 
through the API so that other programs will be able to correctly request and 
receive the data and services that an API makes available
Rest Api Meaning
content_copy
const div =  document.querySelector('div') // Get element from DOM
div.classList.remove('info') // Remove class "info"
import com.google.api.client.json.Json
import okhttp3.*

private val client = OkHttpClient()

fun String.get(token: String): Response = request(token).get().execute()

fun String.post(data: String, token: String): Response {
    val json = MediaType.get(Json.MEDIA_TYPE)
    val body = RequestBody.create(json, "{\"data\":\"$data\"}")
    val request = request(token).post(body).build()
    return request.execute()
}

fun String.request(token: String): Request.Builder = Request.Builder()
    .addHeader("Authorization", "Bearer $token")
    .url(this)

private fun Request.Builder.execute(): Response = build().execute()
private fun Request.execute(): Response = client.newCall(this).execute()
Kotlin Http Request
content_copy
class Exemple
{
  private:
  	/* data */
  public:
  	Exemple(); //Constructor
  	~Exemple(); //Destructor
};
Class Cpp
content_copy