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
eval `ssh-agent -s` | |
ssh-add .ssh/id_dsa | |
ssh -A -o StrictHostKeyChecking=no $DB_HOST "$CLONE_SCRIPT" | |
ssh-agent -k |
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
DIR="$( cd "$( dirname "$0" )" && pwd )" |
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
gawk 'match($0, /CREATE (TABLE|SEQUENCE|UNIQUE INDEX) (\w+)/, a) { print a[2] }' db/structure.sql > structures.out |
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
# sanity heroku_env | |
# | |
# FIXME: Need a better way to 'prime' the app before doing a sanity check. | |
# When done, 503 should be removed from the set of valid http codes. | |
# | |
sanity() { | |
echo "Checking http://$1.herokuapp.com" | |
curl -s -S -L http://$1.herokuapp.com -o /dev/null -m 500 --retry 5 --retry-delay 8 -w '%{http_code}' \ | |
| tee -a /tmp/heroku.out | grep -q '200\|401\|400\|503' || (echo "$1 deploy may have failed!" && exit 1) | |
} |
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
awk -F= '/DISTRIB_CODENAME/{ print $2 }' /etc/lsb-release |
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
-- https://devcenter.heroku.com/articles/cache-size | |
-- Cache hit ratio for PG Tables | |
SELECT | |
sum(heap_blks_read) as heap_read, | |
sum(heap_blks_hit) as heap_hit, | |
(sum(heap_blks_hit) - sum(heap_blks_read)) / sum(heap_blks_hit) as ratio | |
FROM | |
pg_statio_user_tables; |
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
convert Default.png -crop 320x460+0+20 Default.png | |
convert Default\@2x.png -crop 640x920+0+40 Default\@2x.png |
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
// Set field images, pad left input border. | |
self.usernameTextField.borderStyle = UITextBorderStyleNone; | |
self.usernameTextField.background = [UIImage imageNamed:@"text-input.png"]; | |
UIView *usernamePaddingView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 10, 20)]; | |
self.usernameTextField.leftView = usernamePaddingView; | |
self.usernameTextField.leftViewMode = UITextFieldViewModeAlways; |
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
#!/bin/bash | |
# This script provides a continuous devops loop between cookbook authoring, | |
# deployment to a chef-server, and verification of successful chef runs. | |
# Bootstrapping | |
bundle check || bundle --deployment --path=/var/lib/jenkins/shared/vendor_bundle | |
# Upload chef cookbooks & roles to the chef-server. | |
bundle exec rake upload:all |
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
#!/bin/bash | |
# Make sure TEST_AFTER_BUILD is set to true | |
xcodebuild -target myTests -configuration Debug -sdk iphonesimulator5.1 clean build |