Skip to content

Instantly share code, notes, and snippets.

@missinglink
missinglink / codes.json
Last active June 12, 2025 00:43
ISO 3166 Country Code to ISO 639 'Official Language Codes' for each country
{
"AD": "ca",
"AE": "ar-AE,fa,en,hi,ur",
"AF": "fa-AF,ps,uz-AF,tk",
"AG": "en-AG",
"AI": "en-AI",
"AL": "sq,el",
"AM": "hy",
"AN": "nl-AN,en,es",
"AO": "pt-AO",
@0xdevalias
0xdevalias / _deobfuscating-unminifying-obfuscated-web-app-code.md
Last active July 22, 2025 23:42
Some notes and tools for reverse engineering / deobfuscating / unminifying obfuscated web app code
@cdaringe
cdaringe / pnpm-patch-package.js
Created April 13, 2022 18:28
pnpm-patch-package.js
/**
* @description
* Support patch-package in pnpm projects.
*
* `pnpm` can be tricky to use with patch-package. To minimize friction creating patches,
* this script helps automate patching by using npm and a temp workspace to generate
* patch files.
*
* @usage
* 0. ensure the dependencies of interest are top level dependencies/devDependencies (no patching transitive deps)
Note : These are the settings i wrote by observing the Mediainfo of RARBG Encodes , these might not be 100% identical to RARBG Encodes.
These are FFMPEG Settings.
See comment below to see the code
@bishil06
bishil06 / createMD5.js
Created February 5, 2021 13:22
Node.JS create md5 hash from file
const crypto = require('crypto');
function createMD5(filePath) {
return new Promise((res, rej) => {
const hash = crypto.createHash('md5');
const rStream = fs.createReadStream(filePath);
rStream.on('data', (data) => {
hash.update(data);
});
@milahu
milahu / index.html
Last active October 5, 2020 15:58
performance of different loop types #jsbench #jsperf (http://jsbench.github.io/#6f65c587af9277325bcda0e69ba44d5f) #jsbench #jsperf
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>performance of different loop types #jsbench #jsperf</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script>
<script src="./suite.js"></script>
</head>
<body>
<h1>Open the console to view the results</h1>
@jaames
jaames / fancy-css-links.md
Last active June 26, 2025 11:49
Fancy CSS link underlines with inline SVGs (plus embedded animations!)
@mjpieters
mjpieters / # Sourcemap processing in Python.md
Last active December 15, 2023 11:32
Python sourcemap parsing

Sourcemap processing in Python

This gist contains two Python modules:

  • sourcemap: a module to parse and generate JavaScript source maps
  • base64vlq: code to decode and encode base64 VLQ sequences, an encoding used in source maps.

License

The code is licensed under the terms of the MIT license, included in the gist.

@timw4mail
timw4mail / json-parser.js
Last active January 19, 2021 12:49
Pure JS JSON Parser
/**
* Pure JS JSON Parser
*
* @see https://lihautan.com/json-parser-with-javascript/
* @param {string} str
*/
function parseJSON(str) {
let i = 0;
const value = parseValue();
@jaroslav-kubicek
jaroslav-kubicek / codeshift-remove-alias.js
Last active November 30, 2022 17:51
Codeshift script to remove import alias
const path = require("path");
function replacePathAlias(currentFilePath, importPath, pathMap) {
// if windows env, convert backslashes to "/" first
console.log(currentFilePath)
currentFilePath = path.posix.join(...currentFilePath.split(path.sep));
const regex = createRegex(pathMap);
return importPath.replace(regex, replacer);