View tupleToArray.swift
func tupleToArray<T, U>(var tuple: T, _ resultType: U.Type) -> [U] {
let count = sizeof(T) / sizeof(U)
return withUnsafePointer(&tuple) { ptr -> [U] in
let eltPtr = UnsafePointer<U>(ptr)
return Array(0..<count).map({ eltPtr[$0] })
}
}
View keybase.md

Keybase proof

I hereby claim:

  • I am ttilley on github.
  • I am ttilley (https://keybase.io/ttilley) on keybase.
  • I have a public key whose fingerprint is 8D25 C7B4 214E EC23 EA0F 84EF D2DF 823B EB38 15AC

To claim this, I am signing this object:

View build-llvm-projects-mac.sh
#!/usr/bin/env bash
set -e
xcsel='xcode-select --print-path'
xcodepath="$($xcsel)"
platform='MacOSX'
export TRIPLE='x86_64-apple-darwin11'
export MACOSX_DEPLOYMENT_TARGET='10.7'
View ree_tunable_compat.diff
diff --git c/gc.c w/gc.c
index 861379b..2f4d596 100644
--- c/gc.c
+++ w/gc.c
@@ -86,11 +86,13 @@ void *alloca ();
#endif
#define HEAP_MIN_SLOTS 10000
#define FREE_MIN 4096
+#define HEAP_SLOTS_GROWTH_FACTOR 1.8
View emlogger.rb
require 'eventmachine'
require 'digest/md5'
require 'fiber'
require 'thread'
unless defined?(ActiveSupport)
class String; def blank?; self !~ /[^[:space:]]/; end; end
class NilClass; def blank?; true; end; end
class Object; def blank?; false; end; end
View arris_password_of_the_day_brute_force.rb
require 'date'
require 'time'
require 'uri'
require 'net/http'
require 'typhoeus'
class PasswordOfTheDay
TABLE1 = [
[15, 15, 24, 20, 24],
View Vagrantfile
#!/usr/bin/env ruby
# -*- coding: utf-8 -*-
Vagrant::Config.run do |config|
config.package.name = 'vagrant-stackato.box'
config.vm.guest = :ubuntu
config.ssh.forward_agent = true
# config.vm.forward_port 80, 8080, :name => "nginx", :protocol => :tcp, :auto => true
# config.vm.forward_port 443, 8443, :name => "nginx ssl", :protocol => :tcp, :auto => true
View bdw-gc.rb
require 'formula'
class Formula
def configure_path_args(choices={})
vars = {
:prefix => self.prefix,
:'exec-prefix' => self.prefix,
:bindir => self.bin,
:sbindir => self.sbin,
:libexecdir => self.libexec,
View hello_world.txt
#!/usr/bin/env PeanutButterJellyTime
# -----------------------------------------------------------------------------
# keyword => C equiv (description)
# -----------------------------------------------------------------------------
# peanut => ++*ptr (increase value of cell)
# PEANUT => ++ptr (move to next cell)
# butter => --*ptr (decrease value of cell)
# BUTTER => --ptr (move to previous cell)
# jelly => putchar(*ptr) (print character value of cell)
# JELLY => *ptr=getchar() (store numeric value of char input in cell)
View JPlayerDuckPunch.coffee
top = this
top.logJPlayerCreate ?= true
top.logJPlayerPublishCreate ?= true
top.logAllJPlayerEvents ?= false
do ($ = jQuery) ->
if !$.subscribe
o = $({})
$.subscribe = ->