git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
require 'puppet' | |
class Parser | |
def scan(input_file_name) | |
@input_file_name = input_file_name | |
environment = Puppet::Node::Environment.new | |
@known_resource_types = environment.known_resource_types | |
unless environment.known_resource_types.watching_file?(@input_file_name) | |
Puppet.info "rdoc: scanning #{@input_file_name}" | |
if @input_file_name =~ /\.pp$/ |
git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
#This is the "site config" for nginx | |
upstream django { | |
# Distribute requests to servers based on client IP. This keeps load | |
# balancing fair but consistent per-client. In this instance we're | |
# only using one uWGSI worker anyway. | |
ip_hash; | |
server unix:/tmp/uwsgi.sock; | |
} | |
server { |
{ | |
"client":{ | |
"name":"host01", | |
"address":"10.2.1.11", | |
"subscriptions":[ | |
"all", | |
"env_qa", | |
"frontend", | |
"proxy", | |
"apache" |
#!/bin/bash | |
# Authored by Pete Otaqui <[email protected]> | |
# | |
# Core code taken from StackOverflow | |
# http://stackoverflow.com/questions/372506/how-can-i-search-git-branches-for-a-file-or-directory | |
# | |
# The author has placed this work in the | |
# Public Domain, thereby relinquishing all | |
# copyrights. Everyone is free to use, modify, |
#!/bin/sh | |
# Do elasticsearch optimize on logstash previous day index | |
# if $1 = all then optimize all indicies | |
esindex="/opt/elasticsearch/data/elasticsearch/nodes/0/indices" | |
# Grab yesterday's values | |
D=`date +%d -d yesterday` | |
M=`date +%m -d yesterday` | |
Y=`date +%Y -d yesterday` |
input { | |
file { | |
type => syslog | |
path => "/var/log/messages" | |
} | |
} | |
filter { | |
grok { | |
type => syslog |
# This will cause full debug output to go to the console | |
>>> import boto | |
>>> boto.set_stream_logger('foo') | |
>>> ec2 = boto.connect_ec2(debug=2) |
Logstash Configuration... | |
input { | |
file { | |
format => "plain" | |
path => "/var/log/apache2/*error.log" | |
type => "apacheerror" | |
} | |
} | |
filter { |
#!/usr/bin/env bash | |
ruby_version="1.9.2-p180" | |
rpm_version="0.2" | |
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function | |
#make sure we have rvm | |
no_rvm=$(which rvm | grep 'no rvm') | |
if [ "$no_rvm" ] ; then | |
echo "install rvm" |