Skip to content

Instantly share code, notes, and snippets.

View schisamo's full-sized avatar

Seth Chisamore schisamo

View GitHub Profile
@danielsdeleo
danielsdeleo / api.rb
Last active December 14, 2015 22:29
RSpec2 Style let bindings for Chef?
##
# binding definition API.
# Examples taken from nagios cookbook
bind(:nagios_service_name).to("nagios")
bind(:hostgroups) do
search(:role, "*:*").map {|r| r.name }
end
@jedi4ever
jedi4ever / gist:4954727
Last active December 13, 2015 18:19
vm building with veewee CI tuning notes

CPU

  • OK - introduced VEEWEE_CPU_COUNT to override the number of cpus

problem(s):

  • multiple CPU's don't get passed to compiles so only CPU is busy

MEMORY

  • introduced VEEWEE_MEMORY_SIZE to override the memory size
@KELiON
KELiON / fish_prompt.fish
Last active September 17, 2021 21:11
Fish-fish shell prompt with ruby version and git info
function _git_branch_name
echo (git symbolic-ref HEAD ^/dev/null | sed -e 's|^refs/heads/||')
end
function _is_git_dirty
echo (git status -s --ignore-submodules=dirty ^/dev/null)
end
function _rb_prompt
echo (rbenv version | awk '{print $1}')
@garlandkr
garlandkr / jenkins.conf
Created January 11, 2013 18:21
rsyslog conf for Jenkins
# Import Jenkins log files
$ModLoad imfile # Load the imfile input module
$ModLoad imklog # for reading kernel log messages
$ModLoad imuxsock # for reading local syslog messages
# Cleanup logs
#$InputFileName "/opt/jenkins/Workspace clean-up.log"
#$InputFileTag jenkins-cleanup
#$InputFileStateFile jenkins-cleanup-state
#$InputRunFileMonitor
@hgomez
hgomez / upload2bintray.sh
Last active March 24, 2017 08:58
Sample script to upload RPM package to bintray
#!/bin/sh
#
# You should define BINTRAY_ACCOUNT and BINTRAY_APIKEY here or from the outside
# BINTRAY_ACCOUNT is you Bintray account and BINTRAY_APIKEY, API Key generated under your Bintray profile
# Redefine following variables to match your own usage
RPMS_DIR=RPMS/noarch
BINTRAY_ACCOUNT=hgomez
BINTRAY_REPO=devops-incubator-rpm
@mheffner
mheffner / README.md
Created October 3, 2012 18:11
Upload Travis CI builds to S3

Upload Travis CI builds to S3

This will demonstrate how to upload build files from Travis CI to S3.

NOTE: Keys have been changed to protect the innocent.

Step 1: Create an S3 policy.

Create an S3 ACL policy, see s3_policy.json for an example.

@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = [email protected]:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

<?xml version='1.0'?>
<!DOCTYPE service_bundle SYSTEM '/usr/share/lib/xml/dtd/service_bundle.dtd.1'>
<service_bundle type='manifest' name='jenkins/node'>
<service name='network/jenkins/node' type='service' version='0'>
<create_default_instance enabled='true'/>
<single_instance/>
<dependency name='fs' grouping='require_all' restart_on='none' type='service'>
<service_fmri value='svc:/system/filesystem/local'/>
</dependency>
<dependency name='net' grouping='require_all' restart_on='none' type='service'>
@manuelmorales
manuelmorales / capture.sh
Last active December 18, 2018 15:54
How to capture HTTP traffic with the command line using tshark, wireshark, socat and tcpdump
sudo emerge wireshark
sudo tshark tcp dst port 80
sudo tshark 'tcp dst port 80' -R'http.request.method == "GET"'
sudo tcpdump -i lo -s 1024 -l -A port 82
socat -vs UNIX-LISTEN:/tmp/a.sock,reuseaddr UNIX-CONNECT:/var/run/engineyard/unicorn_cirrus.sock
tcpdump -s0 dst host api.mixpanel.com