Skip to content

Instantly share code, notes, and snippets.

View scashin133's full-sized avatar

Sean Cashin scashin133

View GitHub Profile

Keybase proof

I hereby claim:

  • I am scashin133 on github.
  • I am scashin133 (https://keybase.io/scashin133) on keybase.
  • I have a public key whose fingerprint is 8BED C94A 8EFF 24EF 40BD 62DA 3729 D29C B4F2 0318

To claim this, I am signing this object:

Rubinius Crash Report #rbxcrashreport
Error: signal SIGILL
[[Backtrace]]
0 rbx 0x0000000100024871 _ZN8rubiniusL12segv_handlerEi + 241
1 libSystem.B.dylib 0x00007fff83c4e1ba _sigtramp + 26
2 ??? 0x14e0700000000000 0x0 + 1504325420844056576
3 rbx 0x0000000100108ead _ZN8rubinius11SharedState13new_thread_idEPNS_13ManagedThreadE + 221
4 rbx 0x0000000100108ef6 _ZN8rubinius11SharedState6new_vmEv + 38
Rubinius Crash Report #rbxcrashreport
[[Exception]]
A toplevel exception occurred
unable to find Rubinius command 'help' (LoadError)
Backtrace:
Rubinius::Loader#script at kernel/loader.rb:645
Rubinius::Loader#main at kernel/loader.rb:808
// Java example
import java.io.BufferedReader;
import java.io.OutputStreamWriter;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.Authenticator;
import java.net.PasswordAuthentication;
import java.net.URL;
import java.net.HttpURLConnection;
@scashin133
scashin133 / apiexamples.rb
Created September 14, 2011 18:29
Socialcast API examples
require 'rubygems'
require 'rest_client'
require 'json'
require 'logger'
require 'pp'
class VhackDemo
def self.request(method, path, request_params)
RestClient.log = Logger.new(STDOUT)
url = ['https://', 'demo.socialcast.com', path].join
@i = 0
a = ""
def ao
puts @i
end
@scashin133
scashin133 / gist:832537
Created February 17, 2011 20:01
STDOUT rails console
ActiveRecord::Base.logger = Logger.new(STDOUT)
reload!
@scashin133
scashin133 / bunlder_snippet.rb
Created February 1, 2011 21:46
snippet for requiring all gems in a Gemfile without having to load the rails environment or run with bundle exec
require 'rubygems'
require 'bundler'
ENV['BUNDLE_GEMFILE']="/path/to/Gemfile"
Bundler.require
@scashin133
scashin133 / rand_alphanum.sh
Created January 6, 2011 22:25
Used to generate a random alphanum string from command line without newlines.
# Linux
openssl rand -base64 1024 -out /dev/stdout | sed -r 's/[^a-zA-Z0-9]//g' | tr -d '\n'
# Mac OSX
openssl rand -base64 1024 -out /dev/stdout | sed 's/[^a-zA-Z0-9]//g' | tr -d '\n'
def foo
f = Proc.new { return "return from foo from inside proc" }
f.call # control leaves foo here
return "return from foo"
end
def bar
f = lambda { return "return from lambda" }
f.call # control does not leave bar here
return "return from bar"