Skip to content

Instantly share code, notes, and snippets.

@sgur
sgur / py3failure.cmd
Created September 18, 2015 02:33
Build failed on DYNAMIC_PYTHON=yes DYNAMIC_PYTHON3=no
@setlocal
@set BASEDIR=%CD%
@set VS2012_64_VCVARS="c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\vcvarsall.bat"
@call %VS2012_64_VCVARS% amd64
cd %BASEDIR%\src
nmake -f make_mvc.mak PYTHON="C:\Python27" PYTHON_VER=27 DYNAMIC_PYTHON=yes PYTHON3="C:\Python34" PYTHON3_VER=34 DYNAMIC_PYTHON3=no
@REM ------------------------------------------------------------------------------
@REM OK: nmake -f make_mvc.mak PYTHON="C:\Python27" PYTHON_VER=27 DYNAMIC_PYTHON=yes PYTHON3="C:\Python34" PYTHON3_VER=34 DYNAMIC_PYTHON3=yes
@sgur
sgur / fix_pydyn_py3nodyn.diff
Created September 18, 2015 02:37
Diff for fixing DYNAMIC_PYTHON=yes and DYNAMIC_PYTHON3=no
# HG changeset patch
# Parent cd910522d384c9a59efb5e7101470c193c971f66
diff -r cd910522d384 src/if_python3.c
--- a/src/if_python3.c Fri Sep 18 11:11:13 2015 +0900
+++ b/src/if_python3.c Fri Sep 18 11:12:21 2015 +0900
@@ -828,7 +828,7 @@
--recurse;
}
" everything source for unite.vim
" Version: 0.0.1
" Last Change: 01 Dec 2010
" Author: sgur <sgurrr at gmail.com>
" Licence: The MIT License {{{
" Permission is hereby granted, free of charge, to any person obtaining a copy
" of this software and associated documentation files (the "Software"), to deal
" in the Software without restriction, including without limitation the rights
" to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
" copies of the Software, and to permit persons to whom the Software is
@sgur
sgur / .gitconfig
Created November 8, 2010 11:03
a alias to pull submodules
[alias]
uptodate = !git submodule foreach "git fetch;git checkout origin/master"
@sgur
sgur / g:quickrun_config.vim
Created November 13, 2010 10:32
quickrun.vim で C# のコマンドラインコンパイラを利用する設定。set shellslashでも動作する(と思う)。vimprocだとうまく動かず。
let g:quickrun_config = { }
let g:quickrun_config['cs'] = {
\ 'command' : 'csc',
\ 'runmode' : 'simple',
\ 'exec' : ['%c /nologo %s:gs?/?\\? > /dev/null', '"%S:p:r:gs?/?\\?.exe" %a', ':call delete("%S:p:r.exe")'],
\ 'tempfile' : '{tempname()}.cs',
\ }
@@ -577,10 +577,13 @@ function! s:Runner.build_command(tmpl) " {{{2
" TODO: Add rules.
" FIXME: Possibility to be multiple expanded.
let config = self.config
let shebang = self.detect_shebang()
let src = string(self.source_name)
+ if s:is_win && &shellslash && match(&shell, 'sh') < 0
+ let src = substitute(src, '/', '\\', 'g')
+ endif
let rule = [
@sgur
sgur / ibus_env.sh
Created November 16, 2010 10:58
bash environment to use ibus
export GTK_IM_MODULE=ibus
export XMODIFIERS=@im=ibus
export QT_IM_MODULE=ibus
export XIM_PROGRAM=/usr/bin/ibus-daemon
@sgur
sgur / unite-outline-changelog.vim
Created November 21, 2010 12:18
unite-outline の changelog 向け
"=============================================================================
" FILE: changelog.vim
" Last Modified: 2010-11-21
"
" Licensed under the MIT license:
" http://www.opensource.org/licenses/mit-license.php
"
"=============================================================================
function! unite#sources#outline#changelog#outline_info()
@sgur
sgur / 2010-11-22-105146.vim
Created November 22, 2010 02:49
echo bootup time which is measured by vim --startuptime
" expect 'vim --startuptime "%TEMP%\vim_startuptime.log"'
let s:startup_logfile = 'vim_startuptime.log'
function! s:GetStartupTime()
let startup_logpath = expand('$TEMP') . '/' . s:startup_logfile
if filereadable(startup_logpath)
let startup_file = readfile(startup_logpath)
return matchstr(startup_file[len(startup_file)-1], '^[0-9-.]\+')
endif
return 0
endfunction
@sgur
sgur / 2011-05-24-135549.gitconfig
Created May 24, 2011 04:58
gitconfig (p4merge)
[merge]
tool = p4merge
[diff]
tool = p4merge
[difftool "p4merge"]
path = c:/Program Files/Perforce/p4merge.exe
cmd = \"c:/Program Files/Perforce/p4merge.exe\" \"$LOCAL\" \"$REMOTE\"
[mergetool "p4merge"]
path = c:/Program Files/Perforce/p4merge.exe
cmd = \"c:/Program Files/Perforce/p4merge.exe\" \"$BASE\" \"$LOCAL\" \"$REMOTE\" \"$MERGED\"