Skip to content

Instantly share code, notes, and snippets.

@jordansissel
jordansissel / conf
Last active May 19, 2022 08:17
Parsing flags from a file in Clamp in Ruby
--version 1.2.3.4
@ignis-sec
ignis-sec / lol.html
Created September 23, 2021 22:03
alert() without letters or numbers
<script>
/*
〱='',〳=〱,ᘓ=〱+{},ᘒ=〱+[][[]],〱+=[〱==〱],〳+=[!〱],ᘑ=+[],ᘐ=+!+[],ᘔ=ᘐ+ᘐ,ᘕ=ᘔ+ᘐ,ᘖ=ᘔ+ᘕ,ᘖ+=ᘖ+ᘖ+ᘔ,ᘗ=ᘖ+ᘐ,ᘘ=ᘓ[ᘔ+ᘕ],ᘙ=ᘓ[ᘐ],ᘚ=〱[ᘐ],ᘲ=〱[ᘑ],ᘳ=ᘘ+ᘙ+ᘒ[ᘐ]+〳[ᘕ]+ᘲ+ᘚ+ᘒ[ᘑ]+ᘘ+ᘲ+ᘙ+〱[ᘐ],ᘰ=[][ᘳ][ᘳ],ᘏ=''+ᘰ,ᘎ=〳[ᘐ]+〳[ᘔ]+〱[ᘕ]+ᘚ+ᘲ+ᘏ[ᘖ]+ᘏ[ᘗ],ᘰ`ᘳ${ᘎ}```
*/
〱=''
〳=〱 //''
ᘓ=〱+{} //'[object Object]' <- '' + [object Object]
ᘒ=〱+[][[]] //'undefined' <- '' + undefined
@fabiospampinato
fabiospampinato / cursed_base64.ts
Created September 21, 2021 13:23
Cursed base64 encoder.
// It's the fastest pure-JS base64 encoder (that doesn't account for padding though) that I've found.
// It's cursed because it takes ~2s to startup and 16MB of memory 😂
const encoder = new TextEncoder ();
const lookup = (() => {
const alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split ( '' );
const lookup = new Array ( 2 ** 24 );
const mask1 = 0b11111100_00000000_00000000;
const mask2 = 0b00000011_11110000_00000000;
@mrousavy
mrousavy / settings.json
Last active September 9, 2021 19:59
My VSCode settings + themes + extensions
// VSCode Settings (hit `Cmd + ,` to open settings)
{
"editor.smoothScrolling": true,
"editor.fontSize": 16,
"editor.fontFamily": "Fira Mono, Consolas, 'Courier New', monospace",
"editor.wordWrap": "on",
"editor.tabCompletion": "on",
"explorer.openEditors.visible": 0,
"explorer.autoReveal": false,
@nytr0gen
nytr0gen / twitter_unfollower.js
Created June 2, 2021 06:04
Twitter Nuclear Unfollow
// 1. Go to your Following page. Mine would be https://twitter.com/nytr0gen_/following
// 2. Run this script in the Console. Change maxUnfollows to anything you want.
// 3. Check in from time to time and run it again if it fails.
sendUnfollow = () => document.querySelector('[data-testid=UserCell] [data-testid*=unfollow] span span').click();
confirmUnfollow = () => document.querySelector('[data-testid=confirmationSheetConfirm] span span').click();
sleep = ms => new Promise(r => setTimeout(r, ms));
i = 0;
maxUnfollows = 1000;
@stevenharman
stevenharman / gemfresh
Last active December 29, 2023 16:05
gemfresh: A handy script for determining the freshness of dependencies in a Ruby code base. Leverages bundler and libyear-bundler.
#!/usr/bin/env bash
# shellcheck disable=SC2059
set -euo pipefail
RED='\033[0;31m'
GREEN='\033[0;32m'
NO_COLOR='\033[0m'
CLEAR_LINE='\r\033[K'
@fabiospampinato
fabiospampinato / charCodeAt_vs_TextEncoder.js
Created May 27, 2021 13:45
charCodeAt vs TextEncoder benchmark
const fs = require ( 'fs' );
const content = fs.readFileSync ( 'War and Peace.md', 'utf-8' );
const charCodesAt = new Array ( content.length );
console.time('charCodeAt');
for ( let i = 0, l = content.length; i < l; i++ ) {
charCodesAt[i] = content.charCodeAt ( i );
}
console.timeEnd('charCodeAt');
@fabiospampinato
fabiospampinato / build.js
Created May 23, 2021 20:21
Fast building + watching + starting + restarting. AKA how to throw TypeScript in the garbage bin for anything other than type-checking.
/* IMPORT */
const esbuild = require ( 'esbuild' );
const {nodeExternalsPlugin} = require ( 'esbuild-node-externals' );
const monex = require ( 'monex' );
const path = require ( 'path' );
const {color, parseArgv} = require ( 'specialist' );
const Watcher = require ( 'watcher' );
@crissdev
crissdev / byte.js
Created May 17, 2021 17:49
Using Symbol.toPrimitive and toJSON method for better code
class Byte {
#value
constructor(value = 0) {
this.#value = value
}
toJSON() {
return this.#value
}
@sindresorhus
sindresorhus / machine-learning-for-my-apps.md
Last active July 14, 2022 21:47
Ideas for machine learning usage in my apps

Machine learning for my apps

I'm trying to think of ways I could use machine learning to enhance my apps. Feedback wanted!

You can find my apps here.

Dato

  • Natural language processing to parse a new event title, like Fantastical.