Skip to content

Instantly share code, notes, and snippets.

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
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
View gist:10253
/**
* Create a writer method.
*
* For attr_writer(foo, SomeClass), creates void foo(STATE, SomeClass* obj)
* that sets the instance variable my_foo to the object given and runs the write
* barrier.
*/
#define attr_writer(name, type) void name(STATE, type* obj) { \
my_ ## name = obj; \
View gist:8997
diff --git a/vm/exception.hpp b/vm/exception.hpp
index 1c4ffb0..9732b42 100644
--- a/vm/exception.hpp
+++ b/vm/exception.hpp
@@ -70,10 +70,8 @@ namespace rubinius {
static void raise(size_t expected, size_t given);
static void raise(const char* reason);
- ArgumentError(size_t e, size_t g) : expected(e), given(g) { }
- ArgumentError(const char* reason) {