Skip to content

Instantly share code, notes, and snippets.

View keybase.md

Keybase proof

I hereby claim:

  • I am rue on github.
  • I am rue (https://keybase.io/rue) on keybase.
  • I have a public key whose fingerprint is 4476 8846 E7C0 9EF8 E766 7738 E1FD 3C4D C6E3 45F6

To claim this, I am signing this object:

View surprise.coffee
value =
if this.require
'aa'
else
'bb'
@rue
rue / a.md
Created Jun 29, 2012 — forked from rkh/a.md
View a.md

This allows you to use the following video streaming services outside of the US from your Mac without having to use a proxy or VPN, so no big bandwidth issues:

  • Netflix
  • Hulu / HuluPlus
  • CBS
  • ABC
  • MTV
  • theWB
  • CW TV
  • Crackle
@rue
rue / gist:1479270
Created Dec 15, 2011
The right way to comment
View gist:1479270
# The correct way is to do this.
#
# Possibly with some additional stuff here,
# but note the trail.
#
module YayComments
##
# Sometimes you need the double-hash, so you do this.
View gist:1313851
defutf8 on
encoding UTF-8
setenv LC_ALL en_US.UTF-8
setenv LANG en_US.UTF-8
View gist:1303560
foo = 5
Object.new.instance_eval "bar = 3; p local_variables, eval('local_variables'), eval('s = Rubinius::VariableScope.of_sender; [s.method, s.method.local_names, s.locals,s.parent]'), eval('bar'), eval('foo'), (s = Rubinius::VariableScope.of_sender; [s.method, s.method.local_names, s.parent])"
puts "------------"
Object.new.instance_eval { eval("bar = 3"); p local_variables, (s = Rubinius::VariableScope.of_sender; ['m', s.method, 'mln', s.method.local_names, 'sl', s.locals, 'sp', s.parent]), eval('bar'), eval('foo')}
p local_variables, eval("bar"), eval("foo")
View build.log
/Users/ruerue/code/rubinius/rakelib/platform.rake:11: warning: assigned but unused variable - addrinfo
/Users/ruerue/code/rubinius/rakelib/platform.rake:131: warning: assigned but unused variable - fixme_constants
/Users/ruerue/code/rubinius/projects/daedalus/daedalus.rb:337: warning: assigned but unused variable - e
** Invoke build (first_time)
** Invoke build:build (first_time)
** Invoke build:llvm (first_time)
** Execute build:llvm
** Invoke vm/vm (first_time)
** Invoke vm/gen/revision.h (first_time)
** Execute vm/gen/revision.h
View ext_helper.rb
require "rbconfig"
$verbose = Rake.application.options.trace || ARGV.delete("-v")
DEV_NULL = RUBY_PLATFORM =~ /mingw|mswin/ ? 'NUL' : '/dev/null'
def env(name, default = "")
(ENV[name] || default).dup
end
View Apple reporter
Process: vm [37330]
Path: /Users/ruerue/code/rubinius/master/bin/../vm/vm
Identifier: vm
Version: ??? (???)
Code Type: X86 (Native)
Parent Process: ruby [36814]
Interval Since Last Report: 31266582 sec
Crashes Since Last Report: 65
Per-App Interval Since Last Report: 0 sec
View ghi.rb
#!/usr/bin/env ruby
require "rubygems"
require "mutter"
require "httparty"
REMOTE = "origin"
REPO = `git config --get remote.#{REMOTE}.url`.chomp[/github\.com[\/\:]([^\/]+\/[^\/]+)\.git/, 1]
USER = `git config --get github.user`.chomp
TOKEN = `git config --get github.token`.chomp