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 'rubygems' | |
require 'eventmachine' | |
require 'delegate' | |
module TransactionProtocol | |
class Writer < EM::Queue | |
class << self | |
@files = [] | |
attr_accessor :files | |
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
define perl_backtrace_5_10_unthreaded | |
set $si = (struct stackinfo*)PL_curstackinfo | |
while $si | |
printf "struct stackinfo * 0x%x {\n", (int)$si | |
set $cx = (PERL_CONTEXT*)($si->si_cxstack) | |
printf " PERL_CONTEXT * 0x%x\n", (int)$cx | |
set $cxix = (int)($si->si_cxix) | |
printf " int cxix %d\n", $cxix |
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/perl4 | |
# Horrible, horrible, horrible edit of someone's | |
# even more horrible "reddit clone in 4 lines of perl". | |
use CGI ':standard'; | |
$dir = File::Basename::dirname( $0 ); | |
chdir $dir; |
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 'tempfile' | |
require 'dl' | |
class Carp | |
@@in_gdb_bt = false | |
def initialize | |
bt = [] | |
if ! @@in_gdb_bt | |
@@in_gdb_bt = true |
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
perl -Mwarnings -le 'print for keys %warnings::Offsets'\ | |
| xargs -n1 perl -Mwarnings -e ' | |
BEGIN { | |
$SIG{__WARN__} = sub { $W = 1 }; | |
warnings->unimport( $ARGV[0] ) | |
} | |
print "foo" if my $x = 0E0; | |
END { print $ARGV[0] if ! $W } ' | |
# syntax |