This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.======. | |
| INRI | | |
| | | |
| | | |
.========' '========. | |
| _ xxxx _ | | |
| /_;-.__ / _\ _.-;_\ | | |
| `-._`'`_/'`.-' | | |
'========.`\ /`========' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Spec::Matchers.define :be_displaying_alert do | |
match do |actual| | |
class_name = begin | |
actual.driver.browser.switch_to.alert.class | |
rescue => exception | |
exception.class | |
end | |
class_name == Selenium::WebDriver::Alert | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defaults write com.apple.dock no-glass -boolean YES; killall Dock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
setopt No_X_Trace; | |
setopt No_Verbose; | |
if ! type redisplay 2>/dev/null 1>/dev/null; then | |
declare -x PS1 | |
declare -x PS2; | |
declare -x PS3; | |
declare -x PS4; | |
setopt Prompt_Percent |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'open-uri' | |
open("http://icanhazip.com/").read.strip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# tiny success: http://bit.ly/RhpepU | |
# osx specific, mpg123 or the like for linux | |
nmap HH :silent ! afplay /Users/nat/.vim/audio/succ_horns01.mp3 1>&-2>&-&<CR><C-l> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'rest-client' | |
require 'json' | |
# | |
# get all users in a program | |
# | |
client_id = 1069416700 | |
client_api_key = 'b26420242ff0a48b192ddc4fa3e4ac96' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<domain type='kvm' id='22'> | |
<name>freebsd</name> | |
<uuid>edfc5177-de28-3f69-7da8-a18f90b10a9c</uuid> | |
<memory unit='KiB'>2097152</memory> | |
<currentMemory unit='KiB'>2097152</currentMemory> | |
<vcpu placement='static'>2</vcpu> | |
<os> | |
<type arch='x86_64' machine='pc-1.1'>hvm</type> | |
<boot dev='hd'/> | |
</os> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace :roles do | |
desc 'dump roles defined in the Ruby DSL to json' | |
task :dump do | |
destination_dir = File.join(TOPDIR, '.chef', 'chef_server_backup') | |
files_paths = Dir["#{TOPDIR}/roles/*.rb"] | |
files_paths.each do |filename| | |
role_name = File.basename(filename, '.rb') | |
role = Chef::Role.new |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
command_exists () { | |
type "$1" &> /dev/null ; | |
} | |
system_name="`uname -s`" | |
if [ "$system_name" == "Darwin" ] | |
then |