Skip to content

Instantly share code, notes, and snippets.

milahu / index.html
Last active Oct 5, 2020
performance of different loop types #jsbench #jsperf ( #jsbench #jsperf
View index.html
<!DOCTYPE html>
<meta charset="utf-8"/>
<title>performance of different loop types #jsbench #jsperf</title>
<script src=""></script>
<script src="./suite.js"></script>
<h1>Open the console to view the results</h1>
jaames /
Last active Dec 29, 2021
Fancy CSS link underlines with inline SVGs (plus embedded animations!)
timw4mail / json-parser.js
Last active Jan 19, 2021
Pure JS JSON Parser
View json-parser.js
* Pure JS JSON Parser
* @see
* @param {string} str
function parseJSON(str) {
let i = 0;
const value = parseValue();
edro15 /
Created Nov 19, 2019
[How To] Compile a Java NetBeans project with Apache Ant


You need to modify code of a Java NetBeans project but you neither have or want to install that IDE in order to re-compile it.


Use Apache Ant to compile your Java code.


  • Create a folder (e.g. lib) in your project, at the same level of nbproject, and save all dependencies (jars) there.
boukeversteegh / sortArrays.js
Last active Jul 2, 2021
Sorting multiple arrays in Javascript
View sortArrays.js
* Sorts all arrays together with the first. Pass either a list of arrays, or a map. Any key is accepted.
* Array|Object arrays [sortableArray, ...otherArrays]; {sortableArray: [], secondaryArray: [], ...}
* Function comparator(?,?) -> int optional compareFunction, compatible with Array.sort(compareFunction)
function sortArrays(arrays, comparator = (a, b) => (a < b) ? -1 : (a > b) ? 1 : 0) {
let arrayKeys = Object.keys(arrays);
let sortableArray = Object.values(arrays)[0];
let indexes = Object.keys(sortableArray);
let sortedIndexes = indexes.sort((a, b) => comparator(sortableArray[a], sortableArray[b]));
JerryLokjianming / Crack Sublime Text Windows and
Last active Jan 17, 2022
Crack Sublime Text 3.2.2 Build 3211 and Sublime Text 4 Alpha 4098 with Hex
View Crack Sublime Text Windows and

YouTube Channel

How to Crack Sublime Text 3.2.2 Build 3211 with Hex Editor (Windows | Without License) ↓

  1. Download & Install Sublime Text 3.2.2 Build 3211
  2. Visit
cheesits456 / uneval.js
Last active Jan 12, 2020 — forked from cho45/uneval.js
Stringify multiple JS Object Types
View uneval.js
function uneval(o) {
switch (typeof o) {
case "undefined": return "(void 0)";
case "boolean": return String(o);
case "number": return String(o);
case "string": return `"${o.replace(/\W/gi, function(_) { return `\\u${(0x10000 + _.charCodeAt(0)).toString(16).slice(1)}` })}"`;
case "function": return `(${o.toString()})`;
case "object":
if (o == null) return "null";
let ret, type =\[object (.+)\]/);
Rich-Harris /
Last active Jan 9, 2022
The truth about Svelte

I've been deceiving you all. I had you believe that Svelte was a UI framework — unlike React and Vue etc, because it shifts work out of the client and into the compiler, but a framework nonetheless.

But that's not exactly accurate. In my defense, I didn't realise it myself until very recently. But with Svelte 3 around the corner, it's time to come clean about what Svelte really is.

Svelte is a language.

Specifically, Svelte is an attempt to answer a question that many people have asked, and a few have answered: what would it look like if we had a language for describing reactive user interfaces?

A few projects that have answered this question:

WesThorburn /
Last active Dec 26, 2021
Linux: Compile C++ to WebAssembly and JavaScript using Emscripten and CMake

Linux: Compile C++ to WebAssembly and JavaScript using Emscripten and CMake

Download and Install Emscripten

  • My preferred installation location is /home/user
  • Get the latest sdk: git clone
  • Enter the cloned directory: cd emsdk
  • Checkout main: git checkout main
  • Install the lastest sdk tools: ./emsdk install latest
  • Activate the latest sdk tools: ./emsdk activate latest
  • Activate path variables: source ./
gbaman /
Created Nov 1, 2017
An example on using the Github GraphQL API with Python 3
# An example to get the remaining rate limit using the Github GraphQL API.
import requests
headers = {"Authorization": "Bearer YOUR API KEY"}
def run_query(query): # A simple function to use to make the API call. Note the json= section.
request ='', json={'query': query}, headers=headers)
if request.status_code == 200: