Skip to content

Instantly share code, notes, and snippets.

k-takata /
Last active May 31, 2024 04:39
Do 'hg pull' and 'hg pull --mq' easily
rm -f $mainbundle $mqbundle
hg --pager=no incoming -v --bundle $mainbundle
if [ $? -eq 255 ]; then
exit 1
k-takata /
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.


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

k-takata /
Last active March 4, 2024 06:43
『はじめて読む486』のサンプルを OpenWatcom でビルドする

『はじめて読む486』のサンプルを OpenWatcom でビルドする


『はじめて読む486』のサンプルプログラム集 をできるだけ簡単に試してみるために、OpenWatcom を使ってビルドしてみました。

※ 16bit 用の無料で使えるコンパイラとしては LSI C-86 試食版が有名ですが、関数の呼び出し規約が MSC や Borland C とは異なっているため、アセンブリプログラムの修正が必須となってしまいます。また、Turbo C 2.01 もありますが、インストールが面倒で TASM も含まれていません。


k-takata / grph3.c
Last active January 14, 2024 07:07
A sample program to draw graphics on a command prompt or a dos window
#include <windows.h>
BOOL IsWindows9x()
return (GetVersion() >= 0x80000000);
int main(int argc, char *argv[])
HWND hWnd;
k-takata / 256colors2.bat
Last active November 25, 2023 16:23
Testing ANSI color sequence on Windows 10 and other terminal emulators
@echo off
rem Based on Todd Larason's
rem Ported to Windows 10's Command Prompt.
setlocal EnableDelayedExpansion
rem display the colors
rem first the system ones:
echo System colors:
k-takata / envmeter.rb
Last active August 4, 2023 21:31
Temperature, humidity and pressure meter using GR-CITRUS + AE-BME680 + LCD module (AQM1602Y-FLW-FBW)
class LCD
ID = 0x3E
def initialize
@i2c =
def init
k-takata / bme680.rb
Created July 23, 2023 03:22
Using AE-BME680 with GR-CITRUS
class BME680
ID = 0x77
#REG_COEFF3 = 0x00
REG_GAS_WAIT0 = 0x64
k-takata / 2002-windows_transparency.diff
Last active February 10, 2023 06:10
Updated for 9.0.1294 and later
# HG changeset patch
# Parent fde93adeda8d91c54211d002010c4476c27e8dcc
# Parent 04bb907f937cefc1a013ccdaa2e54569944b57a8
implement 'transparency' for Windows GUI
diff --git a/src/gui_w32.c b/src/gui_w32.c
--- a/src/gui_w32.c
+++ b/src/gui_w32.c
@@ -50,6 +50,13 @@ static int gui_mswin_get_menu_height(int
# define gui_mswin_get_menu_height(fix_window) 0
k-takata / py3-hook-linux.diff
Created December 27, 2022 09:24
Similar patch to 8.2.4317 for Linux
diff --git a/src/errors.h b/src/errors.h
index e33f2e66b..c23aac526 100644
--- a/src/errors.h
+++ b/src/errors.h
@@ -3213,7 +3213,7 @@ EXTERN char e_autoload_import_cannot_use_absolute_or_relative_path[]
EXTERN char e_cannot_use_partial_here[]
INIT(= N_("E1265: Cannot use a partial here"));
-#if defined(FEAT_PYTHON3) && defined(MSWIN)
+#if defined(FEAT_PYTHON3) && (defined(MSWIN) || defined(__linux__))
k-takata /
Last active May 11, 2022 02:54
Reduce the install size of clang, llvm, lld and gcc on MSYS2
# Convert the same files into hard links to reduce the install size of
# clang, llvm, lld and gcc on MSYS2.