Skip to content

Instantly share code, notes, and snippets.

View smaboshe's full-sized avatar

Silumesii Maboshe smaboshe

View GitHub Profile
@smaboshe
smaboshe / gist:1308960
Created October 24, 2011 12:59
RVM Fails to install Ruby 1.8.7 on a PowerBook G4
$ rvm version
rvm 1.8.6 by Wayne E. Seguin <<<DETAILS EDITED OUT>>>
$ rvm --trace install 1.8.7
+ /scripts/cli : __rvm_parse_args() 681 > [[ -n '' ]]
+ /scripts/cli : __rvm_parse_args() 682 > export 'PS4=+ ${BASH_SOURCE##${rvm_path:-}} : ${FUNCNAME[0]:+${FUNCNAME[0]}()} ${LINENO} > '
+ /scripts/cli : __rvm_parse_args() 682 > PS4='+ ${BASH_SOURCE##${rvm_path:-}} : ${FUNCNAME[0]:+${FUNCNAME[0]}()} ${LINENO} > '
+ /scripts/cli : __rvm_parse_args() 709 > [[ -z '' ]]
+ /scripts/cli : __rvm_parse_args() 709 > [[ -n '' ]]
@smaboshe
smaboshe / sites.md
Created October 28, 2011 06:38
Sites I suddenly cannot access with MTN mobile Internet (Zambia)
@smaboshe
smaboshe / gist:1336007
Created November 3, 2011 07:55
Useful Resources for Learning Git
@smaboshe
smaboshe / gist:1341112
Created November 5, 2011 04:33
rvm get head
$ rvm get head
Original installed RVM version:
rvm 1.9.2 by Wayne E. Seguin (REDACTED) [https://rvm.beginrescueend.com/]
Fetching origin
remote: Counting objects: 179, done.
remote: Compressing objects: 100% (40/40), done.
remote: Total 108 (delta 80), reused 94 (delta 66)
@smaboshe
smaboshe / Capfile
Created November 11, 2011 07:10
Rails 3.1.x application Capistrano deployment recipe
load "deploy" if respond_to?(:namespace) # cap2 differentiator
DEPLOYMENT_CONFIG = YAML.load_file("./config/config.yml")["production"]
# Ref: https://github.com/capistrano/capistrano/issues/81#issuecomment-1994285
require "bundler/capistrano"
# Uncomment if you are using Rails' asset pipeline
load "deploy/assets"
@smaboshe
smaboshe / Gems installed
Created December 19, 2011 19:13
Trouble with the Twitter (2.0.2) gem
actionmailer (3.1.3)
actionpack (3.1.3)
activemodel (3.1.3)
activerecord (3.1.3)
activeresource (3.1.3)
activesupport (3.1.3)
addressable (2.2.6)
arel (2.2.1)
Ascii85 (1.0.1)
bcrypt-ruby (3.0.1)
@smaboshe
smaboshe / ruby-1.9.2-twitter-bundle-install.log
Created December 21, 2011 12:38
Issues installing dependencies for the Twitter gem on Ruby 1.9.3
Fetching gem metadata from https://rubygems.org/
Query List: ["jruby-openssl", "twitter", "json", "rake", "rdiscount", "rspec", "simplecov", "webmock", "yard", "activesupport", "faraday", "multi_json", "simple_oauth"]
Query Gemcutter Dependency Endpoint API: jruby-openssl twitter json rake rdiscount rspec simplecov webmock yard activesupport faraday multi_json simple_oauth
Fetching from: https://rubygems.org/api/v1/dependencies?gems=jruby-openssl,twitter,json,rake,rdiscount,rspec,simplecov,webmock,yard,activesupport,faraday,multi_json,simple_oauth
HTTP Success
Query List: ["bouncy-castle-java", "twitter-text", "multi_xml", "faraday_middleware", "hashie", "rash", "oauth", "httparty", "yajl-ruby", "mash", "hpricot", "hoe", "sqlite3-ruby", "activerecord", "highline", "main", "rspec-mocks", "rspec-expectations", "rspec-core", "simplecov-html", "crack", "addressable", "erubis", "i18n", "memcache-client", "builder", "tzinfo", "rack", "multipart-post"]
Query Gemcutter Dependency Endpoint API: bouncy-castle-java twit
@smaboshe
smaboshe / gist:1515141
Created December 23, 2011 19:25
Rails 3.2.0.rc1 fails to generate a new application on Ruby 1.9.3
~/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/net/http.rb:799: [BUG] Bus Error
ruby 1.9.3p0 (2011-10-30 revision 33570) [powerpc-darwin9.8.0]
-- Control frame information -----------------------------------------------
c:0038 p:---- s:0216 b:0216 l:000215 d:000215 CFUNC :connect
c:0037 p:0011 s:0213 b:0213 l:001448 d:000212 BLOCK ~/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/net/http.rb:799
c:0036 p:0031 s:0211 b:0211 l:000210 d:000210 METHOD ~/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/timeout.rb:54
c:0035 p:0026 s:0199 b:0199 l:000198 d:000198 METHOD ~/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/timeout.rb:99
c:0034 p:0485 s:0193 b:0193 l:001448 d:001448 METHOD ~/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/net/http.rb:799
c:0033 p:0011 s:0185 b:0185 l:000184 d:000184 METHOD ~/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/net/http.rb:755
@smaboshe
smaboshe / https_test.rb
Created December 28, 2011 19:07
Test HTTPS in Ruby
require 'net/http'
require 'uri'
uri = URI('https://rubygems.org')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
http.start do
request = Net::HTTP::Get.new uri.request_uri
response = http.request request