Skip to content

Instantly share code, notes, and snippets.

View rue's full-sized avatar

Rue Saynatkari rue

View GitHub Profile
@rue
rue / surprise.coffee
Last active December 25, 2015 03:59 — forked from tkareine/surprise.coffee
value =
if this.require
'aa'
else
'bb'
@rue
rue / a.md
Created June 29, 2012 23:39 — forked from rkh/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 December 15, 2011 00:29
The right way to comment
# 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.
defutf8 on
encoding UTF-8
setenv LC_ALL en_US.UTF-8
setenv LANG en_US.UTF-8
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")
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
/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
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
@rue
rue / ghi.rb
Created April 13, 2010 05:43 — forked from macournoyer/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
irb(main):020:0> class BF2142Query
irb(main):021:1>
irb(main):022:1* def initialize(server, query_port)
irb(main):023:2> @socket = UDPSocket.new
irb(main):024:2> @socket.connect(server, query_port)
irb(main):025:2> self.query
irb(main):026:2> end
irb(main):027:1>
irb(main):028:1* def query
irb(main):029:2> array = self.challenge