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
alias ip="ifconfig en0 | tail -r | grep inet -m 1 | cut -d ' ' -f 2" |
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
osxlabel(){ | |
osascript -e "tell app \"Finder\" to set label index of (POSIX file \"$PWD/$0\" as alias) to 4" | |
} | |
export -f osxlabel | |
git diff --name-only HEAD develop | xargs -n 1 bash -c osxlabel "$@" |
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
module AssetHelper | |
## | |
# Renders a stylesheet asset inline. | |
def inline_stylesheet( name ) | |
content_tag :style do | |
sprockets[ "#{name}.css" ].to_s | |
end | |
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
subject { Formatter.new( users( :homer ) ) } | |
example '#mailing_address' do | |
verify { subject.mailing_address } | |
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
example '#tracking_hash' do | |
verify { users( :homer ).tracking_hash } | |
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
it 'should GET index' do | |
xhr :get, api_resource_path( version, resource.id ), :auth_token => user.authentication_token | |
verify :format => :json do | |
last_response.body | |
end | |
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
describe MyClass do | |
example '#foo' do | |
verify { subject.foo } | |
end | |
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 bash | |
## | |
# The dimensions for the physical QR code, in pixels. | |
# The Brother QL-570 Label Printer tape is 2.44" wide | |
# at 72ppi, and 72 * 2.44 = 175.68, so 175 is good. | |
size=175x175 | |
## | |
# Usage: qrcode [url] |
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
on run {input, parameters} | |
tell application "Evernote" | |
get the note link of the first item in (selection as list) | |
end tell | |
end run |
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
var request = require('superagent'); | |
/** | |
* @constructor | |
*/ | |
module.exports = Client; | |
function Client(api_key) { | |
this.params = {}; |