Skip to content

Instantly share code, notes, and snippets.

View mnem's full-sized avatar

Dave Clayton-Wagner mnem

View GitHub Profile
function foo()
if bingle
if bangle
if bongle
do
some
really
really
really
long
@mnem
mnem / .gitignore
Created November 15, 2012 10:26
Simple test to illustrate a small audio latency in the PPAPI version of the Flash plugin in Chrome.
.DS_Store
@mnem
mnem / gist:3797163
Created September 27, 2012 23:53
Hmm.
Generating tests.
Running each test 10000 times.
Running: UTHash test add
########################################
Running: Boost hash test add
########################################
Running: Std::map hash test add
########################################
@mnem
mnem / file.js
Created June 12, 2012 20:07
Hacked file.js to work around node_redis breaking binary data.
// Read a file from disk, store it in Redis, then read it back from Redis.
var redis = require("redis"),
client = redis.createClient(),
fs = require("fs"),
filename = "kids_in_cart.jpg";
// Get the file I use for testing like this:
// curl http://ranney.com/kids_in_cart.jpg -o kids_in_cart.jpg
// or just use your own file.
@mnem
mnem / tools_osx_edition.md
Last active October 5, 2015 17:17
Tools and setup for doing stuff, for my future reference when I accidentally destroy my computer. Again.

OS X Edition

Stuff I install to make creating magic rubbish easier.

General tools

  • OSX Terminal: Good enough when combined with tmux.
  • tmux: Terminals done proper; tmuxinator: handy tmux session templates.
  • Homebrew: The only package manager that matters.
  • git: Source control that works.
  • The Silver Searcher: A faster, better ack.
@mnem
mnem / README.md
Created April 9, 2012 22:03
Simple entity framework in lua for Love2D (or LÖVE if you want to be fancy). Still very much a work in progress.
@mnem
mnem / gist:2136505
Created March 20, 2012 14:55
Installing pysvn on an Amazon Linux AMI.
@mnem
mnem / .nah_xcode_uncrustify.cfg
Created January 20, 2012 09:38
My uncrustify script which has an eye towards making Objective-C code sane. See also https://gist.github.com/1641451
# Uncrustify 0.59
###########################################################################
# nah_xcode_uncrustify.rb default
# configuration
#
# config_version: 1.1.0
#
# Default uncrustify config to use for
# the nah_xcode_uncrustify.rb script
@mnem
mnem / nah_xcode_uncrustify.rb
Last active February 1, 2020 20:12
Script file to be run as an Xcode 4 behaviour which uncrustifies the project source using reasonable Objective-C formatting defaults. Alternatively, you can run it and pass a path to uncrustify.
#!/usr/bin/env ruby
###########################################################################
# Script to be called as an Xcode 4 behaviour which will attempt to
# uncrustify all source files in the open project.
#
# (c) Copyright 2012 David Wagner.
#
# Complain/commend: http://noiseandheat.com/
#
#*************************************************************************#
@mnem
mnem / nah_vpn_add_user.sh
Created January 17, 2012 13:32
Simple script to add VPN users to your chap-secrets file. For details on setting up a VPN on EC2, see http://noiseandheat.com/blog/2012/01/vpn-with-amazon-ec2-or-saving-your-iphone-from-promiscuity/
#!/bin/bash
#######################################
# Simple script to add VPN users to your chap-secrets file. For details
# on setting up a VPN on EC2, see:
#
# http://noiseandheat.com/blog/2012/01/vpn-with-amazon-ec2-or-saving-your-phone-from-promiscuity/
#
#
# (c) Copyright 2011 David Wagner.
#