Skip to content

Instantly share code, notes, and snippets.

Nathan Witmer zerowidth

Block or report user

Report or block zerowidth

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
zerowidth /
Created Mar 10, 2014
Resources for learning git and GitHub

Learning git and GitHub

Tutorial videos

We have an excellent training team at GitHub, and they've produced a series of videos talking about the basics of how to use git and GitHub.

The youtube channel is here.

GitHub guides

zerowidth / animation.rb
Last active Aug 29, 2015
Rendering animations as combinations of frame generators
View animation.rb
# A demonstration/exploration of generating animation "frames" by combining
# objects that emit sequences of frames, with the following goals:
# * Declarative syntax for convenience and readability
# * Composability, for easily assembling larger animations from smaller pieces
# * Interruptability (see Flagged), so an animation sequence can be interrupted
# * Lazily-evaluated combinations so clock-based animations can be mixed.
# A top-level animation.
class Animation
zerowidth / blink.c
Created Feb 16, 2015
minimal blink in avr
View blink.c
View hundreds.rb
# From
# Write a program that outputs all possibilities to put + or - or nothing
# between the numbers 1, 2, ..., 9 (in this order) such that the result is
# always 100. For example: 1 + 2 + 34 – 5 + 67 – 8 + 9 = 100.
# Hacky version:
["", "+", "-"].repeated_permutation(8).each do |operations|
string = (2..9).zip(operations).reduce("1") do |str, (operand, operator)|
View rubygems_debug.diff
--- /opt/local/lib/ruby/site_ruby/1.8/rubygems.rb 2008-12-07 13:54:11.000000000 -0700
+++ /opt/local/lib/ruby/site_ruby/1.8/rubygems.rb 2008-12-07 13:54:11.000000000 -0700
@@ -128,6 +128,10 @@
# Gem::Requirement and Gem::Version documentation.
def self.activate(gem, *version_requirements)
+ STDERR.puts "activating #{gem} #{version_requirements.inspect}"
+ caller[2..-1].each {|c| STDERR.puts " #{c}"}
+ end
View .profile
function d() {
if [ -n "$1" ]; then
if [ -d "$1" ]; then
pushd $1 >/dev/null
mvim -c :NT
popd >/dev/null
echo "$1 is not a directory"
View gist:43974
require "ostruct"
describe "wtf" do
it "fails" do
o = :foo => "lol", :bar => "what"
o.gem "foo"
View gist:80128
~ ➔ sudo easy_install simplejson
Searching for simplejson
Best match: simplejson 2.0.9
Processing simplejson-2.0.9.tar.gz
Running simplejson-2.0.9/ -q bdist_egg --dist-dir /tmp/easy_install-Irpzrr/simplejson-2.0.9/egg-dist-tmp-T_rpGb
No eggs found in /tmp/easy_install-Irpzrr/simplejson-2.0.9/egg-dist-tmp-T_rpGb (setup script problem?)
View mvim
# This shell script passes all its arguments to the binary inside the
# application bundle. If you make links to this script as view,
# gvim, etc., then it will peek at the name used to call it and set options
# appropriately.
# Based on a script by Wout Mertens and suggestions from Laurent Bihanic. This
# version is the fault of Benji Fisher, 16 May 2005 (with modifications by Nico
# Weber and Bjorn Winckler, Aug 13 2007).
View .gvimrc
" size the window so it fills the macbook screen
set columns=181
set lines=53
set gfn=Andale_Mono:h12
" colorscheme twilight2
colorscheme vibrantink
set transparency=5
You can’t perform that action at this time.