Skip to content

Instantly share code, notes, and snippets.

View likethesky's full-sized avatar

Bradford Cottel likethesky

View GitHub Profile
@likethesky
likethesky / python history.txt
Created July 27, 2019 18:25
Python history and its package manager(s)
Homebrew Community Discussions
https://discourse.brew.sh/t/multiple-config-scripts-and-potential-homebrew-software-installation-confusion/4921/11
fish2000
Alexander Böhn
2019 Jun 4
@likethesky
likethesky / elixirphoenix.bash
Last active June 7, 2024 17:26
Installing Elixir & the Phoenix framework with Homebrew on OS X
$ 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: http://www.phoenixframework.org/docs/installation -- currently this is 1.0.3
# ** Answer y to any Qs **
$ mix archive.install https://github.com/phoenixframework/phoenix/releases/download/v1.0.3/phoenix_new-1.0.3.ez
@likethesky
likethesky / gist:9077812
Created February 18, 2014 19:15
rvm bug: doesn't use Gemfile 'ruby' line specifying JRuby correctly (w/install_on_use_flag=1)
$ 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 ]
def __setup
@@clients ||= SUPPORTED_SERVICES.inject({}) do |memo, service_name|
memo.merge({ service_name => __client(service_name) })
end
end
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/JavaInterfaceTemplate.java:387
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/RubyKernel.java:1054
(root) at /Users/brad/git/thrift-utils-gem/lib/thrift-client/gen-rb/product_types.rb:1
require at org/jruby/RubyKernel.java:1054
@likethesky
likethesky / gist:6117832
Created July 30, 2013 23:02
Compare local amended commit with gerrit commit (to see if you want to toss your local amend, perhaps)
# Grab a Gerrit "checkout" URL, substituting "git diff" for "git checkout" at the end of the URL, as in:
git fetch http://gerrit.yourcompany.com:8080/p/apps/wize refs/changes/19/18919/4 && git diff FETCH_HEAD
@likethesky
likethesky / lsof
Created July 25, 2013 20:09
Determine what's on a port
lsof -i :<port number> e.g.,
$ lsof -i :3000
$ sudo ls -latr /private/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/Cleanup\ At\ Startup/PKInstallSandbox-tmp/Root/Library/Printers/hp/Utilities/HP\ Utility.app/Contents/Resources
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\ Utility.app/Contents/Resources/ko.lproj
total 0
@likethesky
likethesky / gist:4262178
Created December 11, 2012 21:13
addressable gem dependency not bundled
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
likethesky / index.html.haml
Created November 5, 2012 21:31
Cantango Demo -- goes in public/index.html of cantango_demo
%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)
%br
%br
%td= link_to("Admin home", admin_dashboard_path)