Skip to content

Instantly share code, notes, and snippets.

Working from home

Mike Fiedler miketheman

Working from home
View GitHub Profile
kky /
Created Jun 25, 2015
Make OSX app from url
echo "What should the Application be called (no spaces allowed e.g. GCal)?"
read inputline
echo "What is the url (e.g."
read inputline
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")
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
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'])
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
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
ranjib /
Last active Dec 19, 2015
DataDog Based Realtime Chef monitoring

Chef 11 introduces event dispatching mechanism, which emits event at different milestones in Chef run (aka lifecycle) , and users can add their custom handlers to hook into these events. Chef formatters already uses this API. For a complete list of currently available events check this

Following is a bare minimal example for adding a custom handler:


require 'chef/event_dispatch/base'
class Foo < Chef::EventDispatch::Base
  # lets say hello world when chef run ends
  def run_completed(node)
jedi4ever /
Last active Jan 4, 2016
Datadog Feedback 24/01/2014

@datadoghq - Overall well done! Here's some feedback:

Signup/User process

  • when someone invites you to their datadog/team, you get an email but because you are already registered you can't join their team. Especially annoying for freelancers that work for multiple customers but don't have an email account at the customer site
  • disable a user is scary (will this delete it, can I re-create it?); a warning or ? next to it would help for fast understanding
  • if the user you invite does not have it's gmail activated yet (google for apps), when the email is added it's send out (but doesn't reach it of course). There is no way of re-sending the invite from the admin side
  • the forcing of registering at least one agent/integration is really annoying. if you signup through an ipad or the person signing up (like billing) does not have any way to go past that screen. So you wonder , am I registered or not? In our case the person installed the mac agent from it's laptop to get it going. No need for that imho
  • when
mastrolinux / init.sls
Created Aug 7, 2013
A saltstack state for datadog agent installation
View init.sls
- managed
- humanname: "DataDog Agent"
- name: deb unstable main
- keyserver:
- keyid: C7A7DA52
- file: /etc/apt/sources.list.d/datadog.list
fnichol /
Last active Jan 20, 2019
(Excellent?) Format Changes to Test Kitchen's kitchen.yml

Format Changes to Test Kitchen's kitchen.yml File

This is happening thanks to a refactoring of the data manipulation code formerly in Kitchen::Config.

There are now 3 main configuration blocks that can be placed in the various levels:

  • driver: Configurtation relavent to Kitchen drivers. This is a combination of what was driver_plugin and driver_config. Backwards compatability is guarenteed with the legacy formats for a time, then will be deprecated (with a warning when encountered), then will be removed in a future release.
  • provisioner: Configuration relating to the automation tool being used. Currently supporting "chef_solo" and "chef_zero". Previously several Chef-related config paths were dumped in a Suite block, namely data_path, data_bags_path, environments_path, nodes_path, roles_path, etc. These will be supported for backwards compatability, then will be deprecated (with a warning when encountered), then will be removed in a future release.
  • busser: Configuration rela