Skip to content

Instantly share code, notes, and snippets.

View hideo55's full-sized avatar

Hideaki Ohno hideo55

View GitHub Profile
@hideo55
hideo55 / tcpdump.pl
Created May 19, 2011 17:10
tcpdump like implementation of Perl
#!/usr/bin/env perl -w
use strict;
use Net::Frame::Dump::Online2;
use Net::Frame::Simple;
my $d = Net::Frame::Dump::Online2->new( dev => 'en1', );
$d->start;
while (1) {
/*
PC Emulator
Copyright (c) 2011 Fabrice Bellard
Redistribution or commercial use is prohibited without the author's
permission.
*/
"use strict";
var aa;
var ba = [1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1,
0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0,
@hideo55
hideo55 / dotcloud_mysql.pl
Created May 14, 2011 14:19
Login to MySQL shell on DotCloud
#!/usr/bin/env perl -w
use strict;
use IPC::Cmd qw/run/;
use IPC::System::Simple qw(systemx);
die "You must provide deploy name as argument" unless scalar(@ARGV) > 0;
my $deploy_name = $ARGV[0];
my ($ok, $err, undef, $stdout) = run(
package Android::FixupUTF8;
sub fixup {
package Android;
no warnings 'redefine';
*do_rpc = sub {
my $self = shift;
if ( $self->trace ) {
show_trace(qq[do_rpc: $self: @_]);
}
package mro;
package MRO::Compat;
use strict;
use warnings;
require 5.006_000;
our $VERSION = '0.11';
BEGIN {