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 | |
AUTH_EMAIL='your@email' # dnsimple account email address | |
AUTH_TOKEN='your-api-token' # dnsimple api token | |
DOMAIN_ID='yourdomain.com' # domain name or id | |
RECORD_ID='12345' # record id to update | |
IP="`curl http://icanhazip.com/`" | |
curl -H "X-DNSimple-Token: $AUTH_EMAIL:$AUTH_TOKEN" \ | |
-H "Accept: application/json" \ |
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
/* bling.js */ | |
window.$ = document.querySelectorAll.bind(document) | |
Node.prototype.on = window.on = function (name, fn) { | |
this.addEventListener(name, fn) | |
} | |
NodeList.prototype.__proto__ = Array.prototype |
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
# ubuntu server setup | |
adduser deploy sudo | |
# on your machine | |
# ssh-copy-id deploy@IPADDRESS | |
# ssh deploy@IPADDRESS -i yoursakeyfile | |
# edit /etc/ssh/ssh_config set PasswordAuthentication to 'no' | |
# run service ssh restart to restart ssh |
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/sh | |
# Ask for the administrator password upfront. | |
sudo -v | |
# homebrew | |
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
brew update | |
# taps |
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/sh | |
# Alot of these configs have been taken from the various places | |
# on the web, most from here | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# Set the colours you can use | |
black='\033[0;30m' | |
white='\033[0;37m' | |
red='\033[0;31m' |
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
nuke = !git branch -D $1 && git push origin :$1 ( git nuke branch name) |
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
// Load configurations | |
// if test env, load example file | |
var env = process.env.NODE_ENV || 'development' | |
, config = require('./config/config')[env] | |
, mongoose = require('mongoose') |
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 | |
DOMAIN_ID="" | |
RECORD_ID="" | |
IP="`curl http://icanhazip.com/`" | |
curl -H 'X-DNSimple-Token: email:account_token' \ | |
-H 'Accept: application/json' \ | |
-H 'Content-Type: application/json' \ | |
-X PUT \ |
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
git clone https://github.com/username/username.github.io.git | |
git checkout source | |
Then we need to setup the deploy directory. | |
mkdir _deploy | |
cd _deploy | |
git init | |
git remote add -t master -f origin https://github.com/username/username.github.io.git | |
Done! Now we can make changes in source branch and use rake gen_deploy as usual. |
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
- create deploy user and add to sudoers | |
- log in as deployer | |
- install stack with: sudo wget --no-check-certificate https://raw.github.com/joshfng/railsready/master/railsready.sh && bash railsready.sh | |
- install apache2: | |
sudo apt-get update | |
sudo apt-get install apache2 | |
- fix for rvm then install passenger | |
rvm remove 2.0.0 | |
rvm autolibs install openssl | |
rvm install ruby-2.0.0-p247 --with-openssl-dir=$HOME/.rvm/usr |