This file contains hidden or 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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import os,tempfile,urllib | |
for i in range(1,359): | |
with open(os.path.sep.join((tempfile.gettempdir(),'7.4.'+ str(i).zfill(3))), 'wb') as f: | |
f.write(urllib.urlopen('ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.%s' % str(i).zfill(3)).read()) |
This file contains hidden or 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
::~msvc12-vim64.bat: build 64-bit version of gvim using msvc12 toolchain. | |
::~author: Ji Han | |
wget ftp://ftp.vim.org/pub/vim/patches/7.4/7.4.168 | |
patch -p0 < 7.4.168 | |
nmake -f Make_mvc.mak SDK_INCLUDE_DIR="C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Include" MSVCVER=11.0 ^ | |
CPU=AMD64 GUI=yes OLE=yes IME=yes CSCOPE=yes ^ |
This file contains hidden or 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
::~msvc10-vim64.bat: build 64-bit version of gvim using msvc10 toolchain. | |
::~author: Ji Han | |
set PATH=C:\Perl64\bin;%PATH% | |
::~beginning of line~--do not insert blank lines or comments. | |
nmake -f Make_mvc.mak CPU=AMD64 GUI=yes OLE=yes IME=yes CSCOPE=yes ^ | |
WINVER=0x0500 NETBEANS=no DEFINES="-DFEAT_PROPORTIONAL_FONTS" ^ | |
LUA=C:\opt\lua DYNAMIC_LUA=yes LUA_VER=52 ^ | |
TCL=C:\Tcl85-x64 DYNAMIC_TCL=yes TCL_VER=85 TCL_VER_LONG=8.5 ^ |
This file contains hidden or 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
::~mingw-vim.bat: build 32-bit version of gvim using mingw toolchain. | |
::~author: Ji Han | |
set PATH=C:\mingw32\bin;C:\Perl\bin;%PATH% | |
mingw32-make -f Make_ming.mak ARCH=i686 STATIC_STDCPLUS=yes GUI=yes OLE=yes IME=yes CSCOPE=yes ^ | |
LUA=C:/lua DYNAMIC_LUA=yes LUA_VER=52 ^ | |
TCL=C:/Tcl DYNAMIC_TCL=yes TCL_VER=85 TCL_VER_LONG=8.5 ^ | |
PERL=C:/Perl DYNAMIC_PERL=yes PERL_VER=516 ^ | |
PYTHON=C:/python27 DYNAMIC_PYTHON=yes PYTHON_VER=27 PYTHON3=C:/python33 DYNAMIC_PYTHON3=yes PYTHON3_VER=33 ^ |
This file contains hidden or 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
" rubyblue.vim --- vim color scheme | |
" Ji Han (jihan917<at>gmail<dot>com) | |
set background=dark | |
hi clear | |
if exists("syntax_on") | |
syntax reset | |
endif | |
let g:colors_name = "rubyblue" |
This file contains hidden or 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
// double-checked locking singleton was an _incorrect_ model | |
// however, it has great influences, such that: | |
// the Java Memory Model changed in favor of it (since J2SE-1.5); | |
// Visual C++ changed 'volatile' semantics (since Visual C++ 2005). | |
// method 1 uses 'volatile'--VC++ only solution. | |
// method 2 uses 'thread_local'--portable C++11 solution. | |
// [you may opt for a much easier 'pthread_once()' solution on POSIX platforms.] | |
// (c) 2012 Ji Han |
This file contains hidden or 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
// touch.js --- file timestamp manipulation utility (like *nix touch) | |
// (c) Copyright 2012, Ji Han (hanji <at> outlook <dot> com) | |
// you are free to distribute it under the BSD license. | |
(function(){ | |
if (WScript.Arguments.Length == 0){ | |
// this script works for files, but not folders. (you need win32api to do that.) | |
// plus, there's no '-a' or '-m' options; it only touches the mtime. | |
WScript.Echo('touch [-c] [-r <reference_file> | -t <timestamp>] <files>'); |
This file contains hidden or 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
// rename.js --- bulk file renaming utility (like *nix rename.pl) | |
// (c) Copyright 2012, Ji Han (hanji <at> outlook <dot> com) | |
// you are free to distribute it under the BSD license. | |
if (!Array.prototype.map) Array.prototype.map = function (f, t){ | |
var o = Object(this); | |
var r = new Array(o.length >>> 0); | |
for (var i = 0; i < r.length; ++i){ if (i in o) r[i] = f.call(t, o[i], i, o) } | |
return r; | |
}; |
This file contains hidden or 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
// touch.js --- file timestamp manipulation utility (like *nix touch) | |
// (c) Copyright 2012, Ji Han (hanji <at> outlook <dot> com) | |
// you are free to distribute it under the BSD license. | |
(function(){ | |
if (WScript.Arguments.Length == 0){ | |
// this script works for files, but not folders. (you need win32api to do that.) | |
// plus, there's no '-a' or '-m' options; it only touches the mtime. | |
WScript.Echo('touch [-c] [-r <reference_file> | -t <timestamp>] <files>'); |
This file contains hidden or 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
"vim configuration file | |
"(C) Copyright 2009-2012, Ji Han | |
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
set fileencodings=ucs-bom,utf-8,gbk,big5,euc-jp,euc-kr,default | |
set encoding=utf-8 | |
language message en_US.utf-8 | |
set langmenu=en_US.utf-8 | |
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" |
NewerOlder