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__
<!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
var asynth = require('../');
var jynth = require('jynth');
var synth = jynth();
var recording = true;
var playing = true;
var samples = [];
process.stdin.setRawMode(true);
for i in *; do
if [ -d "$i" ]; then
cd $i;
if [ -f "package.json" ]; then
zelda ../;
fi;
cd ..;
fi;
done
@NHQ
NHQ / gist:4325215
Created December 18, 2012 05:06 — forked from anonymous/gist:4325197
// all values are of type [x, y]
// and are coordinates, x being time, y being amplitude
// ie. env = require('./')([1/16, 1], [1/32, .9], [3/32, .9], [1/2, 0])
// returns an amplitude to multiply yr sample by
module.exports = function(a, d, s, r){
function e(t, a, d, s, r){
@NHQ
NHQ / make_touch_this.js
Created September 22, 2012 22:13
mc hammer javascript cross-compiler
#!/usr/bin/env node
// mc hammer javascript cross-compiler
// 1. youtube-dl http://www.youtube.com/watch?v=otCpCn0l4Wo -o cant_touch_this.flv
// 2. avconf -o cant_touch_this.flv cant_touch_this.wav
// 3. sox cant_touch_this.wav -t s16 -r 8k -o cant_touch_this.raw
// 4. run this file (node make_touch_this.js)
// 5. npm install -g baudio-party
// 6. baudio-party &
// 7. curl -sSNT cant_touch_this.js http://localhost:5000/0
@NHQ
NHQ / test.js
Created August 18, 2012 07:58 — forked from getify/test.js
object JSON serialization that's circular-ref safe
// all this `toJSON()` does is filter out any circular refs. all other values/refs,
// it passes through untouched, so it should be totally safe. see the test examples.
Object.prototype.toJSON = function() {
function findCircularRef(obj) {
for (var i=0; i<refs.length; i++) {
if (refs[i] === obj) return true;
}
return false;
}