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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
# /etc/nginx/sites-available/app.conf | |
upstream app { | |
server unix:///var/www/app/tmp/sockets/puma.sock fail_timeout=0; | |
} | |
server { | |
listen 80; | |
server_name localhost; |
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
numbers = [20, 19, 7, 12] | |
numbers.map { |n| 3 * n } |
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
namespace :api do | |
namespace :v1 do | |
resources :foos | |
resources :bars | |
end | |
namespace :v2 do | |
resources :foos | |
# :bars should fall back to v1 | |
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
class DetailScreen < PM::Screen | |
def will_appear | |
view << UILabel.build( | |
frame: [[10, 10], [100, 20]], | |
text: "Foo Bar", | |
font: UIFont.systemFontOfSize(18), | |
textColor: UIColor.redColor | |
) | |
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
// _ios_seven.scss | |
// iOS 7 specific styles |
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
tell application "Twitter" | |
activate | |
end tell | |
delay 1 | |
#First Time | |
set app_identifier to "com.twitter.twitter-mac" | |
set app_identifier to do shell script "echo " & quoted form of app_identifier & " | /usr/bin/perl -pe 'use encoding utf8; s/(\\w)/\\L$1/gi'" | |
set displayString to "Assign " & app_identifier & " to Space:" |