Skip to content

Instantly share code, notes, and snippets.


Keybase proof

I hereby claim:

  • I am mivok on github.
  • I am mharrison ( on keybase.
  • I have a public key ASCfJWlUVLhFoY8v54GZKu9DU7Fbs9jKqzNu3jqRsuSayQo

To claim this, I am signing this object:

View newcreds.rb
# Save this as ~/.chef/newcreds.rb
# Add require_relative 'newcreds' to your ~/.chef/knife.rb
require 'tomlrb'
require 'pathname'
context_file = "#{Dir.home}/.chef/context"
credentials_file = "#{Dir.home}/.chef/credentials"
context = if File.exist?(context_file)
profile_name = ENV["CHEF_PROFILE"] || context || "default"
View cookbooks_test_libraries_helpers.rb
module MockDeliverySugar
module DSL
def automate_chef_server
@automate_chef_server ||=
def load_delivery_chef_config
mivok / openvpn.conf
Last active Jun 30, 2016
Openvpn config
View openvpn.conf
# On the client only
# Increase this if you have multiple vpn servers on the same instance
port 1194
# Use tun1, tun2 and so on if you have multiple vpn servers on the same instance
dev tun1
# Note: these IP addresses are private to the VPN server and don't need to be recorded anywhere.
# They can be reused across different vpn servers as long as they aren't on the same machine.
mivok / foo.clj
Created Aug 20, 2015
Indexing multiple times
View foo.clj
(let [index (index)]
index ; Index everything to begin with
(where (<= 0 metric 5)
(with :state "ok" index)
(with :state "warning" index)))))
View kittychat.rb
#!/usr/bin/env ruby
# Sends cat pics to hipchat using either the hipchat api or kitty command
# Go to to get an API key and put
# it in '.api_token' in the same directory as this script.
# To send ascii cats you need the 'kitty' gem installed: gem install kitty
require 'hipchat'
require 'json'
mivok / colorFilter
Created Jun 21, 2009
Color hilighting for
View colorFilter
# Force gawk to behave posixly. Comment out if you get an error about
# no such option -W.
AWK_OPTIONS="-W posix"
if [ "$TODOTXT_PLAIN" -eq "0" ]; then
{ color = \"$DEFAULT\" }