start new:
tmux
start new with session name:
tmux new -s myname
| #!/bin/bash | |
| # ag is the_silver_searcher (https://github.com/ggreer/the_silver_searcher) | |
| ag TODO | while read line; do | |
| file=$(echo ${line} | awk -F ':' '{print $1}'); | |
| lineno=$(echo ${line} | awk -F ':' '{print $2}'); | |
| git blame --line-porcelain "./${file}" -L ${lineno},${lineno} | grep author-mail | cut -d ' ' -f 2; | |
| done | sort | uniq -c |
| # Require the json library to parse json into Ruby objects | |
| require 'json' | |
| require 'simple_statistics' | |
| # The input | |
| json = '[ | |
| { | |
| "Low": 8.63, | |
| "Volume": 14211900, | |
| "Date": "2012-10-26", |
This gist uses TK+Berkshelf to drive creating a vagrant virts and converging a simple recipe to install and configure NTPd. This is a simple cookbook that has one recipe, one template (for ntp.conf) and one attribute file. It works on Ubuntu 12.04 and CentOS 6.4 (and derviatives) and the attribute file is used to support both distros.
This should work on Mac (where I developed it) and any chef-supported Linux that you can get Vagrant onto (Ubuntu/CentOS).
Because I use ChefDK and Test Kitchen, I can largely ignore setting up Vagrant and Berkshelf and can get right to work on writing recipe code.
##Install AWS CLI Tools##
cd ~/.aws edit or create new file named config paste the following contents inside.
Save the file as "config"
| sudo su - | |
| # stuff we need to build from source | |
| apt-get install libpcre3-dev build-essential libssl-dev | |
| # get the nginx source | |
| cd /opt/ | |
| wget http://nginx.org/download/nginx-0.8.54.tar.gz | |
| tar -zxvf nginx* | |
| # we'll put the source for nginx modules in here |
If someone forks a gist and you'd like to merge their changes. Do this:
clone your repo, I use the name of the gist
git clone git://gist.github.com/1163142.git gist-1163142
add a remote for the forked gist, I'm using the name of my fellow developer
git remote add aaron git://gist.github.com/1164196.git
As configured in my dotfiles.
start new:
tmux
start new with session name:
sudo -i
cd /opt/aws/opsworks/current/
opsworks-agent-cli get_json > attributes.json
bin/chef-solo -c conf/solo.rb -j attributes.json -o recipe[whatever],recipe[whatever_else::specific_recipe]