Skip to content

Instantly share code, notes, and snippets.

View fujin's full-sized avatar

AJ Christensen fujin

  • Rotorua, New Zealand
View GitHub Profile
@fnichol
fnichol / README.md
Last active August 6, 2022 20:29
Testing on Mac Platforms with Test Kitchen

Testing Mac Platforms with Test Kitchen

We'll assume an OS X Mavericks (10.9) box here.

Requirements

You'll need:

  • Vagrant
  • Vagrant's VMware Fusion provider
@fnichol
fnichol / README.md
Last active April 27, 2023 15:24
Auto-enable Local HTTP Caching in Test Kitchen

Auto-enable Local HTTP Caching in Test Kitchen

Note: total experiment and hack, looks nasty, could be awesome:

Setup

  • Drop the kitchen.local.yml into $HOME/.kitchen/config.yml
  • Install polipo (with Mac: brew install polipo, with Ubuntu: apt-get install polipo)
  • Drop polipo-start and polipo-console somewhere useful (perhaps $HOME/bin?)
@dimitri
dimitri / gist:6031799
Last active July 27, 2020 13:12
Emacs Workshop for first time users discovering Emacs, file in org-mode format.
* An Emacs Workshop for Beginners
It's all about discovering Emacs Really
** Install
*** Emacs 24.3
http://emacsformacosx.com/
http://emacs.naquadah.org/
http://ftp.gnu.org/pub/gnu/emacs/windows/
** Conventions and docs
function table() {
case "$1" in
flip)
echo "(╯°□°)╯︵ ┻━┻ "
;;
set)
echo "┬─┬ ノ( ゜-゜ノ)"
;;
man)
echo "(╯°Д°)╯︵ /(.□ . \)"
@nstielau
nstielau / client.sh
Created September 27, 2012 23:22
Sensu Push Example
echo '{
"handlers": ["debug"],
"name": "push_woot_test",
"output": "woot!",
"status": 0
}' | nc -w1 127.0.0.1 3030
@danielsdeleo
danielsdeleo / gist:3063064
Created July 6, 2012 22:17
Knife Role Tree example output
ddeleo@boltzmann chef git:(master)> bin/knife role tree $node_name
top level
|-role[preprod]
| |-recipe[network]
| |-recipe[splunk42]
|-role[mysql-master]
| |-role[base]
| | |-role[platform-annoyances]
| | | |-recipe[platform-specific]
| | | |-recipe[selinux::disabled]
@fujin
fujin / graphdeps.rb
Created November 29, 2011 02:41 — forked from rottenbytes/graphdeps.rb
Graph your cookbooks deps
#!/usr/bin/env ruby
cbdir=ARGV[0]
output = "./deps.dot"
puts "Running on #{cbdir}..."
cb_meta = Dir.glob("#{cbdir}/*/metadata.rb")
fp=File.open(output,"w")
@rottenbytes
rottenbytes / graphdeps.rb
Created September 6, 2011 07:23
Graph your cookbooks deps
#!/usr/bin/env ruby
cbdir=ARGV[0]
output = "./deps.dot"
puts "Running on #{cbdir}..."
cb_meta = Dir.glob("#{cbdir}/*/metadata.rb")
fp=File.open(output,"w")
@jtimberman
jtimberman / gist:1040853
Created June 22, 2011 19:07
Ohai plugin to return semantic reference attributes for network addresses
# This might not work on newer (than 0.10.6) versions of Chef.
# Thanks for pointing to my new gist, spkane :)
# https://gist.github.com/1040543
require 'rubygems'
require 'ohai'
o = Ohai::System.new()
o.all_plugins
@skeptomai
skeptomai / http-twiddle.el
Created May 19, 2011 21:37
Sending signed requests to the Opscode Platform with Emacs and http-twiddle-mode
;;; http-twiddle.el -- send & twiddle & resend HTTP requests
;; This program belongs to the public domain.
;; Author: Luke Gorrie <luke@synap.se>
;; Maintainer: Hasan Veldstra <h@vidiowiki.com>
;; Created: 1 Feb 2006
;; Adapted-By: Hasan Veldstra
;; Adapted-By: Christopher Brown <cb@opscode.com>
;; Version: 1.0