Skip to content

Instantly share code, notes, and snippets.

Topper Bowers tobowers

Block or report user

Report or block tobowers

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:8453
Message = MBX.JsModel.create("Message", {
iAmAClassAttribute: '',
instanceMethods: {
defaults: {
content: "I'm default content"
iAmAnInstanceMethod: function () {
beforeCreate: function () {},
View gist:397354
require 'rubygems'
gem 'zookeeper'
require 'zookeeper'
class EventHandler
import org.apache.zookeeper.Watcher
View OSMF player embed with <video> fallback
<object width="600" height="409">
<param name="movie" value=""></param>
<param name="flashvars" value=""></param>
<param name="allowFullScreen" value="true"></param>
<param name="allowscriptaccess" value="always"></param>
<embed src="" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="600" height="409" flashvars="">
<video src="" controls="controls" height="409" width="600">
Your browser does not support Flash *or* html5 video.
View big ints in mongodb?
ruby-1.8.7-p334 :022 > col.update({:_id => id}, {:test => 0})
=> 105
ruby-1.8.7-p334 :023 > col.update({:_id => id}, {"$inc" => {:test => 7599434616}})
=> 120
ruby-1.8.7-p334 :024 > col.find({:_id => id}).first
=> {"_id"=>BSON::ObjectId4dac55a85fedbd37dd000001, "test"=>-990499976}
ruby-1.8.7-p334 :025 > col.update({:_id => id}, {:test => 0})
=> 105
ruby-1.8.7-p334 :028 > col.update({:_id => id}, {"$inc" => {:test => 7599434616.0}})
=> 120
View gist:959701
In December 1995, American Airlines Flight 965 departed from Miami on a regularly scheduled trip to Cali, Columbia. On the landing approach, the pilot of the 757 needed to select the next radio-navigation fix, named "ROZO." He entered an "R" into his navigation computer. The computer returned a list of nearby navigation fixes starting with "R," and the pilot selected the first of these, whose latitude and longitude appeared to be correct. Unfortunately, instead of "ROZO," the pilot selected "ROMEO," 132 miles to the northeast. The jet was southbound, descending into a valley that runs north–south, and any lateral deviation was dangerous. Following indications on the flight computer, the pilot began an easterly turn and slammed into a granite peak at 10,000 feet. One hundred and fifty-two passengers and all eight crewmembers aboard perished. Four passengers survived with serious injuries. The National Transportation Safety Board investigated, and—as usual—declared the problem human error. The navigational aid
tobowers / gist:962853
Created May 9, 2011
/dev/log rotation error
View gist:962853
2011-04-14_19:53:04.75667 Traceback (most recent call last):
2011-04-14_19:53:04.75669 File "/usr/local/bin/swift-object-server", line 7, in <module>
2011-04-14_19:53:04.75670 execfile(__file__)
2011-04-14_19:53:04.75670 File "/mbox/apps/openstack-swift/bin/swift-object-server", line 22, in <module>
2011-04-14_19:53:04.75671 run_wsgi(conf_file, 'object-server', default_port=6000, **options)
2011-04-14_19:53:04.75671 File "/mbox/apps/openstack-swift/swift/common/", line 116, in run_wsgi
2011-04-14_19:53:04.75677 log_to_console=kwargs.pop('verbose', False))
2011-04-14_19:53:04.75677 File "/mbox/apps/openstack-swift/swift/common/", line 403, in get_logger
2011-04-14_19:53:04.75681 get_logger(conf, name, log_to_console, log_route='root')
2011-04-14_19:53:04.75682 File "/mbox/apps/openstack-swift/swift/common/", line 428, in get_logger
View gist:1095774
We see fairly high infant mortality on the hard drives deployed in brand new pods, so we like to burn the pods in for a few days before storing any customer data. We have yet to see any drives die because of old age, which will be fascinating to monitor in the next few years.
View gist:1790392
st = status
d = diff
ci = commit -v
cia = commit -v -a
co = checkout
cp = cherry-pick
l = log
ll = log -p
lt = log trunk..
View gist:2489522
s ={
jruby-1.6.7 :006 > :aws_access_key_id => S3_CREDS[:access_key],
jruby-1.6.7 :007 > :aws_secret_access_key => S3_CREDS[:secret_access_key],
jruby-1.6.7 :008 > :persistent => false
jruby-1.6.7 :009?> })
=> #<Fog::Storage::AWS::Real:... [redacted] >
jruby-1.6.7 :010 > s.directories.get('amicus-users')
Excon::Errors::SocketError: write would raise
from org/jruby/ext/openssl/ `syswrite_nonblock'
from /Users/topper/.rvm/gems/jruby-1.6.7@global/gems/jruby-openssl- `write_nonblock'
View gist:2644853
function parse_git_branch {
ref=$(git symbolic-ref HEAD 2> /dev/null) || return
echo "("${ref#refs/heads/}")"
PS1="$RED\$(date +%H:%M) \w$YELLOW \$(parse_git_branch)$GREEN\$ "
You can’t perform that action at this time.