Skip to content

Instantly share code, notes, and snippets.

View yamaz's full-sized avatar

Daisuke Yamazaki yamaz

View GitHub Profile
-- Postgresqlで別プロセスでtransactionを共有する方法
-- Query A スナップショットexportしてsnapshot id取得する
BEGIN;
select pg_export_snapshot();
-- Query B 別セッションで参照
BEGIN TRANSACTION ISOLATION LEVEL REPEATABLE READ;
SET TRANSACTION SNAPSHOT 'Aで取れたsnapshot id';
@yamaz
yamaz / gist:868191
Created March 13, 2011 15:55
/etc/sysctl.conf for CentOS 5.4
# Kernel sysctl configuration file for Red Hat Linux
#
# For binary values, 0 is disabled, 1 is enabled. See sysctl(8) and
# sysctl.conf(5) for more details.
# Controls IP packet forwarding
net.ipv4.ip_forward = 0
# Controls source route verification
net.ipv4.conf.default.rp_filter = 1
@yamaz
yamaz / gist:753826
Created December 24, 2010 02:35
My AutoHotKey config
; IMPORTANT INFO ABOUT GETTING STARTED: Lines that start with a
; semicolon, such as this one, are comments. They are not executed.
; This script is a .INI file because it is a special script that is
; automatically launched when you run the program directly. By contrast,
; text files that end in .ahk are associated with the program, which
; means that they can be launched simply by double-clicking them.
; You can have as many .ahk files as you want, located in any folder.
; You can also run more than one .ahk file simultaneously and each will
; get its own tray icon.