This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'pdf-reader' | |
require './markup_receiver' | |
doc = PDF::Reader.new(ARGV[0]) | |
$objects = doc.objects | |
def is_note?(object) | |
object[:Type] == :Annot && [:Text, :FreeText].include?(object[:Subtype]) | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Script to download starred posts from Google Reader (including post content). | |
# Requires that your starred posts are in a public feed. | |
# | |
# You can find the public feed by going to "Reader settings", then "Folders and Tags", | |
# setting "starred items" to public and then going to "view public page". That url is the | |
# one to pass to the script. | |
# | |
# I guess it would work for other folders too. | |
# | |
# Usage: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
redcar (gems) $ cat bin/redcar_test | |
#!/bin/sh | |
echo "foo" | |
redcar (gems) $ cat $(which redcar_test) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ 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%) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
redcar-clojure (master) $ git remote rm origin | |
redcar-clojure (master) $ git remote add origin [email protected]: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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# instead of | |
Preference.build do | |
preference "Appearance/Tab Theme", :type => :combo do | |
.. | |
end | |
end | |
# how about |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |