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
## Use reattach-to-user-namespace as the wrapper script to handle Mac OS X | |
## support for pbcopy and pbpaste. | |
#set -g default-shell /usr/bin/zsh | |
set -g default-command "${SHELL}" | |
## Tell tmux to copy these environment variables over from the original shell | |
## that tmux was launched in. These are important for ssh-agent on mac os x to | |
## work properly when inside your tmux sessions. Otherwise, it will make you | |
## type in your key password when trying to ssh to different machines. | |
set-option -g update-environment "SSH_ASKPASS SSH_AUTH_SOCK SSH_AGENT_PID SSH_CONNECTION" |
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
.center { | |
position: absolute; | |
width: 50px; | |
height: 25px; | |
top: calc(50% - 25px); /* 50% - height */ | |
left: calc(50% - 50px); /* 50% - width */ | |
} |
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
# Capybara Screenshots - Full Page | |
options = {} | |
# options[:width] = current_window.size[0] | |
# options[:height] = current_window.size[1] | |
path = "tmp/screenshot.png" | |
page.driver.resize_window(2548, 1238) | |
options[:width] = 2548 | |
options[:height] = 1238 |
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
Tabbed by: Jason Watson | |
Date: 4/24/2009 | |
Updated: 7/29/2010 | |
Bridge added. Check out the tutorial video: | |
http://il.youtube.com/watch?v=b73onkQt9ds&feature=related | |
Performance video: | |
http://www.youtube.com/watch?v=UJDguHJ34SE |
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] | |
co = "!f() { \ | |
git checkout $(git branch | grep $1 | sed -e 's/^* //'); \ | |
}; f" | |
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
Money.new(payment_transactions.succeeded.joins(:offer_purchase).sum("#{OfferPurchase.table_name}.price_in_cents")) |
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
// 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 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
picc.format = (function() { | |
var formatter = function(fmt, _empty) { | |
var round = false; | |
if (typeof fmt === 'string') { | |
round = !!fmt.match(/d$/); | |
fmt = d3.format(fmt); | |
} | |
return function(key, empty) { | |
empty = empty || _empty; | |
if (typeof empty === 'string') { |
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 | |
file_names = ['path/to/config.local.php'] | |
config_values = [ | |
'CS_CART_DB_HOST', | |
'CS_CART_DB_NAME', | |
'CS_CART_DB_USER', | |
'CS_CART_DB_PASSWORD', | |
'CS_CART_HTTP_HOST', |
NewerOlder