Skip to content

Instantly share code, notes, and snippets.

View likethesky's full-sized avatar

Bradford Cottel likethesky

View GitHub Profile
@likethesky
likethesky / lsof
Created July 25, 2013 20:09
Determine what's on a port
lsof -i :<port number> e.g.,
$ lsof -i :3000
@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
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
def __setup
@@clients ||= SUPPORTED_SERVICES.inject({}) do |memo, service_name|
memo.merge({ service_name => __client(service_name) })
end
end
@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 / gist:3559671
Last active December 28, 2020 20:44
find: Usage of Unix find command
find . -name '*lookingfor*' -print
-or-
find /path/you/want/to/start/in -name '*.rb' -print
-or-
# On OS X (searched indexed spotlight files, both user & system):
@likethesky
likethesky / elixirphoenix.bash
Last active January 5, 2022 10:00
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:3559639
Created August 31, 2012 21:50
Rebuild MBR partition on USB key