Skip to content

Instantly share code, notes, and snippets.

@k-takata
k-takata / debug.diff
Created November 29, 2016 15:51
Onigmo issue #48
diff --git a/regexec.c b/regexec.c
index e57c962..f56246a 100644
--- a/regexec.c
+++ b/regexec.c
@@ -804,6 +804,7 @@ stack_double(OnigStackType** arg_stk_base, OnigStackType** arg_stk_end,
#define STACK_POP do {\
switch (pop_level) {\
case STACK_POP_LEVEL_FREE:\
+fprintf(stderr, "STACK_POP_LEVEL_FREE\n");\
while (1) {\
@echo off
echo  black 
echo  red 
echo  green 
echo  yellow 
echo  blue 
echo  magenta 
echo  cyan 
echo  while 
@k-takata
k-takata / rtlgetver.c
Created June 12, 2017 16:53
Check Win10 build number and detect if escape sequences can be used (without manifest)
#include <windows.h>
#include <stdio.h>
typedef BOOL (WINAPI *PfnRtlGetVersion)(LPOSVERSIONINFOW);
#define MAKE_VER(major, minor, build) \
(((major) << 24) | ((minor) << 16) | (build))
int main()
{
@k-takata
k-takata / 256colors2.bat
Last active August 4, 2024 17:33
Testing ANSI color sequence on Windows 10 and other terminal emulators
@echo off
rem Based on Todd Larason's 256color2.pl.
rem Ported to Windows 10's Command Prompt.
setlocal EnableDelayedExpansion
rem display the colors
rem first the system ones:
echo System colors:
@k-takata
k-takata / composing_chars.txt
Created October 14, 2017 04:18
Composiong Characters
* Latin
A (U+0041): base character
Ä (U+00C4): precomposed
Ä (U+0041 0308): decomposed
* Hiragana and composing marks
か (U+304B): base character
が (U+304C): precomposed
@k-takata
k-takata / hg-4.3.2-cygwin-problem.diff
Created October 18, 2017 09:44
Fix that "hg log --mq" is not colored on Cygwin/MSYS2
--- /usr/lib/python2.7/site-packages/mercurial/localrepo.py.orig
+++ /usr/lib/python2.7/site-packages/mercurial/localrepo.py
@@ -366,7 +366,7 @@
setupfunc(self.ui, self.supported)
else:
self.supported = self._basesupported
- color.setup(self.ui)
+ #color.setup(self.ui)
# Add compression engines.
@k-takata
k-takata / dont-use-bmpRT.patch
Created November 23, 2017 03:17
Don't use bmpRT. Use mRT directly for DirectWrite.
diff --git a/src/gui.c b/src/gui.c
--- a/src/gui.c
+++ b/src/gui.c
@@ -2419,6 +2419,7 @@ gui_outstr_nowrap(
if (flags & GUI_MON_TRS_CURSOR)
draw_flags |= DRAW_TRANSP;
+ gui_mch_draw_string_start();
/*
* Draw the text.
diff --git a/src/gui_dwrite.cpp b/src/gui_dwrite.cpp
index 20ac338d7..dcd2bf559 100644
--- a/src/gui_dwrite.cpp
+++ b/src/gui_dwrite.cpp
@@ -222,6 +222,7 @@ struct DWriteContext {
ID2D1Factory *mD2D1Factory;
ID2D1DCRenderTarget *mRT;
+ ID2D1GdiInteropRenderTarget *mGDIRT;
ID2D1SolidColorBrush *mBrush;
" See: https://github.com/vim-jp/vital.vim/pull/564
" Execute with: vim -S is_comp.vim
profile start is_comp_prof.log
profile func Is_comparable*
profile func Main
let s:types = {
\ 'number': 0,
\ 'string': 1,
@k-takata
k-takata / codecs.ini.diff
Created February 26, 2018 15:11
Diff to sinkuhadouken_171022
--- codecs.ini.org 2017-10-22 00:00:00.000000000 +0900
+++ codecs.ini 2018-02-04 22:42:51.865200100 +0900
@@ -44,11 +44,14 @@
AVC1 H.264(AVC1)
AVRN Avid M-JPEG(AVRN)
BGR k(RGB32)
+BA81 Raw 8bit RGB Bayer (BA81)
BINK Bink Video
BLZ0 DivX 5.x(BLZ0)
BT20 Conexant Prosumer Video