This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
queued_classes = [] | |
queued_classes << [@instructions.to_a[13].select! {|item| item.is_a? Array }] | |
while true | |
iterations += 1 | |
instructions, super_class, parent_class = queued_classes.shift | |
break unless instructions | |
if instructions[0] == :defineclass | |
next if instructions[1] == :singletonclass | |
class_name = parent_class ? :"#{parent_class}::#{instructions[1]}" : instructions[1] | |
class_info = instructions[2] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Type": "Simple", | |
"Hook": { | |
"IgnoredIndexes": [], | |
"InjectionIndex": 0, | |
"LastInjectionIndex": 0, | |
"ReturnBehaviour": 1, | |
"ArgumentBehaviour": 2, | |
"ArgumentString": null, | |
"HookTypeName": "Simple", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BindingFlags = { | |
Default = 0, | |
IgnoreCase = 1, | |
DeclaredOnly = 2, | |
Instance = 4, | |
Static = 8, | |
Public = 16, | |
NonPublic = 32, | |
FlattenHierarchy = 64, | |
InvokeMethod = 256, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready -> | |
highlight_json = (json) -> | |
output = json.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>') | |
output = output.replace /("(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\b(true|false|null)\b|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)/g, (match) -> | |
type = 'number' | |
if /^"/.test(match) | |
if /:$/.test(match) | |
type = 'key' | |
else | |
type = 'string' |
This file has been truncated, but you can view the full file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ strace ruby ./em_test.rb | |
execve("/usr/local/bin/ruby", ["ruby", "./em_test.rb"], [/* 22 vars */]) = 0 | |
brk(0) = 0xc21000 | |
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) | |
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fa855a75000 | |
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory) | |
open("/usr/local/lib/tls/x86_64/libpthread.so.0", O_RDONLY) = -1 ENOENT (No such file or directory) | |
stat("/usr/local/lib/tls/x86_64", 0x7fffedc2a150) = -1 ENOENT (No such file or directory) | |
open("/usr/local/lib/tls/libpthread.so.0", O_RDONLY) = -1 ENOENT (No such file or directory) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Callbacks | |
def self.included(base) | |
base.class.send :attr_reader, :_defined_callbacks | |
def base.def_callbacks(*names) | |
@_defined_callbacks ||= [] | |
@_defined_callbacks |= names | |
names.each do |name| | |
define_method(name) {|*args, &block| _handle_callback(name, *args, &block) } | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class EventMachine::Synchrony::MongoTimeoutHandler | |
def self.timeout(op_timeout, ex_class, &block) | |
f = Fiber.current | |
timer = EM::Timer.new(op_timeout) { f.resume(nil) } | |
res = block.call | |
timer.cancel | |
res | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'ffi' | |
module FFI::Library | |
attr_reader :arg_types | |
alias_method :ffi_attach_function, :attach_function | |
def attach_function(name, func, args, returns = nil, options = nil) | |
mname, a2, a3, a4, a5 = name, func, args, returns, options |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Generated by ffi-gen. Please do not change this file by hand. | |
require 'ffi' | |
module Krad | |
extend FFI::Library | |
ffi_lib '/usr/local/lib/libkradradio_client.so' | |
def self.attach_function(name, *_) | |
begin; super; rescue FFI::NotFoundError => e |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In file included from /home/defi/git/krad_radio/lib/krad_radio/krad_radio.h:40, | |
from /home/defi/git/krad_radio/lib/krad_mixer/krad_mixer.h:18, | |
from /home/defi/git/krad_radio/lib/krad_audio/krad_audio.h:26, | |
from ../lib/krad_alsa/krad_alsa.h:1, | |
from ../lib/krad_alsa/krad_alsa.c:1: | |
/home/defi/git/krad_radio/lib/krad_v4l2/krad_v4l2.h:21:28: error: linux/uvcvideo.h: No such file or directory |
NewerOlder