Skip to content

Instantly share code, notes, and snippets.

@pburkholder
pburkholder / GoingAway.scpt
Created July 26, 2012 19:20
AppleScript for Away From Keyboard: Mark as away in HipChat and enable screensaver (Lock screen)
# Credit to Sean: http://ertw.com/blog/2012/05/02/controlling-hipchat-status-through-applescript/
# I link this to a Quicksilver trigger so I can press 'Shift-Option-L' when I Leave
tell application "System Events" to tell UI element "HipChat" of list 1 of process "Dock"
perform action "AXShowMenu"
delay 0.5
click menu item "Status" of menu 1
click menu item "Away" of menu 1 of menu item "Status" of menu 1
end tell
activate application "ScreenSaverEngine"
@pburkholder
pburkholder / example.rb
Created October 30, 2012 18:34
Stashboard API POST example
#!/usr/local/bin/ruby
#
require 'rubygems'
require 'oauth'
require 'json'
oauth_key = '1/xxxxxxxxxxxx'
oauth_secret = 'yyyyyyyyyy'
# Fill in your website
@pburkholder
pburkholder / gist:4090639
Created November 16, 2012 20:31
How to install mods on our Macbooks for 1.4.2
1) Quit minecraft
2) Download the mod. It should automatically unzip to the folder Downloads/(mod_name)/.
3) Open a finder window to Downloads/(mod_name)
4) Open another finder window to ~/Library/Application Support/minecraft/bin
In this window, left-click on 'minecraft-1.4.2.dir' and select 'Duplicate'. That will create 'minecraft-1.4.2.dir copy'
5) Copy all the files from Downloads/(mod_name)/ into minecraft-1.4.2.dir
@pburkholder
pburkholder / gist:4525949
Created January 13, 2013 20:12
Os X 10.6.8 32bit java with minecraft 1.4.7
---- Minecraft Crash Report ----
// I just don't know what went wrong :(
Time: 1/13/13 3:09 PM
Description: Failed to start game
java.lang.IllegalArgumentException: Slot 200 is already occupied by amq@6b04d3c8 when adding xolova.blued00r.divinerpg.blocks.BlockXolovonStone@9ec265c
at amq.<init>(Block.java:326)
at amq.<init>(Block.java:359)
at xolova.blued00r.divinerpg.blocks.BlockXolovonStone.<init>(BlockXolovonStone.java:14)
@pburkholder
pburkholder / gist:5824933
Created June 20, 2013 17:47
Error from vagrant provision
[2013-06-20T17:33:56+00:00] INFO: Storing updated cookbooks/metachef/.rspec in the cache.
[2013-06-20T17:33:56+00:00] INFO: Storing updated cookbooks/metachef/.watchr in the cache.
[2013-06-20T17:33:56+00:00] INFO: Storing updated cookbooks/metachef/Gemfile in the cache.
[2013-06-20T17:33:57+00:00] INFO: Storing updated cookbooks/metachef/metadata.json in the cache.
[2013-06-20T17:33:57+00:00] INFO: Storing updated cookbooks/metachef/metadata.rb in the cache.
[2013-06-20T17:33:57+00:00] INFO: Storing updated cookbooks/metachef/README.md in the cache.
================================================================================
Recipe Compile Error in /srv/chef/file_store/cookbooks/metachef/libraries/aspect.rb
================================================================================
@pburkholder
pburkholder / gist:5833738
Created June 21, 2013 19:35
Chef stops at ruby_block:
================================================================================
Recipe Compile Error in /srv/chef/file_store/cookbooks/monitor/recipes/master.rb
================================================================================
Chef::Exceptions::ResourceNotFound
----------------------------------
Cannot find a resource matching ruby_block[sensu_service_trigger] (did you define it first?)
@pburkholder
pburkholder / options_spec.rb
Last active December 20, 2015 08:59
This is a good example for my own reference demonstrating a few things with MixIns, Rspec, and OptionParse * Class Real gets the methods .hallo and .parse_options by dint of a MixIn (with include) * The spec context 'with include' show that the hallo method works w/o needing to be instantiated * The spec context 'with Real' shows how I can stub …
module MyModule
module Utils
def hallo(options)
if ( options[:verbose] )
'hallo'
else
'buzz_off'
end
end
#!/usr/bin/env ruby -wKU
#
# by Kelan Champagne
# http://yeahrightkeller.com
#
# A script to generate a personal podcast feed, hosted on Dropbox
#
# Inspired by http://hints.macworld.com/article.php?story=20100421153627718
#
# Simply put this, and some .mp3 or .m4a files in a sub-dir under your Dropbox
@pburkholder
pburkholder / install_gcalcli.sh
Created August 30, 2013 14:10
OS X quick install of gcalcli, the Google Calendar command line interface
#!/bin/sh
# assumes you have installed easy_install & brew
easy_install -O2 dateutils
easy_install --upgrade google-api-python-client
easy_install --upgrade python-gflags
git clone https://github.com/insanum/gcalcli.git
chmod +x gcalcli/gcalcli
@pburkholder
pburkholder / add_fcs_to_cal.sh
Last active December 22, 2015 00:39
Add Friends Community School entries to GCal with gcalcli
#!/bin/sh -e
cal='Hill-Burkholder'
function add_entry() {
while read line; do
echo Adding entry to $cal: $line;
echo ./gcalcli quick --calendar $cal "$line";
done
}