Skip to content

Instantly share code, notes, and snippets.

// Live tables!
// This example works on http://en.wikipedia.org/wiki/Table_(information)
// Paste into firebug console
require = function (src){
var script = document.createElement('script');
script.setAttribute('type', 'text/javascript');
script.setAttribute('src', src);
// InsertBefore for IE.
// IE crashes on using appendChild before the head tag has been closed.
diff --git a/vendor/expectations-1.0.0/lib/expectations/suite_results.rb b/vendor/expectations-1.0.0/lib/expectations/suite_results.rb
index 2beb638..34d45e0 100644
--- a/vendor/expectations-1.0.0/lib/expectations/suite_results.rb
+++ b/vendor/expectations-1.0.0/lib/expectations/suite_results.rb
@@ -3,11 +3,11 @@ class Expectations::SuiteResults
def initialize(out)
self.out, self.expectations = out, []
- out.print "Expectations "
+ out.print "Expectations " unless ENV["FORMAT"] == "yaml"
Breakfast (smoothie)
4 bananas
1 large handful spinach
1 cup soy milk
1/2 cup almonds
1/4 cup blueberries
2 tbsp. protein powder (soy)
Snack
1 banana
- if development?
%a#dev-fill-form{:href => ''} Fill form
%script
:plain
$(function () {
$('#dev-fill-form').click(function () {
data = {
email: 'bogus@example.com',
name: 'Bogus McGee'
}
Books I bought today at City Lights
Animal Liberation (Peter Singer)
The Path to Tranquility (The Dalai Lama)
This Year You Write Your Novel (Walter Mosley)
Food Politics (Marion Nestle)
Writings For A Democratic Society (Tom Hayden)
The Annotated Flatland (Edwin Abbot, notes by Ian Stewart)
What I Talk About When I Talk About Running (Haruki Murakami)
# BONUS PARTY GAME - Choose 1 or make your own! Is this DRY gone mad?
# A
named_scope :leads, :conditions => ["dancers.lead = ?", true], :joins => :dancer
named_scope :follows, :conditions => ["dancers.lead = ?", false], :joins => :dancer
# B
[
[:leads, true],
[:follows, false]
function parse_git_dirty {
git diff --quiet || echo " *"
}
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/(\1$(parse_git_dirty))/"
}
export PS1='\w $(parse_git_branch)\$ '
http://www.youtube.com/watch?v=5q_2Uy4g8vA
Parkour in Melbourne, Australia (my home town)
http://www.youtube.com/watch?v=ntFEoSV-PEc
Mental block - you know you can physically do it, but you need to cross the line from just believing you can do it
http://video.google.com/videoplay?docid=3022662956956514828
Long (90 minutes), the first section though is a really good intro to parkour - basic philosophy and methods
# Disclaimer
<<-EOS
This still just a crazy idea and I have not yet implemented it
Not for long though
Soon we take over the world
EOS
# Synopsis
test(object, method,
setup => expected_result,
(Pre 2008 dates are pretty rough I can't really remember)
Aug 2005: Try going vegetarian, lasts a week. Mostly cooked the same stuff sans-meat. FAIL.
Nov 2005: Go to a lecture by Peter Singer, cannot disagree, so become vegetarian. I knew one other vegetarian at this point.
Sep 2006: Go vegan for 30 days. Tried replacing yoghurt with soyghurt BAD MOVE. Did not know vegan desserts existed. Reverted after 30 days, but ate "more vegan".
Apr 2008: Go vegan for a 6-day hike, didn't feel like eating animal products after. Haven't since.
Jan 2008: Cut out bread and cereal for 30 days ("raw-ish until dinner"). Reverted - expensive and you need to be on the ball with shopping habits - though eat a *lot* more fruit now.
Lessons Learned:
- Slow progression, gradually incorporate new recipes