Skip to content

Instantly share code, notes, and snippets.

--- Tmain/alias-for-unknown-language.d/stderr-actual.txt 2015-08-08 16:01:59.918759200 +0900
+++ Tmain/alias-for-unknown-language.d/stderr-expected.txt 2015-07-09 22:37:01.408106900 +0900
@@ -1 +1 @@
-C:\WORK\universal-ctags\ctags.exe: Unknown language "nosuchlang" in "alias-nosuchlang" option
+ctags: Unknown language "nosuchlang" in "alias-nosuchlang" option
From 0d28151eb1de2b3f8196c611d488be8496ad02c0 Mon Sep 17 00:00:00 2001
From: MURAOKA Taro <[email protected]>
Date: Thu, 2 Feb 2012 01:14:15 +0900
Subject: [PATCH 1/7] make compilable for 32bit Windows
---
src/.gitignore | 8 +++++
src/Attrib.c | 2 +-
src/Make_msvc.mak | 104 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
src/RdFToI.c | 1 +
@k-takata
k-takata / 0001-Support-MSVC.patch
Created July 25, 2015 12:14
Patch for building libffi v3.2.1 with MSVC
From f0627cd357082ba27e914810bdfbc47e80e37c92 Mon Sep 17 00:00:00 2001
From: "K.Takata" <[email protected]>
Date: Sat, 25 Jul 2015 21:09:11 +0900
Subject: [PATCH] Support MSVC
Based on Ruby 2.2's patch:
https://github.com/ruby/ruby/blob/ruby_2_2/ext/fiddle/win32/libffi-3.2.1-mswin.patch
---
src/x86/ffi.c | 21 +++++++++++++++------
src/x86/ffitarget.h | 2 ++
@k-takata
k-takata / bash-completion-slowness-on-msys2.md
Created May 13, 2015 15:08
Bash-completion is very slow on MSYS2

Bash-completion is very slow on MSYS2

Bash-completion is very slow on MSYS2 when the current user is a domain user. This describes the cause and the solutions.

Cause

Expansion of ~* is very slow when you use a domain user. For example:

@k-takata
k-takata / enable-uncpath-on-cmd.exe.reg
Created May 9, 2015 07:26
Enable UNC path on cmd.exe
REGEDIT4
[HKEY_CURRENT_USER\Software\Microsoft\Command Processor]
"DisableUNCCheck"=dword:00000001
@k-takata
k-takata / hello-cgo.cpp
Created April 1, 2015 15:17
Golang cgo test on Windows
#include <cstdio>
#include <iostream>
#include <windows.h>
class Foo {
public:
Foo() {
OutputDebugStringA("Foo::Foo()\n");
//std::cout << "Foo::Foo()\n";
//std::printf("Foo::Foo()\n");
@k-takata
k-takata / check_unused_bash_completion.sh
Last active August 29, 2015 14:13
Check unused bash_completion files
#!/bin/bash
#
# check_unused_bash_completion.sh
#
# Check unused bash_completion files and moves them into "unused"
# subdirectory. Loading many completion files makes Cygwin/MSYS bash
# very slow.
#
@k-takata
k-takata / map_time.vim
Created November 10, 2014 13:18
Bench mark of tolower(), split() and map() in VimL
let pathext = ".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.PY;.tcl"
let s:path_separator = ";"
" Time of split
let stime = reltime()
for i in range(1, 1000)
let s:path_extensions = split(tolower(pathext), s:path_separator)
endfor
echo reltimestr(reltime(stime)) . " (split) " . len(s:path_extensions)
echo s:path_extensions
@k-takata
k-takata / issue174-mingw.diff
Created October 20, 2014 11:35
Vimproc issue #174
--- a/autoload/proc_w32.c
+++ b/autoload/proc_w32.c
@@ -43,6 +43,7 @@
#include <windows.h>
#include <winbase.h>
#include <shellapi.h>
+#include <shlobj.h>
#include <shobjidl.h>
#if 0
# include <winsock2.h>
@k-takata
k-takata / dl-patches.sh
Last active August 29, 2015 14:07
Download all patches for Vim 7.4
#!/bin/bash
version=7.4
#unstable=unstable/
unstable=
patch_url=http://ftp.vim.org/pub/vim/${unstable}patches/${version}
# Get start and end version
version_esc=${version//./\\.} # Escape dots
start=$(gawk '{l = gensub(/'${version_esc}'\.([0-9]+)/, "\\1", 1, $2)} END {printf "%03d", l+1}' README 2> /dev/null || echo 001)