This file contains 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
""" CouchDB Wrapper Class | |
This is based on an example wrapper class found in | |
http://wiki.apache.org/couchdb/Getting_started_with_Python. | |
TODO: | |
* Support Keep-Alive | |
""" | |
import httplib |
This file contains 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
// 環境 | |
// gcc version 4.5.1 (Gentoo 4.5.1 p1.1, pie-0.4.5) | |
// boost 1.44.0 | |
#include <boost/iterator/iterator_facade.hpp> | |
#include <boost/utility.hpp> | |
#include <boost/range/sub_range.hpp> | |
This file contains 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
print.ancestor.envs <- function(e = environment(), level = 0) { | |
if (!identical(e, emptyenv())) { | |
print.ancestor.envs(parent.env(e), level - 1) | |
} | |
cat(sprintf("%3d: %s\n", level, environmentName(e))) | |
} |
This file contains 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
autocmd User eskk-initialize-pre call s:eskk_initial_pre() | |
function! s:eskk_initial_pre() | |
let t = eskk#table#new('rom_to_hira*', 'rom_to_hira') | |
" from ddskk | |
call t.add_map('~', '~') | |
call t.add_map('z ', ' ') | |
call t.add_map('z/', '・') | |
call t.add_map('z{', '【') | |
call t.add_map('z}', '】') |
This file contains 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
-- Place a window on the specified edge of a screen | |
function place_window_edge(c, h_pos, v_pos) | |
local g = c:geometry() | |
local wa = screen[c.screen].workarea | |
local max_x = wa.width - g.width | |
local max_y = wa.height - g.height | |
g.x = wa.x + (h_pos + 1) * max_x / 2 | |
g.y = wa.y + (v_pos + 1) * max_y / 2 | |
c:geometry(g) | |
end |
This file contains 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
#!/bin/sh | |
# This shell script makes symbolic links to Hiragino fonts and a map file | |
# which can be used with dvipdfmx to embed Hiragino fonts into PDFs. | |
fonts_dir=${HOME}/.fonts | |
texmf_fonts_dir=${HOME}/texmf/fonts/opentype/hiragino | |
dvipdfmx_dir=${HOME}/texmf/fonts/map/dvipdfmx | |
mkdir -p $texmf_fonts_dir | |
ln -sf "$fonts_dir/ヒラギノ明朝 Pro W3.otf" $texmf_fonts_dir/HiraMinPro-W3.otf |
This file contains 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
cidToUnicode Adobe-Japan1 /usr/share/poppler/cidToUnicode/Adobe-Japan1 |
This file contains 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
{-# LANGUAGE OverloadedStrings #-} | |
import qualified Data.ByteString.Lazy as B | |
import Data.Char | |
import Network.Wai | |
import Network.Wai.Handler.CGI (run) | |
import Network.Wai.Middleware.Gzip (gzip, def) | |
import Network.HTTP.Types (status200) | |
application _ = return $ responseLBS status200 [("Content-Type", "text/plain")] | |
content |
This file contains 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
#!/bin/bash | |
# | |
# redmine Redmine | |
# | |
# chkconfig: 2345 80 30 | |
# description: Postfix is a Mail Transport Agent, which is the program \ | |
# that moves mail from one machine to another. | |
# processname: thin | |
# pidfile: /var/run/redmine.pid |
This file contains 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
// Force-enable hardware acceleration. | |
// Setting MOZ_USE_OMTC=1 is necessary. | |
// http://en.librehat.com/blog/force-enable-hardware-acceleration-in-firefox-on-linux/ | |
user_pref("webgl.force-enabled", true); | |
user_pref("layers.acceleration.force-enabled", true); | |
user_pref("layers.offmainthreadcomposition.enabled;true", true); | |
user_pref("layers.offmainthreadcomposition.async-animations", true); | |
// Force-enable Skia backend for Azure | |
// https://bugzilla.mozilla.org/show_bug.cgi?id=740200#c44 |
OlderNewer