Skip to content

Instantly share code, notes, and snippets.

@gaearon
gaearon / modern_js.md
Last active November 2, 2025 19:01
Modern JavaScript in React Documentation

If you haven’t worked with JavaScript in the last few years, these three points should give you enough knowledge to feel comfortable reading the React documentation:

  • We define variables with let and const statements. For the purposes of the React documentation, you can consider them equivalent to var.
  • We use the class keyword to define JavaScript classes. There are two things worth remembering about them. Firstly, unlike with objects, you don't need to put commas between class method definitions. Secondly, unlike many other languages with classes, in JavaScript the value of this in a method [depends on how it is called](https://developer.mozilla.org/en-US/docs/Web/Jav
@surma
surma / README.md
Last active January 4, 2025 01:26
webpack-emscripten-wasm

Minimal example making webpack and wasm/Emscripten work together.

Build instructions:

  • Clone this gist
  • npm install
  • npm start
  • Open http://localhost:8080
  • Look at console
@ztl8702
ztl8702 / cdo_text.json
Last active July 4, 2025 14:03
閩東語維基百科羅馬字詞頻統計
This file has been truncated, but you can view the full file.
[
{
"han_proportion": 0.0,
"text": "\nTàu Hiĕk\n\n__NOEDITSECTION__\n\n",
"title": "Tàu Hiĕk"
},
{
"han_proportion": 0.0,
"text": "\nBàng-uâ\n\nBàng-uâ kō̤-nèng sê:\n\n\n",
"title": "Bàng-uâ"
@tgirke
tgirke / crouton.md
Last active October 14, 2025 19:06
Crouton
@yellowbyte
yellowbyte / compiling_asm.md
Last active November 3, 2025 02:54
how to assemble assembly with NASM assembler to 32-bit or 64-bit ELF binary with or without libc

32-bit ELF binary

how to assemble and link:

nasm -f elf32 -o <filename>.o <filename>.asm
ld -m elf_i386 -o <filename> <filename>.o

template code (hello world):

section .text
global _start
@photonstorm
photonstorm / phaser3-example.html
Last active February 21, 2024 05:27
Phaser 3 Example
<!DOCTYPE html>
<html>
<head>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/phaser-arcade-physics.min.js"></script>
</head>
<body>
<script>
var config = {
type: Phaser.AUTO,
@chrisdone
chrisdone / gist:02e165a0004be33734ac2334f215380e
Last active November 7, 2025 22:45
Build and run minimal Linux / Busybox systems in Qemu

Common

export OPT=/opt
export BUILDS=/some/where/mini_linux
mkdir -p $BUILDS

Linux kernel

@jordanpotti
jordanpotti / xml-attacks.md
Created December 7, 2017 13:11 — forked from mgeeky/xml-attacks.md
XML Vulnerabilities and Attacks cheatsheet

XML Vulnerabilities

XML processing modules may be not secure against maliciously constructed data. An attacker could abuse XML features to carry out denial of service attacks, access logical files, generate network connections to other machines, or circumvent firewalls.

The penetration tester running XML tests against application will have to determine which XML parser is in use, and then to what kinds of below listed attacks that parser will be vulnerable.


// File log.js
(function (global, factory) {
if (typeof define === "function" && define.amd) {
define(["exports"], factory);
} else if (typeof exports !== "undefined") {
factory(exports);
} else {
var mod = {
exports: {}
};
@luciopaiva
luciopaiva / _Full-socketio-client-and-server-example.md
Last active September 19, 2025 17:23
Full socket.io client and server example

Full socket.io client and server example

Last updated: 2021-02-21, tested with socket.io v3.1.1

This is the simplest implementation you will find for a client/server WebSockets architecture using socket.io.

To see a full explanation, read my answer on SO here: https://stackoverflow.com/a/24232050/778272.

If you're looking for examples using frameworks, check these links: