Skip to content

Instantly share code, notes, and snippets.

View yamaya's full-sized avatar

Masayuki Yamaya yamaya

  • Sapporo, Hokkaido, Japan
View GitHub Profile
@yamaya
yamaya / kitty.conf
Last active April 5, 2024 06:26
Edit kitty's scroll buffer contents by nvim
map kitty_mod+v launch --stdin-source=@screen_scrollback --copy-colors --type=overlay-main nvim
@yamaya
yamaya / xcode-clang-vers
Last active April 3, 2024 02:28
Xcode clang version record
# Xcode 4.3.3
Apple clang version 3.1 (tags/Apple/clang-318.0.61) (based on LLVM 3.1svn)
Target: x86_64-apple-darwin11.4.0
Thread model: posix
# Xcode 4.3.2
Apple clang version 3.1 (tags/Apple/clang-318.0.58) (based on LLVM 3.1svn)
Target: x86_64-apple-darwin11.4.0
Thread model: posix
@yamaya
yamaya / xcode-swift-vers
Last active March 6, 2024 05:39
Xcode swift version record
# Xcode 6.2 (6C131e)
Swift version 1.1 (swift-600.0.57.4)
Target: x86_64-apple-darwin14.1.0
# Xcode 6.3 (6D570)
Apple Swift version 1.2 (swiftlang-602.0.49.3 clang-clang-602.0.49)
Target: x86_64-apple-darwin14.1.0
# Xcode 6.3.1 (6D1002)
Apple Swift version 1.2 (swiftlang-602.0.49.6 clang-602.0.49)
@yamaya
yamaya / change-mouse-motion-sticky.json
Created April 16, 2020 13:39
Karabiner-Elements: Mouse イベントをスクロールホイールに変換する - Button4でトグルする
{
"maintainers": [
"yamaya"
],
"rules": [
{
"available_since": "12.3.0",
"description": "Convert mouse move to scroll wheel (Toggle with button4)",
"manipulators": [
{
@yamaya
yamaya / NSHashTable+NSMapTable.md
Last active February 15, 2022 00:22
NSHashTableとNSMapTable

NSHashTable & NSMapTable - NSHipsterの超意訳。

[iphone] NSHashTableとNSMapTable

[2014-08-26 18:45]

NSSetは値を強参照でもつ。NSDictionaryは値は強参照で、キーはコピーされる。 開発者が弱参照の値を保持したいとか、NSCopyingに適合しないオブジェクトをキーにしたい場合はNSValue +valueWithNonretainedObject:を使う必要があった。

このようなケースにおいて、iOS 6(MacではOS X 10.5)以降だと、NSHashTableNSMapTableを使用できる。

@yamaya
yamaya / clap-mappings.vim
Last active December 9, 2020 14:17
vim-clap: I want to ignore the ".gitignore" setting, but exclude ".git/" in "files" provider
nnoremap <silent>,. :<C-u>Clap files ++finder=rg --vimgrep --files --follow --hidden --no-ignore --glob !.git<CR>
@yamaya
yamaya / gui.c.patch
Created June 4, 2020 13:23
This patch resolves an issue where some modifier keys could not be remapped on MacVim.
diff --git a/src/gui.c b/src/gui.c
index db59980a7..0d47396c8 100644
--- a/src/gui.c
+++ b/src/gui.c
@@ -812,7 +812,7 @@ gui_init(void)
gui_mch_disable_beval_area(balloonEval);
#endif
-#ifndef FEAT_GUI_MSWIN
+#if !defined(FEAT_GUI_MSWIN) && !defined(FEAT_GUI_MACVIM)
@yamaya
yamaya / macvim-inline-input-method-when-noimdisable.patch
Last active April 16, 2020 01:08
MacVim: imdisableを無効にした場合に日本語インライン入力がおかしい問題を修正
commit db357a103 (HEAD -> fix/my-patches, origin/fix/my-patches)
Author: Masayuki Yamaya <>
Date: Wed Apr 15 18:13:57 2020 +0900
imdisableを無効にした場合に日本語インライン入力がおかしい問題を修正
直接的に効果出てるのはメッセージ送信をやめた事だと思う。
このメッセージが巡り巡って下線付きテキスト表示モードを中止してしまう。
`-setImState:`は呼ばなくても良さげなので一緒に削除してみた。
@yamaya
yamaya / using-commoncrypot-in-swifty-framework.md
Last active January 10, 2020 01:45
Swift製のframeworkでlibcommonCrypto.dylibを使う方法
@yamaya
yamaya / handler.go.diff
Created August 8, 2019 16:33
patch for mattn/efm-langserver: Fixed a bug when lint-stdin is false
diff --git a/langserver/handler.go b/langserver/handler.go
index 73e9be1..fbe5a8f 100644
--- a/langserver/handler.go
+++ b/langserver/handler.go
@@ -157,11 +157,17 @@ func (h *langHandler) lint(uri string) []Diagnostic {
diagnostics := []Diagnostic{}
+ cmdline := config.LintCommand
+ if !config.LintStdin {