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 | |
. /opt/elasticbeanstalk/support/envvars | |
cp /etc/nginx/fastcgi_params.default /etc/nginx/fastcgi_params | |
. /opt/elasticbeanstalk/bin/get-config environment | python -c "import json,sys; obj=json.load(sys.stdin); f = open('/etc/nginx/fastcgi_params', 'a'); f.write('\n'.join(map(lambda x: 'fastcgi_param ' + x[0] + ' ' + x[1] + ';', obj.iteritems())))" | |
service httpd stop | |
service nginx restart |
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
#!/bin/bash | |
for i in `aws autoscaling describe-auto-scaling-groups --auto-scaling-group-name GROUPNAME | grep -i instanceid | awk '{ print $2}' | cut -d',' -f1| sed -e 's/"//g'` | |
do | |
aws ec2 describe-instances --instance-ids $i | grep -i PrivateIpAddress | awk '{ print $2 }' | head -1 | cut -d"," -f1 | |
done; |
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 casper = require('casper').create(); | |
function getLinks() { | |
var links = document.querySelectorAll('a'); | |
return Array.prototype.map.call(links, function(e) { | |
return e.getAttribute('href'); | |
}); | |
} | |
casper.start('https://accounts.google.com/ServiceLogin#identifier'); |
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
<?php | |
// Use in the "Post-Receive URLs" section of your GitHub repo. | |
if ( $_POST['payload'] ) { | |
shell_exec( 'cd /srv/www/git-repo/ && git reset --hard HEAD && git pull' ); | |
} | |
?>hi |
NewerOlder