Skip to content

Instantly share code, notes, and snippets.

begin
raise 'example'
rescue Exception => exception
if defined? ::NewRelic
::NewRelic::Agent.notice_error(exception)
end
end
@samg
samg / osx.sh
Created April 4, 2012 04:41 — forked from rfunduk/osx.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with useful tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2263406/osx.sh | sh
#
* keep people working on internal projects, assign and schedule the work
* dont look desperate, dont have immediate availability
* can tell a client you can 'shuffle internal projects' to accomodate them
* online ads dont work well
* referrals instead
* do a great job every single time
* voice calls important
* when people call you call them back
require 'open3'
describe 'my_script' do
def run *args
options = args.extract_options!
args.unshift './my_script'
out = err = ''
Open3.popen3(args.join(' ')) do |i, o, e|
i.write options[:stdin]