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
// gcc -o overwirte_iat.exe overwwrite_iat1.c -lDbghelp | |
#include <windows.h> | |
#include <stdio.h> | |
#include <inttypes.h> | |
#include <dbghelp.h> | |
FILE *myfopen(const char *fname, const char *mode) | |
{ | |
return stdout; |
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
local ffi = require'ffi' | |
ffi.cdef[[ | |
typedef unsigned long DWORD; | |
typedef void* HANDLE; | |
typedef int BOOL; | |
BOOL GetConsoleMode(HANDLE h, DWORD *mode); | |
BOOL SetConsoleMode(HANDLE h, DWORD mode); | |
HANDLE GetStdHandle(DWORD stdhandle); | |
enum { | |
STD_INPUT_HANDLE = ((DWORD)-10), |
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
sigwinch_cb (1) | |
sigwinch_cb (2) | |
sigwinch_cb (3) | |
tui_grid_resize (1) -> got_winch = false | |
tui_grid_resize (2) -> uinibi_out_ext(ui, data->unibi_ext.resize_screen) | |
sigwinch_cb (4) -> got_winch = true by tui_grid_resize (2) | |
tui_grid_resize (3) -> got_winch = false | |
tui_grid_resize (4) -> uinibi_out_ext(ui, data->unibi_ext.resize_screen) | |
sigwinch_cb (5) -> got_winch = true by tui_grid_resize (4) | |
tui_grid_resize (5) -> got_winch = false |
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
http://invisible-island.net/xterm/ | |
XTerm Control Sequences | |
Edward Moy | |
University of California, Berkeley | |
Revised by |
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
Copyright 2005 Red Hat Inc., Max Kaehn | |
All cygwin threads have separate context in an object of class _cygtls. The | |
storage for this object is kept on the stack in the bottom CYGTLS_PADSIZE | |
bytes. Each thread references the storage via the Thread Environment Block | |
(aka Thread Information Block), which Windows maintains for each user thread | |
in the system, with the address in the FS segment register. The memory | |
is laid out as in the NT_TIB structure from <w32api/winnt.h>: | |
全ての cygwin スレッドは class _cygtls のオブジェクト中に別個のコンテキストを持っています。 |
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
-- When running on a thread from luajit on Windows, it terminates abnormally | |
-- with "Uncaught Error: attempt to call nil value" after calling on_setup(). | |
-- If executed in the main thread, session:run() will return without blocking. | |
local uv = vim and vim.loop or require'luv' | |
local M = {} | |
local id = 0 | |
function M.entry_func(id, file_or_addr, is_remote) |
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
state_enter | |
terminal_execute | |
terminal_send_key | |
vterm_keyboard_key | |
or | |
vterm_keyboard_unichar | |
terminal_fluash_output | |
vterm_output_read | |
terminal_send | |
term->opt.write_cb = term_write (Set by channel_terminal_open called from f_termopen) |
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
--- _overlapped.py.orig 2021-08-16 13:38:30.403944500 +0900 | |
+++ _overlapped.py 2021-08-16 17:53:21.577925100 +0900 | |
@@ -272,17 +272,17 @@ | |
if self.type != OverlappedType.TYPE_NONE: | |
_winapi.raise_WinError() | |
- self.write_buffer = bytes(bufobj) | |
+ self.write_buffer = _ffi.new("WSABUF[1]") | |
self.type = OverlappedType.TYPE_WRITE | |
self.handle = handle |
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
--[[ | |
Use Windows native clangd from wsl neovim. | |
git clone https://github.com/neovim/nvim-lspconfig ~/src/github.com/neovim/nvim-lspconfig | |
nvim -u init.lua | |
]]-- | |
vim.o.rtp = '~/src/github.com/neovim/nvim-lspconfig,' .. vim.o.rtp | |
local URI_SCHEME_PATTERN = '^([a-zA-Z]+[a-zA-Z0-9+-.]*)://.*' |
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
[ftplugin] | |
c = ''' | |
if !exists('s:loaded') | |
" We only need to call 'setup' the first time. If neovim/nvim-lspconfig#676 | |
" is not merged, multiple calls to 'setup' will result in multiple autocmd | |
" settings, multiple 'try_add' runs, and multiple client runs for nothing. | |
lua require'lspconfig'.clangd.setup{} | |
" After calling setup, autocmd will call 'try_add', so call 'try_add' only the | |
" first time. | |
lua require'lspconfig'['clangd'].manager.try_add() |