Skip to content

Instantly share code, notes, and snippets.

View johnwheeler's full-sized avatar
🏠
Working from home

John Wheeler johnwheeler

🏠
Working from home
  • San Diego, California
View GitHub Profile
@staltz
staltz / introrx.md
Last active June 18, 2025 06:22
The introduction to Reactive Programming you've been missing
@swinton
swinton / AESCipher.py
Last active November 8, 2024 18:31
Encrypt & Decrypt using PyCrypto AES 256 From http://stackoverflow.com/a/12525165/119849
#!/usr/bin/env python
import base64
from Crypto import Random
from Crypto.Cipher import AES
BS = 16
pad = lambda s: s + (BS - len(s) % BS) * chr(BS - len(s) % BS)
unpad = lambda s : s[0:-ord(s[-1])]
@gaspard
gaspard / gist:6415937
Last active July 13, 2020 19:33
VST plugin: sample accurate midi out.
// This is part of a midi generating plugin made with Juce library.
//
// The goal of this thing is simply to generate random midi notes that are on-time
// with sample accuracy.
void MidiRandomAudioProcessor::processBlock (AudioSampleBuffer& buffer, MidiBuffer& midiMessages)
{
// Clear all
for (int i = 0; i < getNumOutputChannels(); ++i)
{
@pudquick
pudquick / pipista.py
Created November 20, 2012 07:23
pipista - pip module (for installing other modules) for Pythonista
import os, os.path, sys, urllib2, requests
class PyPiError(Exception):
def __init__(self, value):
self.value = value
def __str__(self):
return repr(self.value)
def _chunk_report(bytes_so_far, chunk_size, total_size):
if (total_size != None):
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active June 20, 2025 16:03
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
class Numeric
def to_rad
self * Math::PI / 180
end
end
# http://www.movable-type.co.uk/scripts/latlong.html
# loc1 and loc2 are arrays of [latitude, longitude]
def distance loc1, loc2
lat1, lon1 = loc1
@cowboy
cowboy / HEY-YOU.md
Last active February 27, 2025 12:24
jQuery Tiny Pub/Sub: A really, really, REALLY tiny pub/sub implementation for jQuery.