Skip to content

Instantly share code, notes, and snippets.


mapi mapi

Block or report user

Report or block mapi

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
tily / aozora_sort.rb
Created Mar 9, 2012
View aozora_sort.rb
# coding:utf-8
# Usage: ruby aozora_sort.rb URL [--morph] > kokoro_sorted.txt
%w(kconv MeCab open-uri rubygems nokogiri).each{|x| require x}
def main(argv)
morph = argv[1] == '--morph'
text = Nokogiri::HTML.parse(open(argv[0]).read).xpath('/html/body').text
text.gsub!(/[\r\n\s ]/u, '')
arr = morph ? split_with_morph(text) : split_with_char(text)
arr.sort.each_with_index do |s, i|
takano32 / gist:1559182
Created Jan 4, 2012
ldd linux-x86-skypekit
View gist:1559182
ldd linux-x86/linux-x86-skypekit => (0xf77a7000) => /lib32/ (0xf7782000) => /usr/lib32/ (0xf764c000) => /usr/lib32/ (0xf755a000) => /usr/lib32/ (0xf7554000) => /usr/lib/i386-linux-gnu/ (0xf7550000) => /usr/lib32/ (0xf7465000) => /lib32/ (0xf743b000) => /usr/lib32/ (0xf741c000)
fuba / gist:981256
Created May 19, 2011
ustream download library
View gist:981256
use utf8;
use strict;
use warnings;
use Encode;
use File::Slurp;
use URI::Escape qw(uri_unescape);
use LWP::Simple;
fuba /
Created Oct 19, 2010
download live video from ustream using rtmpdump.
# this script is an implementation of
use strict;
use warnings;
use LWP::Simple;
my ($ustream_url, $file, $stop) = @ARGV;
use strict;
use warnings;
use MozRepl;
use Net::Pcap::Easy;
my ($ustream_url, $file, $stop, $device) = @ARGV;
my $usage = <<USAGE;
You can’t perform that action at this time.