This file contains hidden or 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
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName:'Ember Twiddle' | |
}); |
This file contains hidden or 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
Let's say you found yourself stranded on an island inhabited only by hungry wolves. And let's say these wolves were not regular wolves, but they were special wolves who, for some reason, very much like the sound of Neil Young but with much more wah pedal. They don't mind regular Neil Young, but they find Neil-Young-but-with-much-more-wah irresistable. There is a small boat with which you could make your escape, if only you could get past this pack of pesky unusual wolves. | |
To your North is a PA system with about 5000 watts of power (RMS) and you are confident this could draw the wolves away from your escape boat, if only you had a recording of Neil-Young-but-with-much-more-wah. Next to the mixer is a tape deck. Considering a somehow-working PA system with a tape deck to be less weird than a pack of wolves with particular muscial taste, you investigate. | |
You find two tapes: Nirvana and Pearl Jam. You look at the wolves, snarling and doing other sorts of general threatening wolf business, and look back at the t |
This file contains hidden or 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 'sinatra' | |
CODE_PATH = '/repo/lives/here' | |
RVM_COMMAND = '[[ -s $HOME/.rvm/scripts/rvm ]] && source $HOME/.rvm/scripts/rvm' | |
UPDATE_COMMAND = 'git pull' | |
BUILD_COMMAND = 'bundle && rake db:migrate && rake' | |
def log(message='') | |
File.open('build.log', 'a') {|log| log.puts "#{Time.now.utc} #{message}" } | |
end |
This file contains hidden or 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
$ mDNS -E | |
Looking for recommended registration domains: | |
Talking to DNS SD Daemon at Mach port 6659 | |
16:39:05.117 Recommended Registration Domain local. Added | |
16:39:05.117 Recommended Registration Domain 218394928.members.btmm.icloud.com. Added | |
^C | |
$ ssh washingmachine.218394928.members.btmm.icloud.com | |
Password: |
This file contains hidden or 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 'rtesseract' | |
def get_image | |
system 'curl -s -o image.jpg http://akueats.com/_library/images/cococurry-sign.jpg' | |
system 'convert image.jpg -type Grayscale image.tif' | |
end | |
def image_contains_curry | |
return true if RTesseract.new('image.tif').to_s.downcase.include? 'curry' | |
false |
This file contains hidden or 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
if [ `date | cut -c 1-3` == 'Wed' ]; then curl -s "http://search.twitter.com/search.json?q=curry&result_type=recent" | tr ',' '\n' | grep text | head -1 | sed -e "s/\"text\":/ IT'S CURRY DAY: /"; else echo 'Curry day is Wednesday. There will be no curry today.'; fi |
This file contains hidden or 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
In ruby 1.9, you may see this: | |
-> | |
This combination of hyphen and right-pointy-bracket is sometimes referred to as a "stabby lambda". | |
Its correct name is actually a "foie gras". | |
(o)< # a duck! | |
>(o) # also a duck |
This file contains hidden or 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
# ____ _ _ ____ _ | |
# | _ \ ___ | |__ ___ | |_ | _ \ ___ ___| | __ | |
# | |_) / _ \| '_ \ / _ \| __| | |_) / _ \ / __| |/ / | |
# | _ < (_) | |_) | (_) | |_ | _ < (_) | (__| < | |
# |_| \_\___/|_.__/ \___/ \__| |_| \_\___/ \___|_|\_\ | |
# | |
# 1. http://en.wikipedia.org/wiki/Special:Random | |
# The first article title on the page is the name of your band. | |
# | |
# 2. www.quotationspage.com/random.php3 |
This file contains hidden or 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
jetset:~ grant$ mdfind "kMDItemRecordingYear == 1981" | |
/Users/grant/Music/iTunes/iTunes Music/Music/Midnight Oil/Place Without A Postcard/11 Lucky Country.mp3 | |
/Users/grant/Music/iTunes/iTunes Music/Music/Midnight Oil/Place Without A Postcard/10 If Ned Kelly Was King.mp3 | |
/Users/grant/Music/iTunes/iTunes Music/Music/Midnight Oil/Place Without A Postcard/09 Loves On Sale.mp3 | |
/Users/grant/Music/iTunes/iTunes Music/Music/Midnight Oil/Place Without A Postcard/08 Quinella Holiday.mp3 | |
/Users/grant/Music/iTunes/iTunes Music/Music/Midnight Oil/Place Without A Postcard/07 Burnie.mp3 | |
/Users/grant/Music/iTunes/iTunes Music/Music/Midnight Oil/Place Without A Postcard/06 Written In The Heart.mp3 | |
/Users/grant/Music/iTunes/iTunes Music/Music/Midnight Oil/Place Without A Postcard/05 Basement Flat.mp3 | |
/Users/grant/Music/iTunes/iTunes Music/Music/Midnight Oil/Place Without A Postcard/04 Someone Else To Blame.mp3 | |
/Users/grant/Music/iTunes/iTunes Music/Music/Midnight Oil/Place Without A Postcard/03 Armistice Day.mp3 |
This file contains hidden or 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
"You will receive a confimation email within the business day. If you don't receive a confirmation email, please call 13 6954 (13 myki) with your myki reference number." |
NewerOlder