Skip to content

Instantly share code, notes, and snippets.

View stephenhandley's full-sized avatar
🎾
let

Stephen Handley stephenhandley

🎾
let
View GitHub Profile
@stephenhandley
stephenhandley / insta
Last active March 29, 2022 21:11
how 2 delete yr instagrams
function select(selector) {
return document.querySelector(selector)
}
function click(selector) {
try {
const el = select(selector)
if (el) {
el.click()
}
@stephenhandley
stephenhandley / output_example.txt
Last active July 25, 2020 21:40
hacky script for generating ffmpeg command to tile videos
ffmpeg -i 0.mp4 -i 1.mp4 -i 2.mp4 -i 3.mp4 -i 4.mp4 -i 5.mp4 -i 6.mp4 -i 7.mp4 -i 8.mp4 -i 9.mp4 -i 10.mp4 -i 11.mp4 -i 12.mp4 -i 13.mp4 -i 14.mp4 -i 15.mp4 -i 16.mp4 -i 17.mp4 -i 18.mp4 -i 19.mp4 -i 20.mp4 -i 21.mp4 -i 22.mp4 -i 23.mp4 -i 24.mp4 -t 00:12:16 -filter_complex "amix=inputs=25:duration=longest; [0:v] setpts=PTS-STARTPTS, scale=768x432 [_00]; [1:v] setpts=PTS-STARTPTS, scale=768x432 [_01]; [2:v] setpts=PTS-STARTPTS, scale=768x432 [_02]; [3:v] setpts=PTS-STARTPTS, scale=768x432 [_03]; [4:v] setpts=PTS-STARTPTS, scale=768x432 [_04]; [5:v] setpts=PTS-STARTPTS, scale=768x432 [_10]; [6:v] setpts=PTS-STARTPTS, scale=768x432 [_11]; [7:v] setpts=PTS-STARTPTS, scale=768x432 [_12]; [8:v] setpts=PTS-STARTPTS, scale=768x432 [_13]; [9:v] setpts=PTS-STARTPTS, scale=768x432 [_14]; [10:v] setpts=PTS-STARTPTS, scale=768x432 [_20]; [11:v] setpts=PTS-STARTPTS, scale=768x432 [_21]; [12:v] setpts=PTS-STARTPTS, scale=768x432 [_22]; [13:v] setpts=PTS-STARTPTS, scale=768x432 [_23]; [14:v] setpts=PTS-STARTPTS, scale=768x4
@stephenhandley
stephenhandley / A-F.json
Last active May 23, 2020 07:32
Get Wikipedia RGB colors
{"Absolute Zero":[0,72,186],"Acid green":[176,191,26],"Aero":[124,185,232],"Aero blue":[192,232,213],"African violet":[178,132,190],"Air superiority blue":[114,160,193],"Alabaster":[237,234,224],"Alice blue":[240,248,255],"Alloy orange":[196,98,16],"Almond":[239,222,205],"Amaranth":[229,43,80],"Amaranth (M&P)":[159,43,104],"Amaranth pink":[241,156,187],"Amaranth purple":[171,39,79],"Amaranth red":[211,33,45],"Amazon":[59,122,87],"Amber":[255,191,0],"Amber (SAE/ECE)":[255,126,0],"Amethyst":[153,102,204],"Android green":[164,198,57],"Antique brass":[205,149,117],"Antique bronze":[102,93,30],"Antique fuchsia":[145,92,131],"Antique ruby":[132,27,45],"Antique white":[250,235,215],"Ao (English)":[0,128,0],"Apple green":[141,182,0],"Apricot":[251,206,177],"Aqua":[0,255,255],"Aquamarine":[127,255,212],"Arctic lime":[208,255,20],"Army green":[75,83,32],"Artichoke":[143,151,121],"Arylide yellow":[233,214,107],"Ash gray":[178,190,181],"Asparagus":[135,169,107],"Atomic tangerine":[255,153,102],"Auburn":[165,42,42],"Aureo
@stephenhandley
stephenhandley / NLP4H_Chapter1.ipynb
Created August 17, 2019 01:06
Natural Language Processing for Hackers (Chapter 1).ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@stephenhandley
stephenhandley / pyenv.md
Last active June 30, 2020 08:09
pyenv

Installing pyenv

$ brew install pyenv
$ echo -e '\nif command -v pyenv 1>/dev/null 2>&1; then\n  eval "$(pyenv init -)"\nfi' >> ~/.bash_profile
$ source ~/.bash_profile

Installing versions

$ pyenv install 2.7.10
@stephenhandley
stephenhandley / ExifScrub.html
Created July 24, 2019 00:16
Scrub Exif demo
<html>
<head>
<title>EXIF Scrub</title>
<script src="https://cdn.jsdelivr.net/npm/piexifjs@1.0.6/piexif.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.15/lodash.js"></script>
<script>
function onFileChosen (file) {
const reader = new FileReader();
reader.readAsDataURL(file);
reader.onloadend = function (event) {
@stephenhandley
stephenhandley / generateCsv.js
Last active October 28, 2017 03:42
derp derp derp generateCsv.js
let data = [
{
a: 1,
b: 2,
c: 3,
d: 10
},
{
a: 2,
b: 3,
function jumble (word) {
function _jumble (args) {
var letters = args.letters;
var words = args.words;
if (letters.length === 0) {
return words;
}
var letter = letters.pop();
const RADIX = 2;
let bin_str = '';
let i = 0;
while (i < 50) {
i++;
bin_str = `${bin_str}1`;
let num = parseInt(bin_str, RADIX);
let square = num * num;
@stephenhandley
stephenhandley / exportAbletonFolder.js
Created January 31, 2016 23:33
Failed attempt at getting ableton to export a project via js automation on mac
#!/usr/bin/env osascript -l JavaScript
function run(argv) {
var folder = argv[0];
console.log(folder);
var fm = $.NSFileManager.defaultManager;
var contents = fm.contentsOfDirectoryAtPathError(folder, null);