This tutorial uses the "Sample hapi.js REST API" project.
Take a look at: https://github.com/agendor/sample-hapi-rest-api/
##Topics
- Introduction
- Installing Node.js
- Installing MySQL
- Setting-up the project
| #!/bin/sh | |
| ECHO='echo ' | |
| for branch in $(git branch -a | sed 's/^\s*//' | sed 's/^remotes\///' | grep -v 'master$'); do | |
| if [[ "$(git log $branch --since "6 months ago" | wc -l)" -eq 0 ]]; then | |
| if [[ "$DRY_RUN" = "false" ]]; then | |
| ECHO="" | |
| fi | |
| local_branch_name=$(echo "$branch" | sed 's/remotes\/origin\///') | |
| $ECHO git branch -d $local_branch_name |
| #!/bin/sh | |
| ECHO='echo ' | |
| for branch in $(git branch -a | sed 's/^\s*//' | sed 's/^remotes\///' | grep -v 'master$' | grep -v 'release'); do | |
| if [[ "$(git log $branch --since "6 months ago" | wc -l)" -eq 0 ]]; then | |
| if [[ "$DRY_RUN" = "false" ]]; then | |
| ECHO="" | |
| fi | |
| local_branch_name=$(echo "$branch" | sed 's/remotes\/origin\///') | |
| $ECHO git branch -d $local_branch_name |
| #!/usr/bin/env bash | |
| # MIT © Sindre Sorhus - sindresorhus.com | |
| # git hook to run a command after `git pull` if a specified file was changed | |
| # Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`. | |
| changed_files="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)" | |
| check_run() { | |
| echo "$changed_files" | grep --quiet "$1" && eval "$2" |
| --- | |
| language: objective-c | |
| before_script: | |
| - ./scripts/travis/add-key.sh | |
| after_script: | |
| - ./scripts/travis/remove-key.sh | |
| after_success: | |
| - ./scripts/travis/testflight.sh | |
| env: | |
| global: |
This tutorial uses the "Sample hapi.js REST API" project.
Take a look at: https://github.com/agendor/sample-hapi-rest-api/
##Topics
| #!/bin/bash | |
| #Force file syncronization and lock writes | |
| mongo admin --eval "printjson(db.fsyncLock())" | |
| MONGODUMP_PATH="/usr/bin/mongodump" | |
| MONGO_HOST="prod.example.com" | |
| MONGO_PORT="27017" | |
| MONGO_DATABASE="dbname" | |
| #!/usr/bin/env bash | |
| echo 'deb http://shadowsocks.org/debian wheezy main' >> /etc/apt/sources.list | |
| # Pre-requisites | |
| sudo apt-get -y update | |
| sudo apt-get -y install pptpd | |
| sudo apt-get -y install fail2ban | |
| sudo apt-get -y install shadowsocks-libev | |
| # Install dependencies | |
| # | |
| # * checkinstall: package the .deb | |
| # * libpcre3, libpcre3-dev: required for HTTP rewrite module | |
| # * zlib1g zlib1g-dbg zlib1g-dev: required for HTTP gzip module | |
| apt-get install checkinstall libpcre3 libpcre3-dev zlib1g zlib1g-dbg zlib1g-dev && \ | |
| mkdir -p ~/sources/ && \ | |
| # Compile against OpenSSL to enable NPN |
Custom recipe to get OS X 10.10 Yosemite running from scratch, setup applications and developer environment. I use this gist to keep track of the important software and steps required to have a functioning system after a semi-annual fresh install. On average, I reinstall each computer from scratch every 6 months, and I do not perform upgrades between distros.
This keeps the system performing at top speeds, clean of trojans, spyware, and ensures that I maintain good organizational practices for my content and backups. I highly recommend this.
You are encouraged to fork this and modify it to your heart's content to match your own needs.
| # ~/.osx — http://mths.be/osx | |
| # root check | |
| if [[ $EUID -ne 0 ]]; then | |
| echo "################################"; | |
| echo "## YOU ARE NOT RUNNING AS ROOT #"; | |
| echo "################################"; | |
| echo "#"; | |
| echo "# USAGE: sudo $0"; | |
| exit; |