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
policy = """{ | |
"Statement":[{ | |
"Effect":"Allow", | |
"Action":["s3:*"], | |
"Resource":["arn:aws:s3:::mybucket"]}]}""" | |
import boto | |
c = boto.connect_iam() | |
instance_profile = c.create_instance_profile('myinstanceprofile') | |
role = c.create_role('myrole') | |
c.add_role_to_instance_profile('myinstanceprofile', 'myrole') |
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
DOT_COM_TO_TODAY = {'kozmo.com': 'postmates'} |
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 | |
CHUNK=5 | |
MYSQL_CMD="SHOW SLAVE STATUS\G" | |
MYSQL="/usr/bin/mysql" | |
GREP="grep Sec" | |
START=$(echo $MYSQL_CMD|$MYSQL|$GREP|cut -d: -f2) | |
i=0 | |
function slaving_stopped { |
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 "./test2.rb" | |
def hi_replacement | |
puts "new thing" | |
end | |
hi = hi_replacement | |
hi |
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
Error attempting to use stored discovery information: <openid.consumer.consumer.TypeURIMismatch: Required type http://specs.openid.net/auth/2.0/signon not found in ['http://specs.openid.net/auth/2.0/server', 'http://openid.net/srv/ax/1.0', 'http://specs.openid.net/extensions/ui/1.0/mode/popup', 'http://specs.openid.net/extensions/ui/1.0/icon', 'http://specs.openid.net/extensions/pape/1.0'] for endpoint <openid.consumer.discover.OpenIDServiceEndpoint server_url='https://www.google.com/accounts/o8/ud' claimed_id=None local_id=None canonicalID=None used_yadis=True >> |
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
{ | |
"default" : "https://phabricator.whatever.com/" | |
} |
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 | |
USAGE="Usage: $0 worker total_workers | |
Note: worker is 0-indexed" | |
if [ "$#" -ne "2" ]; then | |
echo "$USAGE" | |
exit 1 | |
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
#!/bin/bash -xe | |
ssh admin@$OLD_HOST -- 'ghe-export-authorized-keys' | ghe-import-authorized-keys | |
ssh admin@$OLD_HOST -- 'ghe-export-es-indices' | ghe-import-es-indices | |
ssh admin@$OLD_HOST -- 'ghe-export-mysql' | ghe-import-mysql | |
ssh admin@$OLD_HOST -- 'ghe-export-redis' | ghe-import-redis | |
# ssh admin@$OLD_HOST -- 'ghe-export-repositories' | ghe-import-repositories | |
ssh admin@$OLD_HOST -- 'ghe-export-pages' | ghe-import-pages | |
ssh admin@$OLD_HOST -- 'ghe-export-ssh-host-keys' | ghe-import-ssh-host-keys |
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
crons: | |
reindex: | |
hostgroup: crongrowth | |
schedule: H * * * * | |
command: /mnt/pinboard/bin/reindex.py | |
environment: PINLOG_LOG_TO_STDERR=1 | |
# H is borrowed from Jenkins to automatically pick the best minute/hour/etc. | |
# If we have multiple crongrowth boxes this should balance across them. |
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
$ virtualenv a | |
New python executable in a/bin/python | |
Installing setuptools............done. | |
Installing pip...............done. | |
$ . a/bin/activate | |
(a)$ time pip install -qr code/pinboard/requirements.txt | |
pip install -qr code/pinboard/requirements.txt 246.99s user 59.66s system 82% cpu 6:11.28 total | |
(a)$ virtualenv b | |
New python executable in b/bin/python | |
Installing setuptools............done. |