Skip to content

Instantly share code, notes, and snippets.

View timfel's full-sized avatar
👨‍🍼
Parental leave through 2024

Tim Felgentreff timfel

👨‍🍼
Parental leave through 2024
View GitHub Profile
echo "You have 10 seconds, then I'll start and take $[$1 + 1] screenshots and press space $1 times"
sleep 10
/usr/bin/import -window root "screen_0.jpg"
for i in `seq -w 1 $1`; do
xdotool key space
sleep 3
/usr/bin/import -window root "screen_${i}.jpg"
done
convert "screen_*.jpg" presentation_to_pdf.pdf
rm screen_*.jpg
require File.expand_path("../calculator.rb", __FILE__)
services = %w[172.16.59.95
172.16.59.124
172.16.59.243
172.16.57.39
172.16.58.233
172.16.57.12
172.16.56.214
172.16.59.172
~ maglev ✔ maglev-irb -f
irb(main):001:0> b = proc { p 1 }
=> #<Proc>
irb(main):002:0> b.instance_variable_get("@_st_block")
=> #<ExecBlock:0x561a6201
irb(main):003:0> block = b.instance_variable_get("@_st_block")
=> #<ExecBlock:0x561a6201
irb(main):004:0> block.class
=> ExecBlock
irb(main):005:0> block.class.primitive '_sourceString', '_sourceString'
127 Hours Gran Torino Pelham 123
14 Blades Green Hornet Percy Jackson
22 Bullets Green Zone PI
5 Days of War Gullivers Reisen Piranha
A Better Tomorrow Hanna Planet 51 (2009)
Adele und das Geheimnis des Pharaos Harry Potter 6 Rango
After Life Harry Potter und die Heiligtuemer des Todes Teil 1 R.E.D
Alles Erlaubt Hollywood Reality Red Riding Hood
Assault Girls Hunt to Kill Repo Men
Besouro I am number four Rio
Rubinius (only vm (C++) and kernel (Ruby)):
✈ ✔ sloccount rubinius/kernel rubinius/vm rubinius/lib/rubinius rubinius/lib/compiler rubinius/lib/vm/*
*snip*
Totals grouped by language (dominant language first):
cpp: 171909 (76.57%)
ruby: 36854 (16.42%)
ansic: 7702 (3.43%)
perl: 7400 (3.30%)
python: 518 (0.23%)
sh: 120 (0.05%)

MagLev implementation of Ruby C extensions API.

This document explains the state of C extensions on Maglev. This is meant to become an exhaustive listing of the restrictions in the C API layer, their reasons, and how to work around them.

We also provide code examples for some workarounds at the end of this document.

If more restrictions are found, or you have code examples, please feel

// class version 51.0 (51)
// access flags 0x21
public class example extends org/jruby/ast/executable/AbstractScript {
// compiled from: example.rb
// debug info: /home/tim/example.rb
// access flags 0x100A
private static setPosition(Lorg/jruby/runtime/ThreadContext;I)V
ALOAD 0
Thread.start do
x = 1
eval("self.class.class_eval { define_method(:action) { x } }")
end.join
action # => 1
#!/bin/bash
### BEGIN INIT INFO
# Provides: APPLICATION
# Required-Start: $all
# Required-Stop: $network $local_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start the APPLICATION unicorns at boot
# Description: Enable APPLICATION at boot time.
### END INIT INFO
@timfel
timfel / .rvmrc
Created January 17, 2011 19:55 — forked from jc00ke/.rvmrc
rvm --create --use maglev-24990@my_gemset
ruby update.rb