Skip to content

Instantly share code, notes, and snippets.

View iizukak's full-sized avatar
🙆‍♂️

Kentaro Iizuka iizukak

🙆‍♂️
View GitHub Profile
@iizukak
iizukak / change_editer_ipython
Created January 6, 2012 06:14
iPythonにおけるエディタの変更方法
iPython でエディタを変更したい場合,環境変数を以下のように変更すればよい.
~/.ipython/ipythonrc で変更できるかどうかは未確認
export EDITOR="vim"
@iizukak
iizukak / gist:1569826
Created January 6, 2012 09:15
termtterのエラー.設定ファイルがおかしいときに出る?
$ termtter
<(@)//_ . . Termtter 1.10.0
\\ http://termtter.org/
/usr/lib/ruby/gems/1.9.1/gems/termtter-1.10.0/lib/termtter/client.rb:235:in `load': /home/USERNAME/.termtter/config:1: unknown regexp options - cfg (SyntaxError)
from /usr/lib/ruby/gems/1.9.1/gems/termtter-1.10.0/lib/termtter/client.rb:235:in `load_config'
from /usr/lib/ruby/gems/1.9.1/gems/termtter-1.10.0/lib/termtter/client.rb:325:in `run'
from /usr/lib/ruby/gems/1.9.1/gems/termtter-1.10.0/bin/termtter:15:in `<top (required)>'
from /usr/bin/termtter:19:in `load'
// 太郎と花子はそれぞれカードを何枚か持っている. 各カードには点数が書かれている.
// 太郎のカードと花子のカードを 1 枚ずつ交換して, それぞれの持つカードの合計点数が等しくなるようにしたい.
// どのカードとどのカードを交換したらよいか.
// ただし,カードを交換しなくても合計点数が等しい場合でも, 必ずカードの交換を行うものとする.
object HelloWorld {
def sum(list:List[Int]):Int = list match{
case n if list.size == 0 => 0
application/epub+zip
<?xml version="1.0" encoding="UTF-8"?>
<container xmlns="urn:oasis:names:tc:opendocument:xmlns:container" version="1.0">
<rootfiles>
<rootfile full-path="OEBPS/package.opf" media-type="application/oebps-package+xml"/>
</rootfiles>
</container>
@iizukak
iizukak / gist:2011219
Created March 10, 2012 11:46
package.opf
<?xml version="1.0" encoding="UTF-8"?>
<package xmlns="http://www.idpf.org/2007/opf" unique-identifier="pub-id" xml:lang="ja" version="3.0">
<metadata xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:opf="http://www.idpf.org/2007/opf">
<dc:title id="title">草枕</dc:title>
<meta refines="#title" property="title-type">main</meta>
<dc:creator id="creator">夏目 漱石</dc:creator>
<meta refines="#creator" property="role" scheme="marc:relators" id="role">aut</meta>
<dc:language>ja</dc:language>
<dc:identifier id="pub-id">urn:uuid:eae22280-0019-43c1-b8cc-8d79bd7d9c36</dc:identifier>
<meta property="dcterms:source-identifier">http://www.aozora.gr.jp/cards/000148/card776.html</meta>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" lang="ja" xml:lang="ja">
<head>
<title>目次</title>
<link rel="stylesheet" type="text/css" href="../Styles/vertical.css" class="vertical" title="vertical layout"/>
<link rel="alternate stylesheet" type="text/css" href="../Styles/horizontal.css" class="horizontal" title="horizontal layout"/>
</head>
<body class="frontmatter" epub:type="frontmatter">
<section>
@iizukak
iizukak / gist:2011252
Created March 10, 2012 12:14
toc.ncx
<?xml version="1.0" encoding="UTF-8"?>
<ncx xmlns:ncx="http://www.daisy.org/z3986/2005/ncx/"
xmlns="http://www.daisy.org/z3986/2005/ncx/"
version="2005-1"
xml:lang="ja">
<head>
<meta name="dtb:uid" content="eae22280-0019-43c1-b8cc-8d79bd7d9c36"/>
<meta name="dtb:depth" content="1"/>
<meta name="dtb:totalPageCount" content="0"/>
<meta name="dtb:maxPageNumber" content="0"/>
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" lang="ja" xml:lang="ja">
<head>
<link rel="stylesheet" type="text/css" href="../Styles/vertical.css" class="vertical" title="vertical layout"/>
<link rel="alternate stylesheet" type="text/css" href="../Styles/horizontal.css" class="horizontal" title="horizontal layout"/>
<title>草枕</title>
</head>
<body class="bodymatter" epub:type="bodymatter">
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" lang="ja" xml:lang="ja">
<head>
<link rel="stylesheet" type="text/css" href="../Styles/cover_vertical.css" class="vertical" title="vertical layout"/>
<link rel="alternate stylesheet" type="text/css" href="../Styles/cover_horizontal.css" class="horizontal" title="horizontal layout"/>
<title>草枕</title>
</head>
<body class="cover" epub:type="cover">
<section class="cover-page">