Skip to content

Instantly share code, notes, and snippets.

View cointoss1973's full-sized avatar

Takayuki Kondo cointoss1973

View GitHub Profile
@cointoss1973
cointoss1973 / gist:2399390
Created April 16, 2012 15:14
python DLL load failed on Windows 7 64-bit
$ python
Python 2.6.6 (r266:84297, Aug 24 2010, 18:46:32) [MSC v.1500 32 bit (Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.
>>>
>>>
>>> import sys
>>>
>>> sys.path
['', 'c:\\Python26\\lib\\site-packages\\setuptools-0.6c11-py2.6.egg', 'c:\\Python26\\lib\\site-packages\\nose-0.11.0.dev-py2.6.egg', 'c:\\Python26\\lib\\site-packages\\coverage-3.5.1-py2.6-win32.egg', 'C:\\Windows\\system32\\python26.zip',
@cointoss1973
cointoss1973 / gist:2564333
Created May 1, 2012 01:52
java --version on Windows 7 64-bit
$ java -version
java version "1.6.0_31"
Java(TM) SE Runtime Environment (build 1.6.0_31-b05)
Java HotSpot(TM) Client VM (build 20.6-b01, mixed mode, sharing)
@cointoss1973
cointoss1973 / hooktest.bat
Created May 7, 2012 10:12
TEST batch file for hg heads on hook
REM hg heads on hook
hg version
hg init tmphook
REM ----- Setup hooks -----
cd tmphook
echo hg heads > .hg\heads.bat
echo [hooks] > .hg\hgrc
@cointoss1973
cointoss1973 / subrepo.bat
Created June 18, 2012 12:36
reproduce of mq and subrepo qrefresh problem
REM subrepo test script
hg version
rmdir /s /q tmp
mkdir tmp\main
cd tmp\main
REM ----- initial repositories
hg init
{{{
#!python
** Mercurial version (2.2.2). TortoiseHg version (2.4.1)
** Command:
** CWD: C:\windows\system32
** Encoding: cp932
** Extensions loaded: graphlog, mq, rebase, svn, purge, win32mbcs, convert, record, info
** Python version: 2.6.6 (r266:84297, Aug 24 2010, 18:46:32) [MSC v.1500 32 bit (Intel)]
** Windows version: (6, 1, 7601, 2, 'Service Pack 1')
** Processor architecture: x86
@cointoss1973
cointoss1973 / coding_guideline.md
Created June 20, 2012 03:46 — forked from sunaot/coding_guideline.md
コーディングガイドライン

コーディング指針

基本方針

こんなコードはよいコード

  • 読みやすいことはよいことだ
    • 見た目が単純だと読みやすい
    • 皆がよく知っている構成は読みやすい (標準に従う。すでに知っているもの (Unix のコマンドとか) に従う。すでにあるものに従う)
  • 書かないことはよいことだ
@cointoss1973
cointoss1973 / subrepo+mq-test.sh
Created June 21, 2012 01:17 — forked from yuja/subrepo+mq-test.sh
Mercurial subrepository+mq+qrefresh test script
#!/bin/sh -e
HGROOT="$HOME/work/hghacks/mercurial"
HG="$HGROOT/hg"
LANG=C
TESTTMP="/tmp/subrepo+mq.d"
make -C "$HGROOT" local > /dev/null
"$HG" --version -q
@cointoss1973
cointoss1973 / hookabort.sh
Created June 27, 2012 00:48
Mercurial pretxnchagegroup hook test
#!/bin/sh -e
# Windows batch command
# - tested on msysgit on Windows
export LANGUAGE=C
hg version -q
reporoot=temp #temp directory
centrepo=$reporoot/centrepo
@cointoss1973
cointoss1973 / get-hg-changegroup.sh
Created August 16, 2012 07:54
Mercurialにて最後にpushされたリポジトリ群を取得するスクリプト
#!/bin/bash
if [[ -z $1 ]]; then
echo "Usage: $0 repository"
exit 1;
fi
function getFirstRev # $1: Repository path
{
if [[ $(uname -s) = MINGW* ]]; then
@cointoss1973
cointoss1973 / gist:3414349
Created August 21, 2012 10:35
TortoiseHg 2.4.3 で リビジョンの除外(strip)すると下記エラー。hgコマンドでは問題ない。
{{{
#!python
** Mercurial version (2.3). TortoiseHg version (2.4.3)
** Command:
** CWD: C:\windows\system32
** Encoding: cp932
** Extensions loaded: graphlog, mq, rebase, purge, win32mbcs, convert, record, hgsubversion, info, transplant
** Python version: 2.7.3 (default, Apr 10 2012, 23:31:26) [MSC v.1500 32 bit (Intel)]
** Windows version: sys.getwindowsversion(major=6, minor=1, build=7601, platform=2, service_pack='Service Pack 1')
** Processor architecture: x86