Skip to content

Instantly share code, notes, and snippets.

View alecchen's full-sized avatar

Alec Chen alecchen

View GitHub Profile
package Inline;
use strict;
require 5.006;
$Inline::VERSION = '0.48';
use AutoLoader 'AUTOLOAD';
use Inline::denter;
use Config;
use Carp;
alec-chende-macbook-3:~ alec$ perl -e '$v = oct("0b" . $ARGV[0]); printf "%d, 0x%X\n", $v, $v;' 11111
31, 0x1F
C:\strawberry\perl\bin\perl.exe C:\strawberry\cpan\build\Doxygen-Lua-0.02-fdAZd2\bin\lua2dox %1

delicious-library-tw

a dirty sinatra app to add taiwan books support in delicious library

Prerequisites

gem install sinatra haml nokogiri isbn-tools

First-level heading

Hello World!

emphasis

strong emphasis

Second-level heading

http://lib.ncl.edu.tw/cgi-bin/isbnget?OPT=BOOK.B&TYPE=S&PGNO=1&SEL.CL=&FNM=S&TOPICS1=BN&SEARCHSTR1=9861122931&BOL1=AND&TOPICS2=TI&SEARCHSTR2=&BOL2=AND&TOPICS3=TI&SEARCHSTR3=&PAGELINE=10
//table[@width="100%"][1]//tr//td[2]
# 1 author
# 2 publisher
# 3 edition
//table[@width="100%"][2]//tr[2]//td
# 2 isbn, volume, binding
# 3 pages
#!/usr/bin/env perl
use strict;
use warnings;
my $log = $ARGV[0] || 'log.txt';
while (1) {
my $line_number = (split q{ }, `wc -l $log`)[0];
my $tail = `tail $log`;
#!/usr/bin/perl
my $self = shift;
my $input = shift;
my $in_block = 0;
my $in_function = 0;
my $block_name = q{};
my $result = q{};
source ~/.vimrc
if has("gui_gtk2")
set guifont=Courier\ 10\ Pitch\ 14
else
set guifont=-adobe-courier-medium-r-normal--20-140-100-100-m-110-iso8859-1
endif