This file contains 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
let t = eskk#table#create('my_table', 'rom_to_hira') | |
call t.add('va', 'ゔぁ') | |
call t.add('vi', 'ゔぃ') | |
call t.add('vu', 'ゔ') | |
call t.add('ve', 'ゔぇ') | |
call t.add('vo', 'ゔぉ') | |
call t.register() | |
unlet t | |
let g:eskk_mode_use_tables.hira = 'my_table' |
This file contains 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
package main | |
import ( | |
"bytes" | |
"encoding/binary" | |
"fmt" | |
"io/ioutil" | |
"net/http" | |
"os" | |
"strings" |
This file contains 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
function delay(msec, value) { | |
return new Promise(done => window.setTimeout((() => done(value)), msec)); | |
} | |
function isResolved(promise) { | |
return Promise.race([delay(0, false), promise.then(() => true, () => false)]); | |
} | |
function isRejected(promise) { | |
return Promise.race([delay(0, false), promise.then(() => false, () => true)]); |
This file contains 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
もしあなたが新しいプログラム、例えばテキストエディタを作るとしたら、どの言語で作る? | |
Suppose you want to write a new program, something like a text editor. What language would you write it in? | |
* できるだけ速く。なのでインタプリタ言語はダメ。 | |
* It has to be as fast as possible, so interpreted languages are out. | |
* ちまちまメモリ管理なんてしたくない。だからCはダメ。 | |
* You don't want to micro manage memory, so C is out. | |
* プログラマに学位をとれなんて言いたくない。だからC++はダメ。 | |
* You don't want to require programmers to have a degree, so C++ is out. | |
* できるだけ起動は速いほうがいいし、ランタイムには依存させたくない。だからJavaはダメ。 |
This file contains 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
{ | |
"title": "[macOS] Windows-like word movement/selection/deletion", | |
"rules": [ | |
{ | |
"description": "Ctrl + Arrow Keys to Option + Arrow Keys", | |
"manipulators": [ | |
{ | |
"from": { | |
"key_code": "up_arrow", | |
"modifiers": { |
This file contains 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
@echo off | |
start "MinTTY cmd.exe" "C:\msys64\usr\bin\mintty.exe" cmd.exe %1 %2 %3 %4 %5 %6 %7 %8 %9 |
This file contains 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
diff --git a/plugin/gist.vim b/plugin/gist.vim | |
index 574b7e8..ffc276f 100644 | |
--- a/plugin/gist.vim | |
+++ b/plugin/gist.vim | |
@@ -556,6 +556,11 @@ function! s:GistPost(user, token, content, private) | |
let quote = &shellxquote == '"' ? "'" : '"' | |
let url = 'https://gist.github.com/gists' | |
let res = system('curl -i -d @'.quote.file.quote.' '.url) | |
+ echohl Error | |
+ for _ in split(res, '\n') |
This file contains 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
" Substitute a:from => a:to by string. | |
" To substitute by pattern, use substitute() instead. | |
function! s:substring(str, from, to) | |
if a:str ==# '' || a:from ==# '' | |
return a:str | |
endif | |
let str = a:str | |
let idx = stridx(str, a:from) | |
while idx !=# -1 |
This file contains 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
is_screen_running() { | |
# tscreen also uses this varariable. | |
[ ! -z "$WINDOW" ] | |
} | |
is_tmux_runnning() { | |
[ ! -z "$TMUX" ] | |
} | |
is_screen_or_tmux_running() { | |
is_screen_running || is_tmux_runnning | |
} |
This file contains 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
[Unit] | |
Description=Calibre Content Server | |
After=network.target | |
[Service] | |
Type=simple | |
User=tyru | |
Group=tyru | |
ExecStart=/usr/bin/calibre-server --with-library /mnt/server/calibre --port 8080 | |
NewerOlder