Skip to content

Instantly share code, notes, and snippets.

View curiositycasualty's full-sized avatar
🗺️
Internet Explorer

Isa Farnik curiositycasualty

🗺️
Internet Explorer
View GitHub Profile
#
# platform()
#
# Determine and return the current
# platform. Optionally return only the
# OS name with -o/--OS, or only the
# version with -v/--version.
#
function platform_ingestor() {
local argv="$@";
@curiositycasualty
curiositycasualty / .zshrc
Last active August 29, 2015 14:07
iTerm/OSA functions
# use applescript to activate an application by name
function activate() {
app=$1;
echo "tell application \"$app\" to activate" | osascript;
}
# use applescript open a new iTerm (horizontal) pane with a given command to run as an argument
function new_hpane() {
cmd=$1;
activate "iTerm";
echo "tell application \"System Events\" to tell process \"iTerm\" to keystroke \"d\" using {command down, shift down}\ntell application \"System Events\" to tell process \"iTerm\" to keystroke \"$cmd\"\ntell application \"System Events\" to tell process \"iTerm\" to key code 52" | osascript;

YELLY!!!!! THE YELLINGIST FORMATTER EVER!!!!!

Yelly likes to yell. To make the magic happen for simple cases just invoke him ala:

bundle exec rspec --require=yelly_the_yellingist_formatter.rb --format=YellyTheYellingistFormatter spec/models/your_file_here_spec.rb

In closing, >:O

Updated to Rspec 3.0's formatter interface.

@curiositycasualty
curiositycasualty / client.rb
Created August 5, 2014 21:52
Custom Generic Event Subscriber
log_location STDOUT
chef_server_url "https://isa-ec11-0-2-allitnil.opscode.us/organizations/allitnil"
validation_client_name "allitnil-validator"
# Using default node name (fqdn)
# can also be started using chef_handler more info at http://docs.getchef.com/handlers.html#run-from-client-rb
require '/etc/chef/foo'
event_handlers << YaySubscriber.new
@curiositycasualty
curiositycasualty / 0_reuse_code.js
Created May 15, 2014 19:08
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console