Skip to content

Instantly share code, notes, and snippets.

View brundage's full-sized avatar
🚲
Unscrambling eggs

Dean Brundage brundage

🚲
Unscrambling eggs
View GitHub Profile
@tomykaira
tomykaira / clockwork-init.sh
Created October 25, 2011 10:21
Create a new project with clockwork for heroku.
#!/bin/sh
# Licence: MIT
# Created by tomykaira, 2011-10-25
if [ $# -ne 1 ]; then
echo "Give me your new project name (only)"
exit 1
fi
@peterc
peterc / dnsd.rb
Created December 2, 2011 23:47
Simple, scrappy UDP DNS server in Ruby (with protocol annotations)
# Simple, scrappy UDP DNS server in Ruby (with protocol annotations)
# By Peter Cooper
#
# MIT license
#
# * Not advised to use in your production environment! ;-)
# * Requires Ruby 1.9
# * Supports A and CNAME records
# * See http://www.ietf.org/rfc/rfc1035.txt for protocol guidance
# * All records get the same TTL
@burke
burke / 0-readme.md
Created January 27, 2012 13:44 — forked from funny-falcon/cumulative_performance.patch
ruby-1.9.3-p327 cumulative performance patch for rbenv

ruby-1.9.3-p327 cumulative performance patch for rbenv

This installs a patched ruby 1.9.3-p327 with various performance improvements and a backported COW-friendly GC, all courtesy of funny-falcon.

Requirements

You will also need a C Compiler. If you're on Linux, you probably already have one or know how to install one. On OS X, you should install XCode, and brew install autoconf using homebrew.

@brundage
brundage / decimal_arithmetic.js
Created May 18, 2012 13:28
Problematic Decimal Arithmetic in Javascript
// decimal_arithmetic.js
// From http://www.brewsession.com/problematic-decimal-arithmetic-in-javascript/
String.prototype.digitsAfterDecimal = function()
{ var parts = this.split(".", 2); // FIXME: Not international!
if( ! parts[1] )
{ parts[1] = ""; }
return parts[1].length;
};
@dariocravero
dariocravero / README.md
Created October 20, 2012 05:25
Save files in Meteor

Create a Meteor app and put the client_/server_ files in a client/server directories. Also, create a public dir to save the uploaded files.

@omnisis
omnisis / protocol.rb
Created November 2, 2012 04:42
Ruby UDP Server/Client Pair with Custom Binary Protocol
require 'bindata'
class CustomProtocol < BinData::Record
endian :big
stringz :command_word
uint8 :op1
uint8 :op2
end
@nyboer
nyboer / pulseaudio-bluetooth.conf
Last active August 8, 2018 10:24
This allows users to add bluetooth audio sinks to pulseaudio for CHIP computers without a desktop manager.
<!-- This configuration file specifies the required security policies
for PulseAudio Bluetooth integration. -->
<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>
<!-- ../system.conf have denied everything, so we just punch some holes -->
<policy user="pulse">