Skip to content

Instantly share code, notes, and snippets.

Windows 95? No problem. Nice new 32 bit API, but it still ran old
16 bit software perfectly. Microsoft obsessed about this, spending
a big chunk of change testing every old program they could find with
Windows 95. Jon Ross, who wrote the original version of SimCity for
Windows 3.x, told me that he accidentally left a bug in SimCity
where he read memory that he had just freed. Yep. It worked fine on
Windows 3.x, because the memory never went anywhere. Here's the amazing
part: On beta versions of Windows 95, SimCity wasn't working in testing.
Microsoft tracked down the bug and added specific code to Windows 95 that
looks for SimCity. If it finds SimCity running, it runs the memory
redcar (gems) $ cat bin/redcar_test
#!/bin/sh
echo "foo"
redcar (gems) $ cat $(which redcar_test)
$ gem install redcar-dev --pre
Fetching: swt-0.3-java.gem (100%)
Fetching: redcar-javamateview-0.1-java.gem (100%)
Fetching: redcar-bundles-0.1-java.gem (100%)
Fetching: rubyzip-0.9.4.gem (100%)
Fetching: lucene-0.5.0.beta.1.gem (100%)
Fetching: bouncy-castle-java-1.5.0146.1.gem (100%)
Fetching: plugin_manager-1.2.gem (100%)
Fetching: jruby-openssl-0.7.4.gem (100%)
Fetching: json-1.5.1-java.gem (100%)
redcar-clojure (master) $ git remote rm origin
redcar-clojure (master) $ git remote add origin git@github.com:danlucraft/redcar-clojure.git
redcar-clojure (master) $ git remote show origin
fatal: '/data/repositories/1/nw/1b/5f/1d/1882053/1882053.git' does not appear to be a git repository
fatal: The remote end hung up unexpectedly
# instead of
Preference.build do
preference "Appearance/Tab Theme", :type => :combo do
..
end
end
# how about
class Foo
def self.preferences
Preference.draw do
preference "Appearance/Tab Theme", :type => :combo do
default "Mac Classic"
values ["Mac Classic", "Amy", "BBEdit"]
change do
puts "Theme changed to " + Redcar::Preference.get("Appearance/Tab Theme")
# start work on new feature
git checkout -b my-new-feature
git add .
git commit -m "Implemented awesome new feature"
# push it up to my github account (origin is the remote for my github account)
git push origin my-new-feature
diff --git a/test/test_rake_application.rb b/test/test_rake_application.rb
index 4a99cf6..a0910c9 100644
--- a/test/test_rake_application.rb
+++ b/test/test_rake_application.rb
@@ -321,7 +321,7 @@ class TestRakeApplication < Rake::TestCase
ARGV << '-f' << '-s' << '--rakelib=""'
assert_raises(SystemExit) {
_, err = capture_io { @app.run }
- assert_match(/see full trace/, err)
+ assert_match(/WOOO/, err)
@danlucraft
danlucraft / enter_the_matrix.rb
Created April 21, 2011 22:33
Bot for playing rdrc2 Enter the Matrix game
require 'pp'
require 'rubygems'
require 'mechanize'
class MatrixInterface
CREDS = File.read("creds.txt").split(",")
def initialize
login_page = agent.get("http://reddirtrubyconf.com/login")
@danlucraft
danlucraft / sync.rb
Created January 27, 2011 09:30
handy script for rsyncing between machines
require 'rubygems'
require 'fsevents'
require 'fileutils'
STDOUT.sync = true
project = ARGV[0] || 'skweb'
options = {
:directory_to_watch => "/Users/danlucraft/Songkick/#{project}",