Skip to content

Instantly share code, notes, and snippets.

Jerzy J. Gangi jerzygangi

Block or report user

Report or block jerzygangi

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
@jerzygangi
jerzygangi / install.sh
Last active Sep 3, 2017
Install Seashell
View install.sh
sudo yum -y install git && git clone https://github.com/jerzygangi/seashell.git && ./seashell/commands/install_seashell
@jerzygangi
jerzygangi / gist:76714b9ca7e28ea525fc
Created May 31, 2015
How to get the current Bitcoin price from a JSON API
View gist:76714b9ca7e28ea525fc
require "rubygems"
require "json"
require "net/http"
response = Net::HTTP.get_response(URI.parse("https://api.bitcoinaverage.com/exchanges/USD"))
parsed_response = JSON.parse(response.body)
puts parsed_response["bitex"]["rates"]["last"]
View gist:352736500f45db383142
require "rubygems"
require "json"
require "net/http"
response = Net::HTTP.get_response(URI.parse("https://api.bitcoinaverage.com/exchanges/USD"))
puts response.body
puts JSON.parse(response.body)
@jerzygangi
jerzygangi / gist:46ea0aa5e4240938e05a
Created Oct 26, 2014
This is the pip.log in ~/Library/Logs/pip.log
View gist:46ea0aa5e4240938e05a
Downloading/unpacking git+https://github.com/nyddle/pystash.git
Cloning https://github.com/nyddle/pystash.git to /var/folders/ds/vq3d_chn7273nfg4gnt1xylh0000gn/T/pip-iA9Uf0-build
Found command 'git' at '/usr/local/bin/git'
Running command /usr/local/bin/git clone -q https://github.com/nyddle/pystash.git /var/folders/ds/vq3d_chn7273nfg4gnt1xylh0000gn/T/pip-iA9Uf0-build
Running setup.py (path:/var/folders/ds/vq3d_chn7273nfg4gnt1xylh0000gn/T/pip-iA9Uf0-build/setup.py) egg_info for package from git+https://github.com/nyddle/pystash.git
running egg_info
creating pip-egg-info/pystash.egg-info
writing requirements to pip-egg-info/pystash.egg-info/requires.txt
writing pip-egg-info/pystash.egg-info/PKG-INFO
writing top-level names to pip-egg-info/pystash.egg-info/top_level.txt
@jerzygangi
jerzygangi / gist:4e329e332c0a1da649e8
Created Oct 26, 2014
This is the shell session output from when I ran pip install --upgrade git+https://github.com/nyddle/pystash.git
View gist:4e329e332c0a1da649e8
jerzys-mbp:~ jerzy$ pip install --upgrade git+https://github.com/nyddle/pystash.git
Downloading/unpacking git+https://github.com/nyddle/pystash.git
Cloning https://github.com/nyddle/pystash.git to /var/folders/ds/vq3d_chn7273nfg4gnt1xylh0000gn/T/pip-iA9Uf0-build
Running setup.py (path:/var/folders/ds/vq3d_chn7273nfg4gnt1xylh0000gn/T/pip-iA9Uf0-build/setup.py) egg_info for package from git+https://github.com/nyddle/pystash.git
Requirement already up-to-date: args>=0.1.0 in /Library/Python/2.7/site-packages (from pystash==0.0.14)
Downloading/unpacking clint>=0.3.3 from https://pypi.python.org/packages/source/c/clint/clint-0.4.1.tar.gz#md5=d0a0952bfcc5f4c5e03c36854665b298 (from pystash==0.0.14)
Downloading clint-0.4.1.tar.gz
Running setup.py (path:/private/var/folders/ds/vq3d_chn7273nfg4gnt1xylh0000gn/T/pip_build_jerzy/clint/setup.py) egg_info for package clint
@jerzygangi
jerzygangi / console.log
Created May 6, 2014
'vagrant up' console log
View console.log
PACCPL-334RAGYA:preppervms jgangi001c$ vagrant up
Bringing machine 'servera' up with 'virtualbox' provider...
Bringing machine 'serverb' up with 'virtualbox' provider...
Bringing machine 'serverc' up with 'virtualbox' provider...
==> servera: Importing base box 'hashicorp/precise32'...
==> servera: Matching MAC address for NAT networking...
==> servera: Checking if box 'hashicorp/precise32' is up to date...
==> servera: Setting the name of the VM: preppervms_servera_1399389393651_15907
==> servera: Clearing any previously set network interfaces...
==> servera: Preparing network interfaces based on configuration...
@jerzygangi
jerzygangi / Vagrantfile
Created May 6, 2014
Trying to configure multi-machine, where each machine has it's own SSH IP and port
View Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "hashicorp/precise32"
@jerzygangi
jerzygangi / oftobeeminder.rb
Created Oct 29, 2013
This is the ruby file called by called_by_launchd.sh
View oftobeeminder.rb
`touch /Users/jerzy/Desktop/_gottoa` #this does nothing
@jerzygangi
jerzygangi / called_by_launchd.sh
Created Oct 29, 2013
Launchd calls this file
View called_by_launchd.sh
$rvm_path/wrappers/oftobeeminder/ruby /Users/jerzy/Desktop/oftobeeminder.rb
@jerzygangi
jerzygangi / launchd_with_rvm
Created Oct 29, 2013
The beginning of a script that will be called by launchd (similar to cron on OS X). Currently, type rvm | head -1 is not returning the expected value. If I try and run a ruby file from here, it is not using the rvm ruby.
View launchd_with_rvm
# Load RVM into a shell session *as a function*
if [[ -s "$HOME/.rvm/scripts/rvm" ]] ; then
# First try to load from a user install
source "$HOME/.rvm/scripts/rvm"
elif [[ -s "/usr/local/rvm/scripts/rvm" ]] ; then
# Then try to load from a root install
source "/usr/local/rvm/scripts/rvm"
You can’t perform that action at this time.