This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "name": "Chrome Keyconfig", | |
| "version": "1.14.0", | |
| "normal_actions": { | |
| "h": { | |
| "name": "scroll left", | |
| "args": [] | |
| }, | |
| "l": { | |
| "name": "scroll right", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| from itertools import count, takewhile, islice | |
| def primes(): | |
| yield 2 | |
| primes = [2] | |
| for i in count(3, step=2): | |
| if all(i % prime != 0 for prime in primes): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| from itertools import count, takewhile, islice | |
| def primes(): | |
| yield 2 | |
| yield 3 | |
| primes = [2, 3] | |
| for i in count(start=5, step=6): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -*- cperl -*- | |
| # ~/.latexmkrc | |
| # setting for pdflatex | |
| $pdflatex = 'pdflatex -8bit -etex -halt-on-error -synctex=1 %O %S'; | |
| # setting for Japanese | |
| $latex = 'platex -synctex=1 -halt-on-error %O %S'; | |
| $bibtex = 'pbibtex %O %B'; | |
| $makeindex = 'mendex %O -o %D %S'; | |
| $dvipdf = 'dvipdfmx %O -o %D %S'; | |
| # use bibtex as default |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -*- cperl -*- | |
| # latexmkrc | |
| $pdflatex = 'pdflatex -8bit -etex -halt-on-error -synctex=1 %O %S'; | |
| $pdf_mode = 1; | |
| $bibtex_use = 1; | |
| $clean_ext = '%R_flymake.aux %R_flymake.dvi %R_flymake.log %R_flymake.out'; | |
| $clean_full_ext = 'bbl synctex.gz'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| # convert snippet file for neosnippet into snippet files for yasnippet | |
| # by Akihiro Uchida, CC0 dedicated to the public domain | |
| # see http://creativecommons.org/publicdomain/zero/1.0/ | |
| import argparse | |
| import os.path | |
| import textwrap | |
| YASNIPPET_TEMPLATE = """# -*- mode: snippet -*- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| import os.path | |
| from matplotlib import get_configdir | |
| import pickle | |
| fpath = os.path.join(get_configdir(), 'fontList.cache') | |
| with open(fpath, 'r') as f: | |
| fontmgr = pickle.load(f) | |
| for fontentry in fontmgr.ttflist: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| # coding: utf-8 | |
| # A replication script for ZFS | |
| # by Akihiro Uchida, CC0 dedicated to the public domain | |
| # see http://creativecommons.org/publicdomain/zero/1.0/ | |
| usage="usage: $(basename $0) [-v] src dst" | |
| die() { | |
| echo "$@" >&2 | |
| exit 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| # A ZFS snapshots rotation script | |
| # by Akihiro Uchida, CC0 dedicated to the public domain | |
| # see http://creativecommons.org/publicdomain/zero/1.0/ | |
| usage="usage: $(basename $0) [-v] filesystem generation" | |
| die() { | |
| echo "$@" >&2 | |
| exit 1 | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| # CUI Downloader of "Command Line Tools for Xcode" | |
| # by Akihiro Uchida, CC0 dedicated to the public domain | |
| # see http://creativecommons.org/publicdomain/zero/1.0/ | |
| import sys, os | |
| import urllib, urllib2, cookielib | |
| from getpass import getpass | |
| from HTMLParser import HTMLParser |