Skip to content

Instantly share code, notes, and snippets.

View NHQ's full-sized avatar

johnnyscript NHQ

View GitHub Profile
@NHQ
NHQ / mutt.txt
Created August 10, 2022 14:00 — forked from jrziviani/mutt.txt
mutt cheat sheet
Mutt
http://www.mutt.org/doc/manual/manual.html
Select (tag) messages: shift+t (T)
= (string)
~ (expression)
~b expr (message with expr in body)
[b]body
# Example for my blog post at:
# http://danijar.com/introduction-to-recurrent-networks-in-tensorflow/
import functools
import sets
import tensorflow as tf
def lazy_property(function):
attribute = '_' + function.__name__
@NHQ
NHQ / drums.js
Created March 24, 2016 01:53
polysynth
var st = $ui({
bpm: 86
})
var bpm = st.bpm
timer = $.zerone(bpm, sampleRate)
//generator = new $.chrono()
//console.log(timer, st)
//t0.emit('stop')
t0 = timer.beat(3/4, [,1,1,1,1,1,1,[,,,1],], function(ti, b, off, swing){
@NHQ
NHQ / poly.js
Created February 12, 2016 18:14
polysynth
var st = $ui({
tempo: 72 / 60,
tmod: 10,
pi: 2,
c: 1,
fq: 18,
swing: 1/18,
speed: 1,
beat: 16,
amod: 9,
@NHQ
NHQ / poly.js
Created February 11, 2016 18:45
var st = $ui({
tempo: 72 / 60,
tmod: 10,
pi: Math.PI / 2,
c: 1,
fq: 289 / 10
})
var v = [[0, .67], [0,.25], [1,0]]
var env = $.env([v], [1])
@NHQ
NHQ / index.js
Created January 24, 2016 02:58
requirebin sketch
edits = [function(){require('cheatcode')
specialX = function(t){
t *= 72 / 60 / 2
return oz.sine(t, 120 + oz.triangle(t, amod(0, .1, t, 1/3) * oz.triangle(t, 2)))
+ oz.sine(t, 360 * 2 + (amod(0, .1, t, 1/4) * oz.triangle(t, 3)))
}},function(){require('cheatcode')
specialX = function(t){
t *= 72 / 60 / 2
return oz.sine(t, 120 + oz.triangle(t, amod(0, .1, t, 1/2) * oz.triangle(t, 2)))
+ oz.sine(t, 360 * 2 + (amod(0, .1, t, 1/3) * oz.triangle(t, 3)))
@NHQ
NHQ / index.js
Created January 22, 2016 22:28
requirebin sketch
setTimeout(function(){context = (AudioContext) ? AudioContext : webkitAudioContext
master = new context
SAMPLERATE = samplerate = master.sampleRate
jsynth = require('jsynth')
nvelope = require('nvelope')
sync = require('jsynth-sync')
oz = require('oscillators')
jdelay = require('jdelay')
amod = require('amod')
chronotrigger = require('jigger')
<!DOCTYPE html>
<html>
<head>
<title>Toggle Switch</title>
<style>
.switch {
position: relative;
}
.switch label {
width: 55px;
<!DOCTYPE html>
<html>
<head>
<title>CSS3 Checkbox</title>
<style type="text/css">
.checkbox {
width: 30px;
height: 30px;
background-color: #ddd;
position: relative;
@NHQ
NHQ / readme.md
Created December 20, 2015 22:58 — forked from max-mapper/readme.md
Video stabilization using VidStab and FFMPEG (Mac OS X)

Video stabilization using VidStab and FFMPEG

Examples here use the default settings, see the VidStab readme on GitHub for more advanced instructions.

Install ffmpeg with the vidstab plugin from homebrew

brew install ffmpeg --with-libvidstab