Skip to content

Instantly share code, notes, and snippets.

@ynkdir
ynkdir / mlang_example.cpp
Created February 4, 2016 07:26
Mlang COM example
// Mlang via COM example.
// https://msdn.microsoft.com/en-us/library/aa767865.aspx
#pragma comment(lib, "ole32.lib")
#include <windows.h>
#include <mlang.h>
#include <stdio.h>
#include <string.h>
@ynkdir
ynkdir / libcallex_win.diff
Last active January 22, 2016 11:39
libcallex windows
diff --git a/autoload/Makefile.msc b/autoload/Makefile.msc
index d0907f2..ef13346 100644
--- a/autoload/Makefile.msc
+++ b/autoload/Makefile.msc
@@ -1,5 +1,20 @@
+!if "$(ARCH)" == "x64"
+ASMFILE=msc_x64_call
+!elseif "$(ARCH)" == "x86"
+ASMFILE=msc_x86_call
+!else
@ynkdir
ynkdir / crash1.txt
Created January 18, 2016 16:29
Vim if_mzscheme appveyor crash dump
FreeLibrary() で落ちたときのダンプ
Microsoft (R) Windows Debugger Version 6.3.9600.17336 AMD64
Copyright (c) Microsoft Corporation. All rights reserved.
Loading Dump File [C:\Users\ynkdir\Desktop\dbg\CrashDumps\gvim.exe.1408.dmp]
User Mini Dump File with Full Memory: Only application data is available
@ynkdir
ynkdir / nls.txt
Last active September 21, 2024 14:19
NLS file format memo
svn://svn.reactos.org/reactos/trunk/reactos/tools/create_nls/
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Nls
format of NLS file such as C:\Windows\System32\C_932.NLS
================================================================================
NLS CODEPAGE (C_XXX.NLS)
================================================================================
+---------------------------------------------------------------
@ynkdir
ynkdir / if_mzscheme.diff
Last active January 16, 2016 08:03
vim if_mzsch doesn't work
diff --git a/runtime/doc/if_mzsch.txt b/runtime/doc/if_mzsch.txt
index b42570a..1da8ccc 100644
--- a/runtime/doc/if_mzsch.txt
+++ b/runtime/doc/if_mzsch.txt
@@ -1,4 +1,4 @@
-*if_mzsch.txt* For Vim version 7.4. Last change: 2012 Dec 17
+*if_mzsch.txt* For Vim version 7.4. Last change: 2016 Jan 10
VIM REFERENCE MANUAL by Sergey Khorev
@ynkdir
ynkdir / weeknum.js
Created December 25, 2015 09:20
weeknum.js
// うるう年
Date.prototype.isLeapYear = function() {
var y = this.getFullYear();
return (y % 4 == 0 && y % 100 != 0) || (y % 400 == 0);
};
// 年間積算日
Date.prototype.getDayOfYear = function() {
var days1 = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334]
var days2 = [0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335]
@ynkdir
ynkdir / figure1.png
Last active December 24, 2015 03:42
vim calendar generator
figure1.png
@ynkdir
ynkdir / dassword.go
Created November 3, 2015 11:10
dassword
package main
import (
"crypto/rand"
"encoding/base64"
"fmt"
"log"
)
func main() {
@ynkdir
ynkdir / patiencediff.go
Last active September 9, 2015 09:20
patiencedif.go
package main
// Patience Diff Advantages
// http://bramcohen.livejournal.com/73318.html
//
// Patience Diff, a brief summary
// http://alfedenzo.livejournal.com/170301.html
//
// 1. Match the first lines of both if they're identical, then match the
// second, third, etc. until a pair doesn't match.
@ynkdir
ynkdir / test_scrollwindowex.c
Last active September 5, 2015 14:07
ScrollWindowEx() does not scroll out text occationally.
#include <windows.h>
#include <stdio.h>
#include <string.h>
LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR szCmdLine, int iCmdShow) {
HWND hwnd;
MSG msg;
WNDCLASSEX cls;