Skip to content

Instantly share code, notes, and snippets.

Avatar

Steven G. Harms sgharms

View GitHub Profile
View migration-down.rb
class AClassicPattern < ActiveRecord::Migration
def self.up
begin
try
rescue
raise ObiWan, "You're my only hope."
end
end
View linguistics
From a075b71833cec1b673b3ab3dd566cc83b902091a Mon Sep 17 00:00:00 2001
From: Steven G. Harms <sgharms@stevengharms.com>
Date: Mon, 29 Jun 2009 02:11:59 -0500
Subject: [PATCH 01/11] s/independant/independent/g
---
README | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
mode change 100755 => 100644 README
View gist:281500
$ sudo gem search debug
*** LOCAL GEMS ***
ruby-debug (0.10.3)
ruby-debug-base (0.10.3)
ruby-debug-ide (0.4.9)
$ script/server -u
=> Booting Mongrel
View gist:427394
Buildfile: /Users/stharms/java_card/build.xml
clean:
[delete] Deleting directory /Users/stharms/java_card/classes
[delete] Deleting directory /Users/stharms/java_card/tests
init:
[mkdir] Created dir: /Users/stharms/java_card/classes
[mkdir] Created dir: /Users/stharms/java_card/tests
View gist:428934
stharms@stharms-mac:~/java_card$ git status
# On branch anttune
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# thedoug.txt
nothing added to commit but untracked files present (use "git add" to track)
stharms@stharms-mac:~/java_card$ ant
Buildfile: /Users/stharms/java_card/build.xml
View brew install irssi fails
==> Downloading http://irssi.org/files/irssi-0.8.15.tar.bz2
File already downloaded and cached to /Users/stharms/Library/Caches/Homebrew
==> Downloading patches
==> Patching
patching file configure
Hunk #1 succeeded at 14050 (offset -13369 lines).
Hunk #2 succeeded at 14068 with fuzz 2 (offset -13369 lines).
==> ./configure --prefix=/usr/local/brew/Cellar/irssi/0.8.15 --with-perl=yes --w
==> make install
./file2header.sh ./irssi.conf default_config > default-config.h
View gist:499087
$ brew unlink gettext && brew doctor
0 links removed for /usr/local/brew/Cellar/gettext/0.17
Your OS X is ripe for brewing. Any troubles you may be experiencing are
likely purely psychosomatic.
OK...
==> Downloading http://irssi.org/files/irssi-0.8.15.tar.bz2
View with Env.j1 added....
==> Downloading http://irssi.org/files/irssi-0.8.15.tar.bz2
File already downloaded and cached to /Users/stharms/Library/Caches/Homebrew
==> Downloading patches
==> Patching
patching file configure
Hunk #1 succeeded at 14050 (offset -13369 lines).
Hunk #2 succeeded at 14068 with fuzz 2 (offset -13369 lines).
==> ./configure --prefix=/usr/local/brew/Cellar/irssi/0.8.15 --with-perl=yes --with
==> make install
./file2header.sh ./irssi.conf default_config > default-config.h
View WTF Java Syntax?
Can anyone explain a bit of Java Collections syntax to me?
1. I created a class of things call JavaCard (a flash card) that extends Card.
1. There is also a JavaCardDeck, subclassed from CardDeck.
1. CardDeck possesses an ArrayList called 'cards' as an iVar. The ArrayList is declared as possessing type <Card>. I think that this is good polymorphism.
1. One loads JavaCardDeck, which effectively wraps the ArrayList, with JavaCard
I want to be able to get a "normal" array out of a JavaCardDeck instance. Thus:
aJavaCardDeck.getCards // should return an array of Cards,
View brew gnutls fails
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by GnuTLS configure 2.8.5, which was
generated by GNU Autoconf 2.64. Invocation command line was
$ ./configure --disable-debug --disable-dependency-tracking --prefix=/usr/local/brew/Cellar/gnutls/2.8.5 --disable-guile --with-libgcrypt-prefix=/usr/local
## --------- ##
## Platform. ##