Skip to content

Instantly share code, notes, and snippets.

View mapi's full-sized avatar
🈚
🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚

mapi mapi

🈚
🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚
View GitHub Profile
#!/usr/bin/perl
use strict;
use warnings;
use MozRepl;
use Net::Pcap::Easy;
my ($ustream_url, $file, $stop, $device) = @ARGV;
my $usage = <<USAGE;
@fuba
fuba / download_ustream_live.pl
Created October 19, 2010 16:07
download live video from ustream using rtmpdump.
#!/usr/bin/perl
# this script is an implementation of http://textt.net/mapi/20101018201937
use strict;
use warnings;
use LWP::Simple;
my ($ustream_url, $file, $stop) = @ARGV;
@fuba
fuba / gist:981256
Created May 19, 2011 17:13
ustream download library
#!/usr/bin/perl
use utf8;
use strict;
use warnings;
use Encode;
use File::Slurp;
use URI::Escape qw(uri_unescape);
use LWP::Simple;
@takano32
takano32 / gist:1559182
Created January 4, 2012 08:57
ldd linux-x86-skypekit
ldd linux-x86/linux-x86-skypekit
linux-gate.so.1 => (0xf77a7000)
librt.so.1 => /lib32/librt.so.1 (0xf7782000)
libX11.so.6 => /usr/lib32/libX11.so.6 (0xf764c000)
libasound.so.2 => /usr/lib32/libasound.so.2 (0xf755a000)
libXv.so.1 => /usr/lib32/libXv.so.1 (0xf7554000)
libXss.so.1 => /usr/lib/i386-linux-gnu/libXss.so.1 (0xf7550000)
libstdc++.so.6 => /usr/lib32/libstdc++.so.6 (0xf7465000)
libm.so.6 => /lib32/libm.so.6 (0xf743b000)
libgcc_s.so.1 => /usr/lib32/libgcc_s.so.1 (0xf741c000)
@tily
tily / aozora_sort.rb
Created March 9, 2012 16:44
青空文庫の長めの小説をソート
# 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|