Skip to content

Instantly share code, notes, and snippets.

Yorick Peterse YorickPeterse

Block or report user

Report or block YorickPeterse

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View stats.rb
require 'httpclient'
require 'json'
repos = []
days = %w{Sunday Monday Tuesday Wednesday Thursday Friday Saturday}
times = do |hash, key|
hash[key] = { |h, k| h[k] = 0 }
View horse_news.txt
Angular/JS/HTML/CSS Push It Forward http://www.
You'll get: - Competitive comp and equity * Sunny San Francisco location 352 yards / 3 minutes later.
Collins, to be nothing more to say, that there is no 'black hole' here.
Dream up and down the ticket, and we are a former Google exec, and Ben Dilts, our CTO.
Android-only to temporarily disable distracting apps.
Arbor, MI – nutshell.
Symfony / Silex - JSON, XML - Google Closure, Python, AngularJS, Javascript, TypeScript, NodeJS, go, Ansible, Docker or LXCs - Experience with a desire to complement the backend of our codebase, so you
UX person AND a Front End Engineer CoreSpring.
Wizard Bazaarvoice Austin, San Antonio or San Antonio, who want to work on cross-functional product teams to build the web.
Ruby and/or Rails, JavaScript, and CSS.
View gist:8d565b7b57f425f7fab5
Calculating -------------------------------------
Ox 1 i/100ms
Nokogiri 1 i/100ms
Oga 1 i/100ms
REXML 1 i/100ms
Ox 8.3 (±36.2%) i/s - 33 in 5.634501s
Nokogiri 5.8 (±17.3%) i/s - 29 in 5.057248s
Oga 0.3 (±0.0%) i/s - 2 in 6.983573s
REXML 0.1 (±0.0%) i/s - 1 in 10.576113s
View gist:ff9f16be02e7bfce8da7
Calculating -------------------------------------
Ox 16741 i/100ms
Nokogiri 4248 i/100ms
Oga 975 i/100ms
Oga cached 2557 i/100ms
REXML 1069 i/100ms
Ox 214047.0 (±1.6%) i/s - 1071424 in 5.006828s
Nokogiri 46610.0 (±7.7%) i/s - 233640 in 5.040502s
Oga 9946.5 (±1.3%) i/s - 49725 in 5.000172s
View rbx_rack_profiler.rb
require 'rack'
require 'rubinius/profiler'
class RbxRackProfiler
def initialize(app)
@app = app
def call(env)
profiler =
View hamming.rb
one = 'AGG'
dist = 0
one.each_char.with_index do |char, index|
dist += 1 if two[index] != char
puts dist
YorickPeterse / alloc.stp
Created Nov 6, 2014
Allocation tracking in Rubinius using dtrace/Systemtap. This is still an experiment and might never actually make it into a release.
View alloc.stp
global allocations
probe process("rbx").mark("object__allocate")
klass = user_string($arg1)
allocations[klass] <<< 1
probe end
View puby.rb
require 'ffi'
module Puby
module Python
extend FFI::Library
ffi_lib ['python2.7']
View gist:07109476bacee6902b1d
gem: /usr/include/llvm/Support/Casting.h:95: static bool llvm::isa_impl_cl<llvm::Constant, const llvm::Value *>::doit(const From *) [To = llvm::Constant, From = const llvm::Value *]: Assertion `Val && "isa<> used on a null poi
nter"' failed.
Program received signal SIGABRT, Aborted.
[Switching to Thread 0x7fffe77fd700 (LWP 17949)]
0x00007ffff6147967 in raise () from /usr/lib/
(gdb) thread apply all bt
Thread 9 (Thread 0x7fffe4a04700 (LWP 17951)):
#0 0x00007ffff706c8bf in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/
#1 0x0000000000812805 in wait (this=<optimized out>, mutex=...) at /home/yorickpeterse/Private/Projects/ruby/rubinius/vm/util/thread.hpp:455
View gdb.log
Starting program: /home/yorickpeterse/.rubies/rbx-git/bin/ruby /tmp/rbx3119.rb
warning: Could not load shared library symbols for
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/".
[New Thread 0x7ffff4cf9700 (LWP 6073)]
[New Thread 0x7ffff48f8700 (LWP 6074)]
[New Thread 0x7ffff44f7700 (LWP 6075)]
[New Thread 0x7fffe7fff700 (LWP 6076)]
[New Thread 0x7fffe7bfe700 (LWP 6077)]
You can’t perform that action at this time.