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
| for h in $(ec2-describe-instances --filter instance-state-name=running | grep -iv stack | grep -iv autoscaling | grep Name | cut -f3,5 | tr "\t" ":" ); | |
| do echo $h; | |
| INSTANCE=$(echo $h|cut -d: -f1); | |
| INAME=$(echo $h|cut -d: -f2); | |
| ec2-create-image $INSTANCE --name $INAME.$(date +%Y%m%d) --description $INAME.$(date +%Y%m%d) --no-reboot; | |
| done |
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
| $ gsed -e 's|<?php echo \(.*\) ?>|<%= \1 %>|g' -e 's/$\([a-z]*\)\([A-Z]\)/\1_\l\2/g' old_php_view.php > new_rails_view.erb |
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 'capistrano/calendar/recipes' | |
| require 'bundler/capistrano' | |
| require "rvm/capistrano" | |
| load 'deploy/assets' | |
| set :user, 'deployuser' | |
| set :application, 'applicationname' | |
| set :rvm_type, :system | |
| set :rvm_ruby_string, "ruby-1.9.3-p392@#{application}" |
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
| upstream myapp { | |
| server 127.0.0.1:3000; | |
| server 127.0.0.1:3001; | |
| server 127.0.0.1:3002; | |
| } | |
| server { | |
| listen 80; | |
| server_name .example.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
| [global] | |
| unix charset = UTF8 | |
| workgroup = XXX | |
| netbios name = XXX | |
| server string = %h server (Samba, Ubuntu) | |
| interfaces = lo, eth2, 192.168.42.17/24 | |
| bind interfaces only = Yes | |
| security = USER | |
| Map to guest = Bad User | |
| obey pam restrictions = Yes |
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
| [global] | |
| unix charset = UTF8 | |
| workgroup = XXX | |
| netbios name = XXX | |
| server string = %h server (Samba, Ubuntu) | |
| interfaces = lo eth0 | |
| bind interfaces only = Yes | |
| security = SHARE | |
| obey pam restrictions = Yes | |
| guest account = www-data |
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
| Which SSL certs are uploaded to Amazon: | |
| $ iam-servercertlistbypath | |
| Which LBs are running: | |
| $ elb-describe-lbs --region eu-west-1 | |
| Now update the LB: |
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
| server { | |
| listen 0.0.0.0:80; | |
| server_name servername.domain.tld; | |
| root /home/project/htdocs; | |
| location / { | |
| index index.php index.html; | |
| try_files $uri $uri/ /index.php; | |
| } |
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
| $ sudo vim /etc/postfix/main.cf | |
| myhostname = local.yourdomain.tld | |
| mydomain = yourdomain.tld | |
| myorigin = $mydomain | |
| relayhost = [smtp.your-isp.tld]:587 |
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/sh | |
| daemon=beanstalkd | |
| executable=/usr/local/bin/$daemon | |
| port=11300 | |
| waldir=/usr/local/var/beanstalkd | |
| logfile=/usr/local/var/log/beanstalkd.log | |
| interface="127.0.0.1" | |
| params="-l $interface -p $port -b $waldir" |
NewerOlder