Skip to content

Instantly share code, notes, and snippets.

@liyuray
liyuray / gist:1037331
Created June 21, 2011 06:19 — forked from xdite/gist:1031760
Best Practice of Installing Ruby on Rails on Ubuntu 11.04 ( 2011 version )
  • 警告:請絕對不要跳著裝!*

系統套件

進行 Ubuntu 系統更新 / 安裝 MySQL

 > sudo apt-get update
 > sudo apt-get upgrade
 > sudo apt-get install git
@liyuray
liyuray / gist:961397
Created May 8, 2011 14:11
html tree dump
perl -MHTML::Tree -e '$tree=HTML::TreeBuilder->new->parse_file(shift)->dump while(@ARGV)' *.xhtml
@liyuray
liyuray / gist:939363
Created April 24, 2011 05:58
upload from mutt to gmail
Many thanks, Erwan and Joost!!
Amazingly it does work, but its not perfect.
I open the local mbox file thus:
mutt -f MyMail.mbox
then I "tag all messages"
T . <ret>
@liyuray
liyuray / gist:933794
Created April 21, 2011 05:47
emacs font setting
;;http://f41.aaa.livedoor.jp/~konbu/emacs/font-setting.el
;;-*- mode:Emacs-Lisp -*-
;;; フォント設定処理を.emacsから抜粋したもの。
;;; IME-patch作者さんのページより
;;; (http://homepage3.nifty.com/y3tk/emacs.html)
(setq w32-use-w32-font-dialog nil)
(setq scalable-fonts-allowed t)
(setq w32-enable-synthesized-fonts t)
@liyuray
liyuray / output-ok.txt
Created April 8, 2011 08:28
no mojibake
\documentclass[a5paper]{tbook}
%\documentclass[a5paper, twocolumn]{tbook}
%\usepackage[deluxe]{otf}
\usepackage[expert, deluxe]{otf}
%\usepackage{utf}
\usepackage{furikana}
\usepackage{type1cm}
\usepackage[size=large]{aozora4reader}
\def\rubykatuji{\rubyfamily\tiny}
%\def\rubykatuji{\tiny}%for UTF package
-*- mode: compilation; default-directory: "d:/a4r/aozora4reader/" -*-
Compilation started at Fri Apr 08 14:42:17
export PATH=/cygdrive/c/progra~1/git/bin:$PATH;c:/ruby192/bin/ruby c:/ruby192/bin/rake
C:/ruby192/bin/ruby.exe -I"lib;lib;test" "C:/ruby192/lib/ruby/1.9.1/rake/rake_test_loader.rb" "test/test_aozora4reader.rb"
Loaded suite C:/ruby192/lib/ruby/1.9.1/rake/rake_test_loader
Started
.....................
Finished in 0.508051 seconds.
\documentclass[a5paper]{tbook}
%\documentclass[a5paper, twocolumn]{tbook}
%\usepackage[deluxe]{otf}
\usepackage[expert, deluxe]{otf}
%\usepackage{utf}
\usepackage{furikana}
\usepackage{type1cm}
\usepackage[size=large]{aozora4reader}
\def\rubykatuji{\rubyfamily\tiny}
%\def\rubykatuji{\tiny}%for UTF package
We couldn’t find that file to show.
from: http://krakenbeal.blogspot.com/2011/02/ubuntutex.html
KRAKENBEAL RECORDS
2011年2月25日金曜日
UbuntuでTeX
Ubuntu Maverick Meerkat 10.10
日本語Remixではなくてオリジナルのubuntuをインストールしている
#!/usr/bin/perl -w
# https://groups.google.com/forum/?lnk=gst&q=Day+of+the+week+algorithm&pli=1#!searchin/comp.lang.c/sakamoto$20tomohiko/comp.lang.c/toNihih_w3I/discussion
# sakamoto tomohiko posted in comp.lang.c
use strict;
sub day_of_week {