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
# -*- coding: utf-8 -*- | |
import re | |
from xkeysnail.transform import * | |
define_keymap(None, { | |
K('C-h'): Key.LEFT, | |
K('C-j'): Key.DOWN, | |
K('C-k'): Key.UP, | |
K('C-l'): Key.RIGHT, |
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 csv2md | |
function usage | |
echo "Description: Convert csv file to table in markdown format." | |
echo "Usage: csv2md [-z] FILE" | |
echo "Options and arguments:" | |
echo -e "\t-z\t: Uncompress gzip archived csv" | |
echo -e "\tFILE\t: Path to CSV file" | |
end | |
set command "cat" |
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
import argparse | |
import codecs | |
import csv | |
import pathlib | |
# Default: "Group","Title","Username","Password","URL","Notes" | |
ideal_header = ["Title", "URL", "Username", "Password", "Notes", "Group"] | |
def main(): | |
parser = argparse.ArgumentParser(description="Make CSV exported from KeePassX compatible with 1Password.") |
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
set noautofocus | |
set smoothscroll | |
set typelinkhints | |
let searchlimit = 30 | |
let scrollstep = 100 | |
set nativelinkorder | |
" set showtabindices | |
set completeonopen |
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 ( | |
"fmt" | |
"math" | |
) | |
func main() { | |
const MAX = 4 | |
const N = 100000000 |
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
{ | |
"base": { | |
"notify": false, | |
"shell": "/bin/bash", | |
"with_user_env": true | |
}, | |
"networks": [ | |
{ | |
"SSID": "ssid1", |
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
$ python -V | |
3.6.0 | |
$ python sub_stdout.py | |
Execute: echo 'test' | |
Result: test | |
<class 'str'> |
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
from urllib.request import urlopen | |
import json | |
res = urlopen("https://itunes.apple.com/search?term=beatles&media=music&entity=album&country=jp") | |
j = json.loads(res.read().decode("utf-8")) | |
for i, result in enumerate(j["results"]): | |
print(i, result["collectionName"]) |
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
" release autogroup in MyAutoCmd | |
augroup MyAutoCmd | |
autocmd! | |
augroup END | |
"-----------表示設定---------- | |
set number "行番号表示 | |
set showmatch "括弧入力時の対応する括弧を表示 | |
syntax on "コードの色分け | |
set matchtime=3 "ハイライト時間を3秒に |