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 | |
# | |
# Parse command flags and positional arguments regardless | |
# of argument order | |
# | |
# placeholder for postional arguments | |
PARAMS="" |
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 | |
# vim: set syntax=sh : | |
# | |
# Generate a changelog | |
# | |
git tag | sort -r | awk ' | |
/^v/ { | |
# print commit log diff | |
if(NR>1) | |
system("git log " $1 "..." prev " --pretty=format:\"- [%s](http://github.com/<owner>/<repo>/commit/%H) \" | tail -n+2") |
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 | |
# | |
# Report redis usage data to statsd | |
# Metric Format: <env>.<hostname>.<redis>.<metric> | |
# | |
# Add to crontab for periodic monitoring | |
# | |
STATSD_HOST=<host> | |
STATSD_PORT=8125 |
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
{# set the value as a jinja variable #} | |
{%- mayvar = 'taco ' %} | |
{# add jinja variable to pillar data #} | |
mypillarkey: {{ myvar }} | |
{# add jinja variable to another pillar key #} | |
myotherpillarkey: {{ myvar }} |
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.configure("2") do |config| | |
config.vm.box = "hashicorp/precise64" | |
config.vm.define "master" do |master| | |
master.vm.hostname = "master" | |
master.vm.network :private_network, ip: "10.10.10.2" | |
master.vm.synced_folder ".", "/srv/salt/", nfs: true | |
master.vm.provider "virtualbox" do |v| | |
v.cpus = 2 |
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
include: | |
- mysls | |
# this runs even when mysls errors | |
some_state: | |
cmd.run: | |
- name: do things | |
- require: | |
- sls: mysls |
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.configure("2") do |config| | |
# existing box name | |
config.vm.box = "SmartOS" | |
# download url for box (if it doesn't already exist) | |
config.vm.box_url = "http://dlc-int.openindiana.org/aszeszo/vagrant/smartos-base1310-64-virtualbox-20130806.box" | |
# sync a local directory to the vm | |
#config.vm.synced_folder "/path/to/local/dir", "/path/to/vm/dir" |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
VAGRANTFILE_API_VERSION = "2" | |
$bootstrap = <<SCRIPT | |
#!/usr/bin/env bash | |
apt-get update | |
apt-get install -y git build-essential python-pip python-dev python-m2crypto |
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
{ | |
"Environment": "prod", | |
"VPC": "vpc-69f00f0c", | |
"Subnets": "subnet1,subnet2", | |
"Zones": "us-east-1a", | |
"ServerSecurityGroups": "...", | |
"ElbSecurityGroups": "...", | |
"Endpoint": "www2.o2lontour.com" | |
} |
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
{% set workers = { 'worker': 'rake resque:work QUEUE=immediate,high,medium,low', | |
'data_seed_worker': 'rake resque:work QUEUE=data_seed', | |
'youtube_quota_worker': 'rake resque:youtube_quota_worker', | |
'scheduler': 'rake resque:scheduler' | |
'sidekiq': 'sidekiq' } %} |