従来からの JavaScript の書き方だと「定義」するときにグルーバル環境を汚染してしまう課題があった。
window.Hoge
みたいに書いてしまう問題。
回避策はたくさんあるけど、人によって書き方が異なると「使う」ときに大変。
特に複数のライブラリが依存し合うスクリプトの場合、読み込み順序に気を配る必要がある。
こうした "Definition" と "Dependency References" の課題を解決する方法のひとつとして
AMD (Asynchronous Module Definition) がある。
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
# Calculate by response status code. | |
cat /usr/local/nginx/latest/logs/access.log | | |
awk '$9 < 200 || $9 >= 600 { print $0 > "/dev/stderr"; } | |
$9 >= 200 && $9 < 600 { print $9; }' | | |
sort | | |
uniq -c | |
# Show raw lines of specific response status code line. | |
cat /usr/local/nginx/latest/logs/access.log | | |
awk '$9 == 301 { print $0 ; }' |
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
{# | |
default/layout.html | |
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ | |
Sphinx layout template for the default theme. | |
:copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS. | |
:license: BSD, see LICENSE for details. | |
#} | |
{% extends "basic/layout.html" %} |
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 -*- | |
"""%prog [options] svn-repository [svn-repository [ ... ]] | |
""" | |
import argparse | |
import codecs | |
import datetime |
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 -*- | |
"""Dump database table schema as reST text. | |
This script requires configuration file which include title text and database | |
connection string. | |
Example configuration file is defined below in JSON :: |
Memo about OpenData and their utilization. [Wikipedia日本語]
オープン・ガバメント、透明でオープンな政府を実現する取り組み。市民参加を促進する。 WIRED vol.9 に詳しい。
- Transparency : 透明性
- Participation : 市民参加
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 -*- | |
"""Get updated issues of Redmine by each day. | |
Setup & Usage | |
------------- | |
Python 2.7, ``virtualenv``, and ``pip`` are required. |
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 Combined Log Format stream into TSV file. | |
To get known about access log, see Apache HTTP server official document. | |
* [`en <http://httpd.apache.org/docs/2.4/en/logs.html>`_] | |
* [`ja <http://httpd.apache.org/docs/2.4/ja/logs.html>`_] |
OlderNewer