Skip to content

Instantly share code, notes, and snippets.

Travis Tilley ttilley

Block or report user

Report or block ttilley

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@ttilley
ttilley / kr-errata-2nd-edition.txt
Created Aug 20, 2011
Errata for The C Programming Language, Second Edition
View kr-errata-2nd-edition.txt
Errata for The C Programming Language, Second Edition
This lists all known errors in The C Programming Language, Second Edition, by Brian Kernighan and Dennis Ritchie (Prentice-Hall, 1988).
The pagination of the book has changed only in minor ways across printings of the English-language edition. These errata now include section numbers, which are more likely to be preserved across translations. This might help identify errors that survive into translated editions.
Changes between first and second printing:
The first printing of the book was made before the Standard was finalized; these copies say "Based on Draft-Proposed ANSI C" on the front cover. All subsequent printings are identified by a large red ``ANSI C'' on the right center of the cover. Fortunately, the changes are minor; some repair our bugs, a few account for last-minute changes in the draft standard. These changes were made so early that they probably do not apply to you.
@ttilley
ttilley / arris_password_of_the_day_brute_force.rb
Created Sep 7, 2012
attempt to brute force an arris "password of the day" algorithm seed
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],
@ttilley
ttilley / build-llvm-projects-mac.sh
Last active Oct 13, 2015
build llvm svn and friends on mac
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
@ttilley
ttilley / Vagrantfile
Created Jul 9, 2012
stackato vagrant bootstrap
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
@ttilley
ttilley / bdw-gc.rb
Created Jun 25, 2012
updated homebrew formula for Boehm-Demers-Weiser GC supporting building from head and passing in various options to the build
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,
@ttilley
ttilley / hello_world.txt
Created May 20, 2012
Peanut Butter Jelly Time brainfuck variant
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 = ->
View build-llvm.sh
#!/usr/bin/env bash
LLVM_SVN='http://llvm.org/svn/llvm-project/llvm/trunk'
CLANG_SVN='http://llvm.org/svn/llvm-project/cfe/trunk'
POLLY_SVN='http://llvm.org/svn/llvm-project/polly/trunk'
COMPILER_RT_SVN='http://llvm.org/svn/llvm-project/compiler-rt/trunk'
LIBCXX_SVN='http://llvm.org/svn/llvm-project/libcxx/trunk'
export BASE=`pwd`
export LLVM_SRC="${BASE}/llvm"
You can’t perform that action at this time.