-
The secret structure of great talks http://www.ted.com/talks/nancy_duarte_the_secret_structure_of_great_talks.html Really enlightening TED video. See the structure underlying both 'I Have a Dream' and the 2007 iPhone launch talk.
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
>> IO.for_fd(3) | |
ArgumentError: The given fd is not accessible because RubyVM reserves it | |
from (irb):23:in `for_fd' | |
from (irb):23 | |
from /Users/jessestorimer/.rbenv/versions/1.9.3-p0-perf/bin/irb:12:in `<main>' | |
>> IO.for_fd(4) | |
ArgumentError: The given fd is not accessible because RubyVM reserves it | |
from (irb):24:in `for_fd' | |
from (irb):24 | |
from /Users/jessestorimer/.rbenv/versions/1.9.3-p0-perf/bin/irb:12:in `<main>' |
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
commit bcdaf11bfeac9b6015d981a95cd375c61c3a2b11 | |
Author: Jesse Storimer <jstorimer@gmail.com> | |
Date: Sun Jan 1 05:50:53 2012 -0800 | |
diff --git a/learning_basic_programming.md b/learning_basic_programming.md | |
index 06a953f..ffc4945 100644 | |
--- a/learning_basic_programming.md | |
+++ b/learning_basic_programming.md | |
@@ -14,7 +14,7 @@ Start off by giving [Try Ruby](http://tryruby.org/ an in-browser programming tut | |
Coming from http://www.reddit.com/r/canada/comments/m1494/looking_for_a_developer_advocate_for_shopify/ or elsewhere? Awesome.
This is a guide for learning the bare minimum needed for effectively working as a junior programmer or developer advocate at most software companies.
If you haven’t ever programmed before, don’t sweat it. Those who would be good fits at this job are naturally attuned to this stuff and their innate curiosity makes it a cakewalk. If you’re finding that it’s a frustrating experience the entire way through, then you should consider doing something else for a little while before you come back to give it another shot.
A first stab at programming
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
#!/usr/bin/env ruby | |
pattern = ARGV.shift | |
data = ARGF.read | |
data.each_line do |line| | |
exit if line.match(pattern) | |
end | |
abort "No matches found" |
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
#!/usr/bin/env ruby | |
# A simply utility to show character counts for each line of input and | |
# highlight lines longer than 80 characters. | |
# | |
# Written as an example for http://jstorimer.com/2011/12/12/writing-ruby-scripts-that-respect-pipelines.html | |
# | |
# Examples: | |
# | |
# $ hilong Gemfile |
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
#!/bin/sh -e | |
# Usage: license | |
# Prints an MIT license appropriate for totin' around. | |
# | |
# $ license > COPYING | |
#!/bin/sh | |
echo "Copyright (c) `date +%Y` Jesse Storimer | |
Permission is hereby granted, free of charge, to any person obtaining | |
a copy of this software and associated documentation files (the |
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
#!/usr/bin/env coffee | |
# A useful little script to execute a shell command when another | |
# command exits successfully. Kind of like using && except the | |
# first command will keep executing until it returns successfully. | |
# | |
# My use case was starting up a local rails server. It takes ~15 | |
# seconds and I have no indication of when it's ready besides manually | |
# polling lsof. So with this script I just do the following to start | |
# profiling my app when it's online. |
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 'rake/testtask' | |
Rake::TestTask.new('tester') do |t| | |
t.test_files = 'test/*.rb' | |
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
#!/usr/bin/env ruby | |
# Put me in ~/bin/branch_date | |
ref = ARGV[0] | |
date = `git show --format='%at' #{ref} | head -1`.strip | |
puts "#{date}:#{ref}" | |