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
| import test from 'tape'; | |
| // For each unit test you write, | |
| // answer these questions: | |
| test('What component aspect are you testing?', assert => { | |
| const actual = 'What is the actual output?'; | |
| const expected = 'What is the expected output?'; | |
| assert.equal(actual, expected, | |
| 'What should the feature do?'); |
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 | |
| 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 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
| /* 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 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
| # 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 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 | |
| # 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 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 | |
| # 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 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
| nuke = !git branch -D $1 && git push origin :$1 ( git nuke branch name) |
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
| // 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 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 | |
| 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 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
| 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. |