Skip to content

Instantly share code, notes, and snippets.

@sgur
sgur / py3failure.cmd
Created Sep 18, 2015
Build failed on DYNAMIC_PYTHON=yes DYNAMIC_PYTHON3=no
View py3failure.cmd
@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 Sep 18, 2015
Diff for fixing DYNAMIC_PYTHON=yes and DYNAMIC_PYTHON3=no
View fix_pydyn_py3nodyn.diff
# 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;
}
View everything.vim
" 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 Nov 8, 2010
a alias to pull submodules
View .gitconfig
[alias]
uptodate = !git submodule foreach "git fetch;git checkout origin/master"
@sgur
sgur / g:quickrun_config.vim
Created Nov 13, 2010
quickrun.vim で C# のコマンドラインコンパイラを利用する設定。set shellslashでも動作する(と思う)。vimprocだとうまく動かず。
View g:quickrun_config.vim
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',
\ }
View patch_for_autoload_quickrun.vim
@@ -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 Nov 16, 2010
bash environment to use ibus
View ibus_env.sh
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 Nov 21, 2010
unite-outline の changelog 向け
View unite-outline-changelog.vim
"=============================================================================
" 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 Nov 22, 2010
echo bootup time which is measured by vim --startuptime
View 2010-11-22-105146.vim
" 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
View 2011-05-24-135549.gitconfig
[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\"
You can’t perform that action at this time.