Skip to content

Instantly share code, notes, and snippets.

Working from home

Mike Fiedler miketheman

Working from home
View GitHub Profile
tobert / sysctl.conf
Created Jun 14, 2013
sysctl.conf from #cassandra13
View sysctl.conf
net.ipv6.conf.all.disable_ipv6 = 1
kernel.sysrq = 1
kernel.panic = 300
fs.file-max = 1048576
kernel.pid_max = 999999
net.core.rmem_max = 16777216
net.core.wmem_max = 16777216
net.ipv4.tcp_rmem = 4096 65536 16777216
nzakas / gist:5511916
Created May 3, 2013
Using GitHub inside a company
View gist:5511916

I'm doing some research on how companies use GitHub Enterprise (or public GitHub) internally. If you can help out by answering a few questions, I'd greatly appreciate it.

  1. What is the primary setup? Is there an organization and each official repo is owned by that organization?
  2. Does every engineer have a fork of each repo they're working on?
  3. Are engineers allowed to push directly to the official repo? Or must all commits go through a pull request?
  4. Do engineers work on feature branches on the main repo or on their own forks?
  5. Do you require engineers to squash commits and rebase before merging?
  6. Overall, what is the workflow for getting a new commit into the main repository?
  7. What sort of hooks do you make use of?
  8. Are there any ops issues you encountered? (Scaling, unforeseen downtime, etc.)
fnichol /
Created Apr 23, 2013
Test Kitchen with bats - A Lightning Guide
# create a bats subdirectory under your desired suite
mkdir -p test/integration/$SUITE_NAME/bats
# create an initial "canary" bats test file
# more examples at:
# *
# *
# *
jayjanssen / gist:4039319
Created Nov 8, 2012
sysctl tuning for HAproxy
View gist:4039319
net.core.somaxconn = 32768
net.ipv4.conf.all.send_redirects = 1
net.ipv4.ip_nonlocal_bind = 1
net.ipv4.tcp_abort_on_overflow = 0
net.ipv4.tcp_fin_timeout = 10
net.ipv4.tcp_keepalive_time = 300
net.ipv4.tcp_max_orphans = 262144
net.ipv4.tcp_max_syn_backlog = 16384
net.ipv4.tcp_max_tw_buckets = 262144
net.ipv4.tcp_mem = 200000    280000    300000
View cassandra.yaml
# save some memory on indexes
index_interval: 512
# this can hurt your read latency, but in my experience it's better to stay caught up
compaction_throughput_mb_per_sec: 0
# if you have lots & lots of connections, e.g. from Hadoop, saves memory
rpc_server_type: hsha
View custom_event.rb
require 'rubygems'
require 'dogapi'
# Create a simple client
# The host is optional here, it's a shortcut to tie event and metrics to a given host
# You typically want to do:
#, ...)
# We are using ENV to let you experiment via an environment variable.
dog =['DATADOG_KEY'])
jtimberman / gist:3399547
Created Aug 20, 2012
knife community release plugin
View gist:3399547

This is idea brainstorming for a community plugin for releasing cookbooks per Opscode's current process. This would replace the functionality of the "cookbook site share" plugin that is built into Chef, as I believe the cookbook site plugins should use "community" rather than "cookbook site" and be a separate plugin instead of built into Chef and tied to its release cycle.

knife community release COOKBOOK VERSION

Assumes that the repository is release ready, e.g., the current HEAD is the commit that should be released, CHANGELOG is updated already, etc.

  1. sets metadata version to the specified VERSION
  2. makes a git commit with the release VERSION in the metadata
  3. creates a git tag with the bare version, e.g. "1.0.1" not "v1.0.2"
  4. pushes to the opscode (or other upstream as apropos) master branch, takes --remote argument as alternate, and pushes git tags
fujin / graphdeps.rb
Created Nov 29, 2011 — forked from rottenbytes/graphdeps.rb
Graph your cookbooks deps
View graphdeps.rb
#!/usr/bin/env ruby
output = "./"
puts "Running on #{cbdir}..."
cb_meta = Dir.glob("#{cbdir}/*/metadata.rb"),"w")
mitchellh / gist:1277049
Created Oct 11, 2011
Configure Vagrant VM to use Host DNS for VPN
View gist:1277049 do |config|
# ...
config.vm.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
schacon / gist:942899
Created Apr 26, 2011
delete all remote branches that have already been merged into master
View gist:942899
$ git branch -r --merged |
grep origin |
grep -v '>' |
grep -v master |
xargs -L1 |
awk '{split($0,a,"/"); print a[2]}' |
xargs git push origin --delete