Skip to content

Instantly share code, notes, and snippets.

Bradford Cottel likethesky

Block or report user

Report or block likethesky

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
likethesky / python history.txt
Created Jul 27, 2019
Python history and its package manager(s)
View python history.txt
Homebrew Community Discussions
Alexander Böhn
2019 Jun 4
likethesky / elixirphoenix.bash
Last active Mar 22, 2019
Installing Elixir & the Phoenix framework with Homebrew on OS X
View elixirphoenix.bash
$ brew update && brew doctor # Repeat, until you've done *all* the Dr. has ordered!
$ brew install postgresql # You'll need postgres to do this... you may also need to 'initdb' as well. Google it.
$ brew install elixir
$ mix local.hex # Answer y to any Qs
$ createuser -d postgres # create the default 'postgres' user that Chris McCord seems to like -- I don't create mine w/a pw...
# Use the latest Phoenix from here: -- currently this is 1.0.3
# ** Answer y to any Qs **
$ mix archive.install
likethesky / gist:9077812
Created Feb 18, 2014
rvm bug: doesn't use Gemfile 'ruby' line specifying JRuby correctly (w/install_on_use_flag=1)
View gist:9077812
$ rvm list
rvm rubies
jruby-1.7.10 [ x86_64 ]
jruby-1.7.2 [ x86_64 ]
jruby-1.7.3 [ x86_64 ]
jruby-1.7.4 [ x86_64 ]
jruby-1.7.6 [ x86_64 ]
jruby-1.7.8 [ x86_64 ]
View gist:7128824
def __setup
@@clients ||= SUPPORTED_SERVICES.inject({}) do |memo, service_name|
memo.merge({ service_name => __client(service_name) })
View gist:6143675
file:/Users/brad/.rvm/rubies/jruby-1.7.4/lib/jruby.jar!/jruby/java/core_ext/object.rb:73 warning: already initialized constant Set
Unable to load thrift_native extension. Defaulting to pure Ruby libraries.
ArgumentError: wrong number of arguments calling `initialize` (1 for 0)
new at org/jruby/java/proxies/
TimeWindowSize at /Users/brad/git/thrift-utils-gem/lib/thrift-client/gen-rb/scoring_types.rb:15
Product_service at /Users/brad/git/thrift-utils-gem/lib/thrift-client/gen-rb/scoring_types.rb:10
(root) at /Users/brad/git/thrift-utils-gem/lib/thrift-client/gen-rb/scoring_types.rb:9
require at org/jruby/
(root) at /Users/brad/git/thrift-utils-gem/lib/thrift-client/gen-rb/product_types.rb:1
require at org/jruby/
likethesky / gist:6117832
Created Jul 30, 2013
Compare local amended commit with gerrit commit (to see if you want to toss your local amend, perhaps)
View gist:6117832
# Grab a Gerrit "checkout" URL, substituting "git diff" for "git checkout" at the end of the URL, as in:
git fetch refs/changes/19/18919/4 && git diff FETCH_HEAD
likethesky / lsof
Created Jul 25, 2013
Determine what's on a port
View lsof
lsof -i :<port number> e.g.,
$ lsof -i :3000
View gist:4580335
$ sudo ls -latr /private/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/Cleanup\ At\ Startup/PKInstallSandbox-tmp/Root/Library/Printers/hp/Utilities/HP\
total 0
drwxr-xr-x 3 root admin 102 Jan 11 10:47 ko.lproj
drwxr-xr-x 3 root admin 102 Jan 11 11:14 ..
drwxr-xr-x 3 root admin 102 Jan 11 11:14 .
# Which leads to:
$ sudo ls -latr /private/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/Cleanup\ At\ Startup/PKInstallSandbox-tmp/Root/Library/Printers/hp/Utilities/HP\
total 0
likethesky / gist:4262178
Created Dec 11, 2012
addressable gem dependency not bundled
View gist:4262178
My bundle aliases:
b = bundle
be = b exec
bi = b install --path vendor
bu = b update
bil = bi --local
binit = bi && b package --all && echo "vendor/ruby" >> .gitignore
# Note: my comments are in [#square brackets like this]
likethesky / index.html.haml
Created Nov 5, 2012
Cantango Demo -- goes in public/index.html of cantango_demo
View index.html.haml
%h1 Welcome to the CanTango Demo
%td= link_to("Home", root_path)
%td= link_to("Sign in", new_user_session_path)
%td= link_to("Sign up", new_user_registration_path)
%td= link_to("Sign out", destroy_user_session_path, :method => :delete)
%td= link_to("User forgot password", new_user_password_path)
%td= link_to("Admin home", admin_dashboard_path)
You can’t perform that action at this time.