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
#this is a short-hand function to load a docker env | |
docker-env() { | |
eval "$(docker-machine env ${1:-default})" | |
} |
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 | |
# | |
# Starts a multiplexed terminal session with tmux running monitoring software. | |
# Requires dstat, htop and grc. The apache configuration for grc can be found | |
# here: https://gist.github.com/1885569 | |
# | |
# My .tmux.conf is here instead: https://gist.github.com/1886016#file_3_tmux.conf | |
# | |
# tmux 1.7 or later recommended. | |
# |
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
module.exports = function(grunt) { | |
var changedCoffee, onChange; | |
grunt.initConfig({ | |
// Read project settings | |
pkg: grunt.file.readJSON("package.json"), | |
cachebuster: { | |
build: { | |
options: { |
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
# Source accepts the protocol s3:// with the host as the bucket | |
# access_key_id and secret_access_key are just that | |
s3_file "/var/bulk/the_file.tar.gz" do | |
source "s3://your.bucket/the_file.tar.gz" | |
access_key_id your_key | |
secret_access_key your_secret | |
owner "root" | |
group "root" | |
mode 0644 | |
end |
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
#envrionments/dev_au.rb | |
default_attributes ({ | |
"apache2" => { "listen_ports" => [ "8080" ] } | |
}) | |
#cookbook/attributes/default.rb | |
default['apache2']['listen_ports'] = 80 | |
Chef::Log.info(node['apache2']['listen_ports']) ----- 80 |
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
# envrionment | |
name "dev_au" | |
description "Development Environment for Australia" | |
default_attributes ({ | |
"apache2" => { "listen_ports" => [ "80" ] }, | |
"www" => { | |
"server_name" => "server", | |
"docroot" => "/srv/apps/www" | |
} | |
}) |
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
{ | |
"Statement":[{ | |
"Effect":"Allow", | |
"Action":["s3:ListBucket","s3:GetObject","s3:GetObjectVersion"], | |
"Resource":["arn:aws:s3:::my_bucket/*","arn:aws:s3:::my_bucket"] | |
} | |
], | |
"Statement":[{ | |
"Effect":"Allow", | |
"Action":["s3:ListBucket","s3:GetObject","s3:GetObjectVersion"], |
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
Vagrant::Config.run do |config| | |
config.vm.box = "precise64" | |
config.vm.forward_port 80, 8080 | |
config.vm.customize [ | |
"modifyvm", :id, | |
"--name", "LAMP VM", | |
"--memory", "2048" | |
] |
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
# Source accepts the protocol s3:// with the host as the bucket | |
# access_key_id and secret_access_key are just that | |
s3_file "/var/bulk/the_file.tar.gz" do | |
source "s3://your.bucket/the_file.tar.gz" | |
access_key_id your_key | |
secret_access_key your_secret | |
owner "root" | |
group "root" | |
mode 0644 | |
end |
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
def show | |
@company = Company.find(params[:id], :include => :company_location) | |
respond_to do |format| | |
format.html # show.html.erb | |
format.json { render json: @company } | |
end | |
end | |