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
require 'ffi' | |
module RB | |
extend FFI::Library | |
ffi_lib [:ruby] | |
attach_function :iseq_load, :rb_iseq_load, [:pointer, :int, :pointer], :pointer | |
attach_function :iseq_eval, :rb_iseq_eval, [:pointer], :pointer | |
attach_function :eval_string, :rb_eval_string, [:string], :pointer |
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
diff --git a/examples/app/blog/app.rb b/examples/app/blog/app.rb | |
index f17e88b..6faae01 100644 | |
--- a/examples/app/blog/app.rb | |
+++ b/examples/app/blog/app.rb | |
@@ -69,3 +69,8 @@ end | |
require 'model/init' | |
require 'controller/init' | |
+ | |
+require 'ramaze/contrib/app_graph' |
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 X | |
def foo | |
puts "X" | |
end | |
end | |
module A | |
def foo | |
print "A -> " | |
super |
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
packets = [ | |
"\000\020 0@splitnum\000\000\000hostname\000[C&B] Titan Moving 24/7 [DK]\000gamename\000stella\000gamever\0001.10.48.0\000mapname\000Suez_Canal\000gametype\000gpm_ti\000gamevariant\000bf2142\000numplayers\0001\000maxplayers\00048\000gamemode\000openplaying\000password\0000\000timelimit\0000\000roundtime\0002\000hostport\00017567\000bf2142_ranked\0001\000bf2142_anticheat\0001\000bf2142_autorec\0000\000bf2142_d_idx\000http://bf.killercreation.co.uk/demos/bf2142/81.19.208.40/17567/\000bf2142_d_dl\000http://bf.killercreation.co.uk/demos/bf2142/81.19.208.40/17567/\000bf2142_voip\0001\000bf2142_autobalanced\0000\000bf2142_friendlyfire\0001\000bf2142_tkmode\000No Punish\000bf2142_startdelay\00015\000bf2142_spawntime\00015.000000\000bf2142_sponsortext\000Welcome to Crash & Burn - http://www.crashburn.org\000bf2142_sponsorlogo_url\000http://www.crashburn.eu/images/2142_logo.png\000bf2142_communitylogo_url\000http://www.crashburn.eu/images/2142_logo.png\000bf2142_scorelimit\0000\000bf2142_ticketratio\0001 |
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 'open-uri' | |
require 'cgi' | |
require 'pp' | |
require 'yaml' | |
require 'rake' | |
module GitHub | |
module Connectivity |
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 'pp' | |
require 'coverage' | |
Coverage.start | |
ARGV.each do |arg| | |
require_relative arg | |
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
# Maintainer: Michael Fellinger <[email protected]> | |
pkgname=google-talkplugin | |
pkgver=0 | |
pkgrel=1 | |
pkgdesc="Video chat plugin for Gmail, iGoogle, and Orkut" | |
arch=(x86_64) | |
url="http://www.google.com/chat/video" | |
license=('unknown') | |
depends=('libpng12' 'lib32-openssl-compatibility') | |
source=("http://dl.google.com/linux/direct/${pkgname}_current_amd64.deb") |
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
require 'ramaze' | |
require 'json' | |
class Main < Ramaze::Controller | |
provide(:json, type: 'application/json'){|action, value| value.to_json } | |
def index | |
{'some' => 'json'} | |
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
require 'json' | |
require 'pstore' | |
class JSON::Store < PStore | |
def dump(table) | |
JSON.pretty_unparse(@table) | |
end | |
def load(content) | |
JSON.load(content) |
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 Delegator | |
def self.extended(into) | |
(class << into; self; end).send :attr_accessor, :delegates | |
into.delegates = [] | |
into.send :define_method, :method_missing do |method, *args, &block| | |
self.class.delegates.map{|delegate| send(delegate) }.each do |receiver| | |
next unless receiver.respond_to?(method) | |
return receiver.send(method, *args, &block) | |
end |