Skip to content

Instantly share code, notes, and snippets.

View sanex3339's full-sized avatar
💭
Something happening!

Timofey Kachalov sanex3339

💭
Something happening!
View GitHub Profile
@sanex3339
sanex3339 / mb-jars.mjs
Created February 5, 2025 09:51 — forked from iethree/mb-jars.mjs
Metabase jar helper
const version = process.argv[3];
const edition = process.argv[4] === 'oss' ? 'oss' : 'ee';
const [major, minor] = version.split('.');
const jarName = `metabase-${edition}-${version}.jar`;
const fileExists = fs.existsSync(jarName);
if (!fileExists) {
@sanex3339
sanex3339 / jscrush-compress-pseudo.js
Created April 23, 2016 10:42 — forked from nikhilm/jscrush-compress-pseudo.js
JSCrush 'reverse engineering'
segmentLengthBound = ... // B, originally set to s.length/2
counter = {} // o
bestSavings = 0 // M
maxRepetitions = 0 // N
bestSegment = 0 // e
longestSegmentLength = 0 // Z
segmentLength = 0 // t
while (segmentLength <= segmentLengthBound) {
start = 1;