CentOS に PostGIS/GDAL/Proj をインストールする。
環境:
- CentOS 6.4 (64bit)
 - PostgreSQL 9.3
 - PostGIS 2.1
 
| #!/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>`_] | 
| #!/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. | 
Memo about OpenData and their utilization. [Wikipedia日本語]
オープン・ガバメント、透明でオープンな政府を実現する取り組み。市民参加を促進する。 WIRED vol.9 に詳しい。
| #!/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 :: | 
従来からの JavaScript の書き方だと「定義」するときにグルーバル環境を汚染してしまう課題があった。
window.Hoge みたいに書いてしまう問題。
回避策はたくさんあるけど、人によって書き方が異なると「使う」ときに大変。
特に複数のライブラリが依存し合うスクリプトの場合、読み込み順序に気を配る必要がある。
こうした "Definition" と "Dependency References" の課題を解決する方法のひとつとして
AMD (Asynchronous Module Definition) がある。
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| """%prog [options] svn-repository [svn-repository [ ... ]] | |
| """ | |
| import argparse | |
| import codecs | |
| import datetime | 
| {# | |
| 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" %} | 
| # 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 ; }' |