├── mac ├── tmux.conf ├── mysqlrc ├── duckdbrc ├── CLAUDE.md ├── azurerc ├── screenrc ├── sshrc ├── psqlrc ├── ghostty ├── git_ignore ├── karabiner.json ├── mise_config.toml ├── brew.list ├── settings_claude.json ├── bashrc ├── settings.json ├── curlrc ├── keybindings_cursor.json5 ├── vimrc └── keybindings.json ├── linux ├── oth │ ├── pyrc │ ├── tmp │ │ ├── linux │ │ │ ├── .inputrc │ │ │ ├── .zshenv │ │ │ ├── .gemrc │ │ │ ├── .vim │ │ │ │ ├── snippets │ │ │ │ │ └── perl.snip │ │ │ │ └── .cheatsheet.md │ │ │ ├── vim │ │ │ │ ├── .netrwhist │ │ │ │ ├── dein_lazy.toml │ │ │ │ ├── README.md │ │ │ │ ├── dein_init.vim │ │ │ │ ├── dein.toml │ │ │ │ └── init.vim │ │ │ ├── install.sh │ │ │ ├── .tigrc │ │ │ ├── .bash_profile │ │ │ ├── .ansible.cfg │ │ │ ├── .wgetrc │ │ │ ├── .pryrc │ │ │ ├── .tmux.conf │ │ │ ├── .ctags │ │ │ ├── .bashrc │ │ │ └── .gitconfig │ │ ├── check_status.sh │ │ └── old_srv │ │ │ ├── tmux.conf │ │ │ └── bashrc │ ├── rc │ ├── hgrc │ ├── npmrc │ ├── yarnrc │ ├── textlintrc │ ├── .gdbinit │ ├── perlrc │ ├── debian │ │ ├── rules │ │ └── lsrc │ ├── Makefile.pl │ ├── gvimrc │ ├── irbrc │ ├── setup │ │ ├── bootstrap_worker.sh │ │ ├── bootstrap_master.sh │ │ └── setup.sh │ ├── wgetrc │ ├── initzshrc │ ├── alias │ ├── profile │ ├── dotfiles.yml │ ├── tests │ │ └── py_main.py │ ├── tumxrc │ ├── curlrc │ ├── bashrc │ ├── k8s-master.sh │ ├── vim │ │ └── filetypes.vim │ ├── awsrc │ └── install.sh ├── README.md ├── tmux.conf ├── install.sh └── docker.yaml ├── windows └── .gitkeep ├── README.md ├── tmp ├── mac │ ├── zsh │ │ ├── dotfiles │ │ ├── .zshrc │ │ └── .zsh │ │ │ ├── plugin.zsh │ │ │ ├── completion.zsh │ │ │ ├── alias.zsh │ │ │ ├── setopt.zsh │ │ │ └── completion │ │ │ ├── _jq │ │ │ └── _fzf │ ├── bash │ │ └── .bashrc │ ├── nvim │ │ ├── .config │ │ │ └── nvim │ │ │ │ ├── plugins │ │ │ │ ├── template │ │ │ │ │ ├── python │ │ │ │ │ │ ├── snip-doc.py │ │ │ │ │ │ ├── base-main.py │ │ │ │ │ │ ├── snip-class.py │ │ │ │ │ │ ├── base-class.py │ │ │ │ │ │ └── base-test.py │ │ │ │ │ ├── c │ │ │ │ │ │ └── c │ │ │ │ │ │ │ ├── snip-comment-block.c │ │ │ │ │ │ │ ├── snip-for.c │ │ │ │ │ │ │ ├── base-main.c │ │ │ │ │ │ │ ├── snip-win32-formaterror.c │ │ │ │ │ │ │ ├── base-main-gtk.c │ │ │ │ │ │ │ └── base-socket-server.c │ │ │ │ │ ├── cpp │ │ │ │ │ │ ├── snip-comment-block.cpp │ │ │ │ │ │ ├── snip-stl-cout.cpp │ │ │ │ │ │ ├── snip-for.cpp │ │ │ │ │ │ ├── snip-boost-foreach.cpp │ │ │ │ │ │ ├── base-main.cpp │ │ │ │ │ │ ├── snip-stl-for_each.cpp │ │ │ │ │ │ ├── base-stl-main.cpp │ │ │ │ │ │ └── base-boost-main.cpp │ │ │ │ │ ├── go │ │ │ │ │ │ ├── base-package.go │ │ │ │ │ │ ├── snip-defer.go │ │ │ │ │ │ ├── snip-goroutine.go │ │ │ │ │ │ ├── base-main.go │ │ │ │ │ │ ├── snip-web-webgo-get.go │ │ │ │ │ │ ├── snip-web-webgo-post.go │ │ │ │ │ │ ├── snip-web-standard-fileserve.go │ │ │ │ │ │ ├── snip-recover.go │ │ │ │ │ │ ├── base-package-cgo.go │ │ │ │ │ │ ├── snip-web-goji-get.go │ │ │ │ │ │ ├── snip-web-goji-post.go │ │ │ │ │ │ ├── snip-db-open.go │ │ │ │ │ │ ├── snip-web-standard-handlefunc.go │ │ │ │ │ │ ├── snip-signal.go │ │ │ │ │ │ ├── snip-test-case.go │ │ │ │ │ │ ├── snip-db-query.go │ │ │ │ │ │ ├── base-web-webgo.go │ │ │ │ │ │ ├── base-test.go │ │ │ │ │ │ ├── base-web-ion.go │ │ │ │ │ │ ├── base-web-echo.go │ │ │ │ │ │ ├── base-web-standard.go │ │ │ │ │ │ ├── base-web-goji.go │ │ │ │ │ │ ├── base-web-gin.go │ │ │ │ │ │ ├── snip-sorter.go │ │ │ │ │ │ └── pattern.stpl │ │ │ │ │ ├── java │ │ │ │ │ │ ├── snip-comment-block.java │ │ │ │ │ │ ├── snip-doc-comment.java │ │ │ │ │ │ ├── snip-main.java │ │ │ │ │ │ ├── snip-test-func.java │ │ │ │ │ │ ├── snip-try-catch-finally.java │ │ │ │ │ │ ├── snip-spark-get.java │ │ │ │ │ │ ├── base-main.java │ │ │ │ │ │ ├── snip-spark-post.java │ │ │ │ │ │ ├── snip-getter.java │ │ │ │ │ │ ├── pattern.stpl │ │ │ │ │ │ ├── base-play-controller.java │ │ │ │ │ │ ├── base-class.java │ │ │ │ │ │ ├── base-test.java │ │ │ │ │ │ ├── base-spark.java │ │ │ │ │ │ └── snip-getter-setter.java │ │ │ │ │ ├── vim │ │ │ │ │ │ ├── base-script.vim │ │ │ │ │ │ ├── snip-autoloadfunc.vim │ │ │ │ │ │ └── base-plugin.vim │ │ │ │ │ ├── javascript │ │ │ │ │ │ ├── base-anon-call.js │ │ │ │ │ │ ├── snip-anon-function.js │ │ │ │ │ │ ├── snip-try-catch.js │ │ │ │ │ │ ├── snip-interval.js │ │ │ │ │ │ ├── snip-settimeout.js │ │ │ │ │ │ ├── base-jquery-readly.js │ │ │ │ │ │ ├── snip-jquery-each.js │ │ │ │ │ │ ├── snip-jquery-getjson.js │ │ │ │ │ │ ├── snip-try-catch-finally.js │ │ │ │ │ │ ├── base-es6-class.js │ │ │ │ │ │ ├── snip-jquery-yql.js │ │ │ │ │ │ ├── snip-es6-getter.js │ │ │ │ │ │ ├── snip-es6-setter.js │ │ │ │ │ │ └── pattern.stpl │ │ │ │ │ ├── html │ │ │ │ │ │ ├── snip-script.html │ │ │ │ │ │ ├── snip-link-css.html │ │ │ │ │ │ ├── snip-link-meta-refresh.html │ │ │ │ │ │ ├── snip-link-icon.html │ │ │ │ │ │ ├── snip-basic-layout.html │ │ │ │ │ │ ├── base-page.html │ │ │ │ │ │ └── pattern.stpl │ │ │ │ │ ├── perl │ │ │ │ │ │ ├── base-script.pl │ │ │ │ │ │ ├── base-test.pl │ │ │ │ │ │ ├── snip-lwp-useragent.pl │ │ │ │ │ │ ├── snip-sub.pl │ │ │ │ │ │ ├── snip-file-read.pl │ │ │ │ │ │ ├── snip-dbi-connect-mysql.pl │ │ │ │ │ │ ├── snip-dbi-connect-oracle.pl │ │ │ │ │ │ ├── snip-dbi-connect-sqlite.pl │ │ │ │ │ │ ├── snip-growl-any.pl │ │ │ │ │ │ ├── snip-dbi-prepare.pl │ │ │ │ │ │ ├── base-psgi-hello.pl │ │ │ │ │ │ ├── base-package.pl │ │ │ │ │ │ ├── snip-pit.pl │ │ │ │ │ │ ├── snip-web-scraper.pl │ │ │ │ │ │ ├── base-psgi-static.pl │ │ │ │ │ │ └── base-make.pl │ │ │ │ │ ├── dockerfile │ │ │ │ │ │ └── base-main.dockerfile │ │ │ │ │ ├── make │ │ │ │ │ │ ├── snip-os-detect.mak │ │ │ │ │ │ ├── snip-os-cpu-detect.mak │ │ │ │ │ │ ├── base-c.mak │ │ │ │ │ │ └── base-cpp.mak │ │ │ │ │ ├── cs │ │ │ │ │ │ └── base-program.cs │ │ │ │ │ ├── markdown │ │ │ │ │ │ ├── base-readme-sharp.md │ │ │ │ │ │ ├── base-post.md │ │ │ │ │ │ └── base-readme.md │ │ │ │ │ ├── php │ │ │ │ │ │ ├── snip-getter.php │ │ │ │ │ │ └── snip-getter-setter.php │ │ │ │ │ └── _ │ │ │ │ │ │ ├── file-LICENSE-mit.txt │ │ │ │ │ │ └── file-LICENSE-pd.txt │ │ │ │ └── .cheatsheet.md │ │ │ │ ├── dein_lazy.toml │ │ │ │ ├── coc-settings.json │ │ │ │ ├── init.vim │ │ │ │ ├── indent.vim │ │ │ │ └── options.vim │ │ └── install.sh │ ├── vim │ │ ├── .vim │ │ │ ├── snippets │ │ │ │ └── perl.snip │ │ │ └── .cheatsheet.md │ │ └── a.conf │ ├── navi │ │ ├── README.md │ │ └── cheats │ │ │ ├── docker.cheat │ │ │ ├── awk.cheat │ │ │ ├── curl.cheat │ │ │ └── brew.cheat │ ├── vscode │ │ ├── perl.profile │ │ └── setting.json │ ├── playbook │ │ ├── Dockerfile │ │ ├── ansible.cfg │ │ ├── brew_list.c │ │ └── playbook.yml │ ├── git │ │ ├── hooks │ │ │ ├── _func │ │ │ ├── _safe_mt │ │ │ ├── _comment_af │ │ │ └── pre_push │ │ ├── .gitconfig │ │ └── master │ ├── mini │ │ ├── coc-settings.json │ │ └── dein.toml │ └── tmux │ │ ├── tmux.vim │ │ └── .tmux.conf └── windows │ ├── screenrc │ ├── README.md │ ├── git │ └── hooks │ │ ├── pre_push.sh │ │ └── git_pymem │ ├── teraterm.ini │ └── alias.ps1 ├── Makefile ├── .gitignore ├── .github └── workflows │ └── docker-image.yml ├── bootstrap.sh ├── .gitconfig ├── LICENSE └── .gitignore_template /mac/tmux.conf: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /linux/oth/pyrc: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /windows/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /linux/README.md: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## Overview 2 | -------------------------------------------------------------------------------- /mac/mysqlrc: -------------------------------------------------------------------------------- 1 | pager less 2 | -------------------------------------------------------------------------------- /tmp/mac/zsh/dotfiles: -------------------------------------------------------------------------------- 1 | linux 2 | -------------------------------------------------------------------------------- /tmp/mac/bash/.bashrc: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | -------------------------------------------------------------------------------- /mac/duckdbrc: -------------------------------------------------------------------------------- 1 | .maxrows 1000 2 | .timer on 3 | -------------------------------------------------------------------------------- /linux/oth/tmp/linux/.inputrc: -------------------------------------------------------------------------------- 1 | # Begin /etc/inputrc 2 | -------------------------------------------------------------------------------- /mac/CLAUDE.md: -------------------------------------------------------------------------------- 1 | ## YOU MUST: 2 | - 回答は日本語で行ってください 3 | -------------------------------------------------------------------------------- /linux/oth/tmp/linux/.zshenv: -------------------------------------------------------------------------------- 1 | PATH=/usr/local/bin:$PATH 2 | -------------------------------------------------------------------------------- /linux/oth/tmp/linux/.gemrc: -------------------------------------------------------------------------------- 1 | install: --no-document 2 | update: --no-document 3 | -------------------------------------------------------------------------------- /mac/azurerc: -------------------------------------------------------------------------------- 1 | [cloud] 2 | name = AzureCloud 3 | tenant_id = env.AZURE_TENANT_ID 4 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/python/snip-doc.py: -------------------------------------------------------------------------------- 1 | """ 2 | {{_cursor_}} 3 | """ 4 | -------------------------------------------------------------------------------- /linux/oth/rc: -------------------------------------------------------------------------------- 1 | EXCLUDES="README.md LICENSE" 2 | DOTFILES_DIRS="$HOME/dotfiles-local $HOME/dotfiles" 3 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/c/c/snip-comment-block.c: -------------------------------------------------------------------------------- 1 | /** 2 | * {{_cursor_}} 3 | */ 4 | -------------------------------------------------------------------------------- /linux/oth/hgrc: -------------------------------------------------------------------------------- 1 | [ui] 2 | username = thinca 3 | ignore = ~/.hgignore 4 | editor = vim 5 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/cpp/snip-comment-block.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * {{_cursor_}} 3 | */ 4 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/go/base-package.go: -------------------------------------------------------------------------------- 1 | package {{_name_}} 2 | 3 | {{_cursor_}} 4 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/go/snip-defer.go: -------------------------------------------------------------------------------- 1 | defer func() { 2 | {{_cursor_}} 3 | }() 4 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/go/snip-goroutine.go: -------------------------------------------------------------------------------- 1 | go func() { 2 | {{_cursor_}} 3 | }() 4 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/java/snip-comment-block.java: -------------------------------------------------------------------------------- 1 | /* 2 | * {{_cursor_}} 3 | */ 4 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/java/snip-doc-comment.java: -------------------------------------------------------------------------------- 1 | /** 2 | * {{_cursor_}} 3 | */ 4 | -------------------------------------------------------------------------------- /mac/screenrc: -------------------------------------------------------------------------------- 1 | defutf8 on 2 | defencoding utf8 3 | encoding utf8 utf8 4 | startup_message off 5 | vbell off 6 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/vim/base-script.vim: -------------------------------------------------------------------------------- 1 | scriptencoding utf-8 2 | 3 | {{_cursor_}} 4 | -------------------------------------------------------------------------------- /linux/oth/npmrc: -------------------------------------------------------------------------------- 1 | prefix=${HOME}/.npm 2 | tmp=/tmp 3 | init.license=Zlib 4 | init-license=MIT 5 | init-version=0.1.0 6 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/cpp/snip-stl-cout.cpp: -------------------------------------------------------------------------------- 1 | std::cout << {{_input_:string}} << std::endl; 2 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/javascript/base-anon-call.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | {{_cursor_}} 3 | })(); 4 | -------------------------------------------------------------------------------- /tmp/mac/vim/.vim/snippets/perl.snip: -------------------------------------------------------------------------------- 1 | snippet perl 2 | #!/usr/bin/perl -w 3 | use strict; 4 | ${1} 5 | -------------------------------------------------------------------------------- /linux/oth/tmp/linux/.vim/snippets/perl.snip: -------------------------------------------------------------------------------- 1 | snippet perl 2 | #!/usr/bin/perl -w 3 | use strict; 4 | ${1} 5 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/go/base-main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | func main() { 4 | {{_cursor_}} 5 | } 6 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/javascript/snip-anon-function.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | {{_cursor_}} 3 | })(); 4 | -------------------------------------------------------------------------------- /linux/oth/yarnrc: -------------------------------------------------------------------------------- 1 | --registry "https://registry.npmjs.org/" 2 | --scripts-prepend-node-path true 3 | --ignore-engines true 4 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/go/snip-web-webgo-get.go: -------------------------------------------------------------------------------- 1 | web.Get("/", func() string { 2 | {{_cursor_}} 3 | }) 4 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/go/snip-web-webgo-post.go: -------------------------------------------------------------------------------- 1 | web.Post("/", func() string { 2 | {{_cursor_}} 3 | }) 4 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/html/snip-script.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/javascript/snip-try-catch.js: -------------------------------------------------------------------------------- 1 | try { 2 | {{_cursor_}} 3 | } catch(e) { 4 | } 5 | 6 | -------------------------------------------------------------------------------- /tmp/windows/screenrc: -------------------------------------------------------------------------------- 1 | defencoding utf-8 2 | 3 | escape ^Tt 4 | 5 | vbell on 6 | 7 | startup_message on 8 | autodetach on 9 | -------------------------------------------------------------------------------- /tmp/mac/navi/README.md: -------------------------------------------------------------------------------- 1 | install 2 | 3 | ``` 4 | $ ln -s $(pwd)/cheats /usr/local/Cellar/navi/${VERSION}/libexec/cheats 5 | ``` 6 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/c/c/snip-for.c: -------------------------------------------------------------------------------- 1 | for (int n = 0; n < {{_input_:count}}; n++) { 2 | {{_cursor_}} 3 | } 4 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/cpp/snip-for.cpp: -------------------------------------------------------------------------------- 1 | for (int n = 0; n < {{_input_:count}}; n++) { 2 | {{_cursor_}} 3 | } 4 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/go/snip-web-standard-fileserve.go: -------------------------------------------------------------------------------- 1 | http.Handle("/", http.FileServer(http.Dir("."))) 2 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/html/snip-link-css.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/java/snip-main.java: -------------------------------------------------------------------------------- 1 | public static void main(String[] args) { 2 | {{_cursor_}} 3 | } 4 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/javascript/snip-interval.js: -------------------------------------------------------------------------------- 1 | setInterval(function() { 2 | {{_cursor_}} 3 | }, 200); 4 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/javascript/snip-settimeout.js: -------------------------------------------------------------------------------- 1 | setTimeout(function() { 2 | {{_cursor_}} 3 | }, 200); 4 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/perl/base-script.pl: -------------------------------------------------------------------------------- 1 | use strict; 2 | use warnings; 3 | use utf8; 4 | 5 | {{_cursor_}} 6 | -------------------------------------------------------------------------------- /linux/oth/tmp/linux/vim/.netrwhist: -------------------------------------------------------------------------------- 1 | let g:netrw_dirhistmax =10 2 | let g:netrw_dirhist_cnt =1 3 | let g:netrw_dirhist_1='/root/.vim' 4 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/html/snip-link-meta-refresh.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /mac/sshrc: -------------------------------------------------------------------------------- 1 | echo "\"$USER\" has logged in to host from \"$SSH_CLIENT\" at `date +"%F %H:%M:%S"`" | mail -s "sshd login notification" root 2 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/cpp/snip-boost-foreach.cpp: -------------------------------------------------------------------------------- 1 | BOOST_FOREACH(auto x, {{_input_:variable}}) { 2 | {{_cursor_}} 3 | } 4 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/go/snip-recover.go: -------------------------------------------------------------------------------- 1 | defer func() { 2 | if recover() != nil { 3 | {{_cursor_}} 4 | } 5 | }() 6 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/html/snip-link-icon.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/java/snip-test-func.java: -------------------------------------------------------------------------------- 1 | @Test 2 | public void test{{_input_:func}}() { 3 | {{_cursor_}} 4 | } 5 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/vim/snip-autoloadfunc.vim: -------------------------------------------------------------------------------- 1 | function! {{_expr_:expand("%:p:t:r")}}#{{_cursor_}}() 2 | endfunction 3 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/javascript/base-jquery-readly.js: -------------------------------------------------------------------------------- 1 | $(function() { 2 | {{_cursor_}} 3 | }); 4 | {{_filter_:jquery}} 5 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/javascript/snip-jquery-each.js: -------------------------------------------------------------------------------- 1 | $.each({{_input_:variable}}, function() { 2 | {{_cursor_}} 3 | }); 4 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/go/base-package-cgo.go: -------------------------------------------------------------------------------- 1 | package {{_name_}} 2 | 3 | /* 4 | #include {{_cursor_}} 5 | 6 | */ 7 | import "C" 8 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/javascript/snip-jquery-getjson.js: -------------------------------------------------------------------------------- 1 | $.getJSON("{{_input_:URL}}", function(data) { 2 | {{_cursor_}} 3 | }); 4 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/javascript/snip-try-catch-finally.js: -------------------------------------------------------------------------------- 1 | try { 2 | {{_cursor_}} 3 | } catch(e) { 4 | } finally { 5 | } 6 | 7 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/perl/base-test.pl: -------------------------------------------------------------------------------- 1 | use strict; 2 | use warnings; 3 | use utf8; 4 | use Test::More; 5 | 6 | {{_cursor_}} 7 | -------------------------------------------------------------------------------- /linux/oth/textlintrc: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-todo": true, 4 | "preset-ja-technical-writing": true, 5 | "preset-jtf-style": true 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/perl/snip-lwp-useragent.pl: -------------------------------------------------------------------------------- 1 | my $ua = LWP::UserAgent->new; 2 | $ua->env_proxy; 3 | my $res = $ua->get("{{_cursor_}}"); 4 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/c/c/base-main.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int 4 | main(int argc, char* argv[]) { 5 | {{_cursor_}} 6 | return 0; 7 | } 8 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/go/snip-web-goji-get.go: -------------------------------------------------------------------------------- 1 | goji.Get("/", func(c web.C, w http.ResponseWriter, r *http.Request) { 2 | {{_cursor_}} 3 | }) 4 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/go/snip-web-goji-post.go: -------------------------------------------------------------------------------- 1 | goji.Post("/", func(c web.C, w http.ResponseWriter, r *http.Request) { 2 | {{_cursor_}} 3 | }) 4 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/perl/snip-sub.pl: -------------------------------------------------------------------------------- 1 | sub {{_input_:function name}} { 2 | my ($self{{_input_:arguments}}) = @_; 3 | {{_cursor_}} 4 | } 5 | 6 | -------------------------------------------------------------------------------- /mac/psqlrc: -------------------------------------------------------------------------------- 1 | \set PROMPT1 '%[%033[1;32m%]%n@%/%[%033[0m%] %`date +%H:%M` %R%# ' 2 | \set PROMPT2 '%[%033[1;32m%]%R%#%[%033[0m%] ' 3 | \timing on 4 | \set HISTSIZE 530000 5 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/go/snip-db-open.go: -------------------------------------------------------------------------------- 1 | db, err := sql.Open("{{_cursor_}}", "") 2 | if err != nil { 3 | log.Fatal(err) 4 | } 5 | defer db.Close() 6 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/perl/snip-file-read.pl: -------------------------------------------------------------------------------- 1 | open my $fh, '<', '{{_cursor_}}' or die "failed to open: $!"; 2 | my $content = do { local $/; <$fh> }; 3 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/go/snip-web-standard-handlefunc.go: -------------------------------------------------------------------------------- 1 | http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { 2 | {{_cursor_}} 3 | }) 4 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/perl/snip-dbi-connect-mysql.pl: -------------------------------------------------------------------------------- 1 | my $dbh = DBI->connect("dbi:mysql:{{_cursor_}}", "", ""); 2 | $dbh->disconnect; 3 | {{_filter_:dbi}} 4 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/java/snip-try-catch-finally.java: -------------------------------------------------------------------------------- 1 | try { 2 | {{_cursor_}} 3 | } catch (Throwable e) { 4 | e.printStackTrace(); 5 | } finally { 6 | } 7 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/perl/snip-dbi-connect-oracle.pl: -------------------------------------------------------------------------------- 1 | my $dbh = DBI->connect("dbi:Oracle:{{_cursor_}}", "", ""); 2 | $dbh->disconnect; 3 | {{_filter_:dbi}} 4 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/perl/snip-dbi-connect-sqlite.pl: -------------------------------------------------------------------------------- 1 | my $dbh = DBI->connect("dbi:SQLite:dbname={{_cursor_}}"); 2 | $dbh->disconnect; 3 | {{_filter_:dbi}} 4 | -------------------------------------------------------------------------------- /linux/oth/.gdbinit: -------------------------------------------------------------------------------- 1 | set history save on 2 | set history size 10000 3 | set history filename ~/.gdb_history 4 | set print pretty on 5 | set print static-members off 6 | set charset ASCII 7 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/dockerfile/base-main.dockerfile: -------------------------------------------------------------------------------- 1 | FROM {{_input_:FROM_image}} 2 | MAINTAINER {{_input_:author}} <{{_input_:email}}> 3 | 4 | RUN {{_cursor_}} 5 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/cpp/base-main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int 5 | main(int argc, char* argv[]) { 6 | {{_cursor_}} 7 | return 0; 8 | } 9 | -------------------------------------------------------------------------------- /linux/oth/perlrc: -------------------------------------------------------------------------------- 1 | # perldb - Perl debugger configuration 2 | # 3 | 4 | #use Term::ReadLine; 5 | &parse_options("HistFile=$ENV{HOME}/.perldb_history"); 6 | #Term::ReadLine::Gnu::read_init_file(); 7 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/html/snip-basic-layout.html: -------------------------------------------------------------------------------- 1 | 4 |
5 |
6 | 8 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/python/base-main.py: -------------------------------------------------------------------------------- 1 | # vim: fileencoding=utf-8 2 | 3 | 4 | def main(): 5 | {{_cursor_}} 6 | 7 | if __name__ == '__main__': 8 | main() 9 | 10 | -------------------------------------------------------------------------------- /linux/oth/tmp/linux/install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | FILES=(.zshrc 4 | .inputrc 5 | ) 6 | 7 | for item in ${FILES[@]}; do 8 | rm -f ~/${item} 9 | ln -s $(pwd)/${item} ~/ 10 | done 11 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/go/snip-signal.go: -------------------------------------------------------------------------------- 1 | sc := make(chan os.Signal, 1) 2 | signal.Notify(sc, os.Interrupt) 3 | go func(){ 4 | for sig := range sc { 5 | {{_cursor_}} 6 | } 7 | }() 8 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/javascript/base-es6-class.js: -------------------------------------------------------------------------------- 1 | class {{_expr_:substitute('{{_name_}}', '\w\+', '\u\0', '')}} { 2 | constructor() { 3 | {{_cursor_}} 4 | } 5 | } 6 | {{_filter_:es6}} 7 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/perl/snip-growl-any.pl: -------------------------------------------------------------------------------- 1 | my $growl = Growl::Any->new( 2 | appname => '{{_cursor_}}', 3 | events => ['Error'] 4 | ); 5 | #$growl->notify('Error', 'Failed to do it!'); 6 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/go/snip-test-case.go: -------------------------------------------------------------------------------- 1 | func Test{{_cursor_}}(t *testing.T) { 2 | got := 1 3 | want := 2 4 | if got != want { 5 | t.Fatalf("want %v, but %v:", want, got) 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/java/snip-spark-get.java: -------------------------------------------------------------------------------- 1 | get(new Route("{{_cursor_}}") { 2 | @Override 3 | public Object handle(Request request, Response response) { 4 | return ""; 5 | } 6 | }); 7 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/perl/snip-dbi-prepare.pl: -------------------------------------------------------------------------------- 1 | my $sth = $dbh->prepare("{{_cursor_}}"); 2 | $sth->execute; 3 | while (my @row = $sth->fetchrow_array) { 4 | #print join(', ', @row), "\n"; 5 | } 6 | -------------------------------------------------------------------------------- /tmp/mac/vscode/perl.profile: -------------------------------------------------------------------------------- 1 | USERBASE=~/.local 2 | export PERL5LIB="$USERBASE/lib/perl5:$PERL5LIB" 3 | export PERL_MB_OPT="--install_base $USERBASE" 4 | export PERL_MM_OPT="INSTALL_BASE=$USERBASE" 5 | unset USERBASE 6 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/cpp/snip-stl-for_each.cpp: -------------------------------------------------------------------------------- 1 | std::for_each({{_input_:variable}}.begin(), {{_input_:variable}}.end(), [&](decltype({{_input_:variable}})::value_type x) { 2 | {{_cursor_}} 3 | }); 4 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/javascript/snip-jquery-yql.js: -------------------------------------------------------------------------------- 1 | $.getJSON("http://query.yahooapis.com/v1/public/yql?callback=?", { 2 | q: "{{_cursor_}}", 3 | format: "json" 4 | }, function (data) { 5 | }); 6 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/make/snip-os-detect.mak: -------------------------------------------------------------------------------- 1 | ifeq ($(OS),Windows_NT) 2 | else 3 | OS := $(shell uname -s) 4 | ifeq ($(OS),Linux) 5 | endif 6 | ifeq ($(OS),Darwin) 7 | endif 8 | endif 9 | -------------------------------------------------------------------------------- /tmp/mac/playbook/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.7-alpine 2 | 3 | RUN apk --update add --no-cache \ 4 | ansible \ 5 | openssh \ 6 | && mkdir /root/.ssh 7 | 8 | WORKDIR /home 9 | 10 | COPY ./playbook.yml . 11 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/cs/base-program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | class Program 4 | { 5 | static void Main(string[] args) 6 | { 7 | Console.WriteLine("{{_cursor_}}"); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/javascript/snip-es6-getter.js: -------------------------------------------------------------------------------- 1 | {{_define_:var:"new".substitute('{{_name_}}', '\w\+', '\u\0', '')}} 2 | get {{_input_:name}}() { 3 | return this._{{_var_:name}}; 4 | } 5 | {{_cursor_}} 6 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/python/snip-class.py: -------------------------------------------------------------------------------- 1 | class {{_expr_:substitute('{{_input_:name}}', '\w\+', '\u\0', '')}}(object): 2 | def __init__(self{{_cursor_}}): 3 | 4 | def __repr__(self): 5 | return 6 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/html/base-page.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {{_cursor_}} 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/java/base-main.java: -------------------------------------------------------------------------------- 1 | {{_lang_util_:package}} 2 | 3 | /** 4 | * {{_name_}} 5 | */ 6 | public class {{_name_}} { 7 | public static void main(String[] args) { 8 | {{_cursor_}} 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/perl/base-psgi-hello.pl: -------------------------------------------------------------------------------- 1 | my $handler = sub { 2 | return [ 3 | 200, 4 | [ "Content-Type" => "text/plain", "Content-Length" => 11 ], 5 | [ "Hello World" ], 6 | ]; 7 | }; 8 | -------------------------------------------------------------------------------- /tmp/windows/README.md: -------------------------------------------------------------------------------- 1 | ## dotfiles for Windows 2 | 3 | A collection of PowerShell files for Windows, 4 | 5 | including common application installation through Chocolatey and npm, 6 | 7 | and developer-minded Windows configuration defaults. 8 | -------------------------------------------------------------------------------- /linux/oth/debian/rules: -------------------------------------------------------------------------------- 1 | export DH_VERBOSE=1 2 | 3 | # This has to be exported to make some magic below work. 4 | export DH_OPTIONS 5 | 6 | 7 | %: 8 | dh $@ 9 | 10 | override_dh_installchangelogs: 11 | dh_installchangelogs NEWS.md 12 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/javascript/snip-es6-setter.js: -------------------------------------------------------------------------------- 1 | {{_define_:var:"new".substitute('{{_name_}}', '\w\+', '\u\0', '')}} 2 | set {{_input_:name}}({{_var_:var}}) { 3 | this._{{_var_:name}} = {{_var_:var}}; 4 | } 5 | {{_cursor_}} 6 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/cpp/base-stl-main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | int 6 | main(int argc, char* argv[]) { 7 | {{_cursor_}} 8 | return 0; 9 | } 10 | {{_filter_:stl}} 11 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/java/snip-spark-post.java: -------------------------------------------------------------------------------- 1 | post(new Route("/{{_cursor_}}") { 2 | @Override 3 | public Object handle(Request request, Response response) { 4 | String body = request.body(); 5 | return body; 6 | } 7 | }); 8 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/markdown/base-readme-sharp.md: -------------------------------------------------------------------------------- 1 | # {{_expr_:expand("%:p:h:t")}} 2 | 3 | {{_cursor_}} 4 | 5 | ## Usage 6 | 7 | ## Requirements 8 | 9 | ## Installation 10 | 11 | ## License 12 | 13 | ## Author 14 | 15 | -------------------------------------------------------------------------------- /linux/oth/Makefile.pl: -------------------------------------------------------------------------------- 1 | use 5.008; 2 | 3 | use ExtUtils::MakeMaker; 4 | WriteMakefile( NAME => 'perlrc', 5 | VERSION_FROM => 'lib/perlrc.pm', # finds $VERSION 6 | AUTHOR => 'Salvador Fandiño '); 7 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/cpp/base-boost-main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | int 6 | main(int argc, char* argv[]) { 7 | {{_cursor_}} 8 | return 0; 9 | } 10 | {{_filter_:boost}} 11 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/java/snip-getter.java: -------------------------------------------------------------------------------- 1 | /** 2 | * get {{_input_:name}} 3 | * @return {{_var_:name}} 4 | */ 5 | public {{_input_:type}} get{{_expr_:substitute('{{_var_:name}}', '\w\+', '\u\0', '')}}() { 6 | return {{_var_:name}}; 7 | } 8 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/javascript/pattern.stpl: -------------------------------------------------------------------------------- 1 | \(\S\+\)\.var$ 2 | var {{$1}} = {{_cursor_}}; 3 | 4 | ^\s*\zs\(\S.*\)\.throw$ 5 | throw {{$1}}; 6 | 7 | \(\S\+\)\.notif$ 8 | if ({{$1}} != null) { 9 | {{_cursor_}} 10 | } 11 | 12 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/perl/base-package.pl: -------------------------------------------------------------------------------- 1 | package {{_expr_:substitute(substitute(expand('%:r'), '.*lib[\\/]', '', 'g'), '[\\/]', '::', 'g')}}; 2 | 3 | use strict; 4 | use warnings; 5 | use utf8; 6 | 7 | {{_cursor_}} 8 | 9 | 1 10 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/markdown/base-post.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: post 3 | title: {{_expr_:substitute(matchstr(expand("%:p:t:r"), '^[0-9-]\+\zs.*'), '[-_]', ' ', 'g')}} 4 | date: {{_expr_:strftime('%Y/%m/%d %H:%M', localtime())}} 5 | --- 6 | {{_cursor_}} 7 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/perl/snip-pit.pl: -------------------------------------------------------------------------------- 1 | use Config::Pit; 2 | 3 | my $config = pit_get("{{_input_:domain}}", require => { 4 | "username" => "username of {{_var_:domain}}", 5 | "password" => "password of {{_var_:domain}}", 6 | }); 7 | {{_cursor_}} 8 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/go/snip-db-query.go: -------------------------------------------------------------------------------- 1 | rows, err := db.Query("{{_cursor_}}") 2 | if err != nil { 3 | log.Fatal(err) 4 | } 5 | defer rows.Close() 6 | for rows.Next() { 7 | var value string 8 | rows.Scan(&value) 9 | fmt.Println(value) 10 | } 11 | -------------------------------------------------------------------------------- /mac/ghostty: -------------------------------------------------------------------------------- 1 | theme = Mathias 2 | font-size = 14 3 | window-height = 4096 4 | window-width = 4096 5 | cursor-color = f5e0dc 6 | window-padding-balance = true 7 | window-padding-x = 10 8 | window-padding-y = 0,10 9 | macos-titlebar-style = hidden 10 | copy-on-select = false 11 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/php/snip-getter.php: -------------------------------------------------------------------------------- 1 | /** 2 | * Get {{_input_:property}} 3 | * 4 | * @return {{_input_:type}} 5 | */ 6 | public function get{{_expr_:substitute('{{_var_:property}}', '\w\+', '\u\0', '')}}() { 7 | return $this->{{_var_:property}}; 8 | } 9 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/python/base-class.py: -------------------------------------------------------------------------------- 1 | """ 2 | {{_name_}} 3 | """ 4 | 5 | 6 | class {{_expr_:substitute('{{_input_:name}}', '\w\+', '\u\0', '')}}(object): 7 | def __init__(self{{_cursor_}}): 8 | 9 | def __repr__(self): 10 | return 11 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/go/base-web-webgo.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "github.com/hoisie/web" 5 | ) 6 | 7 | func main() { 8 | web.Get("/", func() string { 9 | return "{{_cursor_}}" 10 | }) 11 | web.Run(":8080") 12 | } 13 | {{_filter_:web-webgo}} 14 | -------------------------------------------------------------------------------- /linux/oth/gvimrc: -------------------------------------------------------------------------------- 1 | " 最低限のみ用意しておく 2 | 3 | " Use the Solarized Dark theme 4 | set background=dark 5 | colorscheme solarized 6 | " Use 14pt Monaco 7 | set guifont=Monaco:h14 8 | " Don’t blink cursor in normal mode 9 | set guicursor=n:blinkon0 10 | " Better line-height 11 | set linespace=8 12 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/html/pattern.stpl: -------------------------------------------------------------------------------- 1 | ^\s*\zs\(<[^\/]\+>\|[^<>]*\)\.div$ 2 |
3 | {{$1}}{{_cursor_}} 4 |
5 | 6 | ^\s*\zs\(\S.*\)\.\(p\|h[1-6]\)$ 7 | <{{$2}}>{{$1}}{{_cursor_}} 8 | 9 | ^\s*\zs\(\S.*\)\.a$ 10 | {{$1}} 11 | -------------------------------------------------------------------------------- /tmp/mac/navi/cheats/docker.cheat: -------------------------------------------------------------------------------- 1 | % docker 2 | 3 | docker containe run --name ${NAME} --rm -it --hostname ${HOSTNAME} --mount type=volume,src=$(pwd),dst=/app ${IMAGE_NAME} /bin/bash 4 | docker image tag ${IMAGE_NAME} ${TAG_NAME}:${VERSION} 5 | docker-compose down --rmi all 6 | docker-compuse up -d --build 7 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/java/pattern.stpl: -------------------------------------------------------------------------------- 1 | \(\S.*\)\.pr\%[int]$ 2 | System.out.print({{$1}}); 3 | {{_cursor_}} 4 | 5 | \(\S.*\)\.pr\%[int]f$ 6 | System.out.printf({{$1}}); 7 | {{_cursor_}} 8 | 9 | \(\S.*\)\.pr\%[int]l\%[n]$ 10 | System.out.println({{$1}}); 11 | {{_cursor_}} 12 | -------------------------------------------------------------------------------- /linux/oth/irbrc: -------------------------------------------------------------------------------- 1 | IRB.conf[:SAVE_HISTORY] = 1000 2 | IRB.conf[:AUTO_INDENT] = true 3 | IRB.conf[:PROMPT][:SIMPLE] = { 4 | :PROMPT_I => "%03n:>> ", 5 | :PROMPT_N => "%03n:%i>", 6 | :PROMPT_S => "%03n:>%l ", 7 | :PROMPT_C => "%03n:>> ", 8 | :RETURN => "=> %s\n" 9 | } 10 | IRB.conf[:PROMPT_MODE] = :SIMPLE 11 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | all: mkdir link 2 | 3 | mkdir: 4 | mkdir -p ~/.config/nvim 5 | mkdir -p ~/.cache/tmp/ 6 | mkdir -p ~/.zsh 7 | mkdir -p ~/repo 8 | mkdir -p ~/work 9 | mkdir -p ~/tmp 10 | 11 | link: 12 | [ -f ~/.vimrc ] || ln -s $(pwd)/mac/vim/.vimrc ~/.vimrc 13 | [ -f ~/.bashrc ] || ln -s $(pwd)/mac/bashrc ~/.bashrc 14 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/perl/snip-web-scraper.pl: -------------------------------------------------------------------------------- 1 | my $scraper = scraper { 2 | process '{{_cursor_}}', 'data' => 'TEXT'; 3 | result 'data'; 4 | }; 5 | $scraper->user_agent->env_proxy; 6 | 7 | #use YAML::Syck; 8 | #for (@{$scraper->scrape( URI->new('') )}) { 9 | # print $_->{data}, "\n"; 10 | #} 11 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/go/base-test.go: -------------------------------------------------------------------------------- 1 | package {{_expr_:substitute('{{_name_}}', '_test', '', '')}} 2 | 3 | import ( 4 | "testing" 5 | ) 6 | 7 | func TestSimple(t *testing.T) { 8 | got := 1 9 | want := 2 10 | if got != want { 11 | t.Fatalf("want %v, but %v:", want, got) 12 | } 13 | } 14 | {{_filter_:test}} 15 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/java/base-play-controller.java: -------------------------------------------------------------------------------- 1 | package controllers; 2 | 3 | import play.*; 4 | import play.mvc.*; 5 | 6 | import views.html.*; 7 | 8 | public class Application extends Controller { 9 | public static Result index() { 10 | return ok(index.render("hello world")); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/markdown/base-readme.md: -------------------------------------------------------------------------------- 1 | {{_expr_:expand("%:p:h:t")}} 2 | {{_expr_:repeat("=", len(expand("%:p:h:t")))}} 3 | 4 | Usage: 5 | ------ 6 | {{_cursor_}} 7 | 8 | Requirements: 9 | ------------- 10 | 11 | Install: 12 | -------- 13 | 14 | License: 15 | -------- 16 | 17 | Author: 18 | ------- 19 | 20 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/go/base-web-ion.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "github.com/get-ion/ion" 5 | "github.com/get-ion/ion/context" 6 | ) 7 | 8 | func main() { 9 | app := ion.New() 10 | app.Handle("GET", "/", func(ctx context.Context) { 11 | ctx.HTML("{{_cursor_}}") 12 | }) 13 | app.Run(ion.Addr(":8080")) 14 | } 15 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/java/base-class.java: -------------------------------------------------------------------------------- 1 | {{_lang_util_:package}} 2 | 3 | /** 4 | * {{_name_}} 5 | */ 6 | public class {{_expr_:substitute('{{_name_}}', '\w\+', '\u\0', '')}} { 7 | /** 8 | * Constructor 9 | */ 10 | public {{_expr_:substitute('{{_name_}}', '\w\+', '\u\0', '')}}() { 11 | {{_cursor_}} 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/go/base-web-echo.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "net/http" 5 | 6 | "github.com/labstack/echo" 7 | ) 8 | 9 | func main() { 10 | e := echo.New() 11 | e.GET("/", func(c echo.Context) error { 12 | return c.String(http.StatusOK, "{{_cursor_}}") 13 | }) 14 | e.Logger.Fatal(e.Start(":8989")) 15 | } 16 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/go/base-web-standard.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "net/http" 6 | ) 7 | 8 | func main() { 9 | http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { 10 | fmt.Fprintf(w, "{{_cursor_}}") 11 | }) 12 | http.ListenAndServe(":8080", nil) 13 | } 14 | {{_filter_:web-standard}} 15 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/c/c/snip-win32-formaterror.c: -------------------------------------------------------------------------------- 1 | void* pbuf; 2 | FormatMessageA( 3 | FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, 4 | NULL, 5 | GetLastError(), 6 | MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language 7 | (LPSTR) &pbuf, 8 | 0, 9 | NULL 10 | ); 11 | 12 | {{_cursor_}} 13 | LocalFree(pbuf); 14 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | *.swp 3 | *~ 4 | .DS_Store 5 | 6 | .bundle/cache 7 | .config/* 8 | 9 | # whitelist 10 | !.config/nvim 11 | !.config/pt 12 | !.config/git 13 | !.config/composer 14 | .config/composer/vendor 15 | .config/composer/auth.json 16 | !.config/yarn 17 | .config/yarn/link 18 | .config/yarn/global/node_modules 19 | !.config/alacritty 20 | *.db 21 | .vscode 22 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/go/base-web-goji.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "net/http" 5 | 6 | "github.com/zenazn/goji" 7 | "github.com/zenazn/goji/web" 8 | ) 9 | 10 | func main() { 11 | goji.Get("/", func(c web.C, w http.ResponseWriter, r *http.Request) { 12 | {{_cursor_}} 13 | }) 14 | goji.Serve() 15 | } 16 | {{_filter_:web-goji}} 17 | -------------------------------------------------------------------------------- /.github/workflows/docker-image.yml: -------------------------------------------------------------------------------- 1 | name: Container 2 | on: push 3 | 4 | jobs: 5 | node-docker: 6 | runs-on: ubuntu-latest 7 | container: 8 | image: centos:7 9 | steps: 10 | - name: Run install.sh 11 | run: | 12 | curl -s https://raw.githubusercontent.com/ryuichi1208/dotfiles/master/linux/install.sh \ 13 | | bash 14 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/python/base-test.py: -------------------------------------------------------------------------------- 1 | """ 2 | {{_name_}} 3 | """ 4 | 5 | import unittest 6 | 7 | 8 | class {{_expr_:substitute('{{_input_:name}}', '\w\+', '\u\0', '')}}(unittest.TestCase): 9 | def setUp(self): 10 | pass 11 | 12 | def tearDown(self): 13 | pass 14 | 15 | def test_something(self): 16 | {{_cursor_}} 17 | -------------------------------------------------------------------------------- /tmp/mac/git/hooks/_func: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | current_branch() { 4 | local ref=$(git symbolic-ref HEAD 2> /dev/null) || return 5 | echo ${ref#refs/heads/} 6 | } 7 | 8 | gp() { 9 | local post_Push="$(git rev-parse --git-dir)/hooks/post-Push" 10 | git Push "$@" && { 11 | [[ -x "$post_Push" ]] && "$post_Push" "$(current_branch)" "$@" 12 | } 13 | } 14 | compdef _git gp=git-Push 15 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/go/base-web-gin.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "github.com/gin-gonic/gin" 5 | "github.com/mattn/go-colorable" 6 | ) 7 | 8 | func main() { 9 | gin.DefaultWriter = colorable.NewColorableStderr() 10 | r := gin.Default() 11 | r.GET("/", func(c *gin.Context) { 12 | c.JSON(200, gin.H{ 13 | "message": "{{_cursor_}}", 14 | }) 15 | }) 16 | r.Run() 17 | } 18 | -------------------------------------------------------------------------------- /linux/oth/tmp/check_status.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | repo_list=$(find . -type d -maxdepth 1 | grep -v "\.$") 4 | dir=$(pwd) 5 | ret=0 6 | 7 | for repo in ${repo_list[@]}; do 8 | cd $repo && res=$(git status) 9 | 10 | if [ "$(echo $res | grep -e 'Untracked files' -e 'Changes not staged for commit')" ]; then 11 | echo "$repo is a difference" 12 | ret=1 13 | fi 14 | cd $dir 15 | done 16 | 17 | exit ${ret} 18 | -------------------------------------------------------------------------------- /tmp/mac/git/hooks/_safe_mt: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | GIT_DIR_="$(git rev-parse --git-dir)" 4 | BRANCH="$(git rev-parse --symbolic --abbrev-ref $(git symbolic-ref HEAD))" 5 | 6 | PRE_Push="$GIT_DIR_/hooks/pre-Push" 7 | POST_Push="$GIT_DIR_/hooks/post-Push" 8 | 9 | test -x "$PRE_Push" && 10 | exec "$PRE_Push" "$BRANCH" "$@" 11 | 12 | git Push "$@" 13 | 14 | test $? -eq 0 && test -x "$POST_Push" && 15 | exec "$POST_Push" "$BRANCH" "$@" 16 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/java/base-test.java: -------------------------------------------------------------------------------- 1 | {{_lang_util_:package}} 2 | 3 | import static org.junit.Assert.*; 4 | 5 | import org.junit.Test; 6 | 7 | /** 8 | * {{_name_}} 9 | */ 10 | public class {{_name_}} { 11 | @Test 12 | public void test{{_input_:func}}() { 13 | {{_cursor_}} 14 | } 15 | 16 | @Before 17 | public void setup() { 18 | } 19 | 20 | @After 21 | public void tearDown() { 22 | } 23 | } 24 | {{_filter_:test}} 25 | -------------------------------------------------------------------------------- /tmp/mac/git/.gitconfig: -------------------------------------------------------------------------------- 1 | [user] 2 | name = ryuichi1208 3 | email = ryucrosskey@gmail.com 4 | [color] 5 | ui = auto 6 | [gui] 7 | encoding = utf-8 8 | [receive] 9 | denyNonFastforwards = false 10 | [core] 11 | #quotepath = false 12 | filemode = false 13 | editor = vim 14 | excludefile = ~/.gitignore_global 15 | [merge] 16 | tool = vimdiff 17 | [alias] 18 | st = status 19 | co = checkout 20 | br = branch 21 | up = rebase 22 | ci = commit 23 | -------------------------------------------------------------------------------- /tmp/mac/mini/coc-settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "suggest.noselect": true, 3 | "suggest.preferCompleteThanJumpPlaceholder": true, 4 | "languageserver": { 5 | "dockerfile": { 6 | "command": "docker-langserver", 7 | "filetypes": ["dockerfile"], 8 | "args": ["--stdio"] 9 | } 10 | }, 11 | "python.jediEnabled": true, 12 | "python.jediPath": "~/.pyenv/versions/neovim3/lib/python3.6/site-packages/" 13 | } 14 | -------------------------------------------------------------------------------- /tmp/mac/git/hooks/_comment_af: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | while read local_ref local_sha1 remote_ref remote_sha1 4 | do 5 | if [[ "${remote_ref##refs/heads/}" = "master" ]]; then 6 | echo "Warning: push to remote master, continue? [y/N]" 7 | 8 | exec < /dev/tty 9 | read ANSWER 10 | 11 | case $ANSWER in 12 | "Y" | "y" | "yes" | "Yes" | "YES" ) echo "OK. push start.";; 13 | * ) echo "push failed.";exit 1;; 14 | esac 15 | exit 0 16 | fi 17 | done 18 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/java/base-spark.java: -------------------------------------------------------------------------------- 1 | {{_lang_util_:package}} 2 | 3 | import static spark.Spark.*; 4 | 5 | import spark.*; 6 | 7 | public class {{_expr_:substitute('{{_name_}}', '\w\+', '\u\0', '')}} { 8 | public static void main(String[] args) { 9 | get(new Route("/") { 10 | @Override 11 | public Object handle(Request request, Response response) { 12 | return "{{_cursor_}}"; 13 | } 14 | }); 15 | } 16 | } 17 | {{_filter_:spark}} 18 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/c/c/base-main-gtk.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int 4 | main(int argc, char* argv[]) { 5 | GtkWidget* window; 6 | 7 | gtk_init(&argc, &argv); 8 | 9 | window = gtk_window_new(GTK_WINDOW_TOPLEVEL); 10 | gtk_window_set_title(GTK_WINDOW(window), "helloworld"); 11 | g_signal_connect(G_OBJECT(window), "delete-event", gtk_main_quit, window); 12 | 13 | {{_cursor_}} 14 | 15 | gtk_widget_show_all(window); 16 | 17 | gtk_main(); 18 | return 0; 19 | } 20 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/java/snip-getter-setter.java: -------------------------------------------------------------------------------- 1 | /** 2 | * get {{_input_:name}} 3 | * @return {{_var_:name}} 4 | */ 5 | public {{_input_:type}} get{{_expr_:substitute('{{_var_:name}}', '\w\+', '\u\0', '')}}() { 6 | return {{_var_:name}}; 7 | } 8 | 9 | /** 10 | * set {{_var_:name}} 11 | * @param {{_var_:name}} 12 | */ 13 | public void set{{_expr_:substitute('{{_var_:name}}', '\w\+', '\u\0', '')}}({{_var_:type}} {{_var_:name}}) { 14 | this.{{_var_:name}} = {{_var_:name}}; 15 | } 16 | -------------------------------------------------------------------------------- /tmp/mac/navi/cheats/awk.cheat: -------------------------------------------------------------------------------- 1 | % one-liner 2 | 3 | echo "1 2 3" | awk '{print $NF}' 4 | echo "1 2 3" | awk '{print $1+$2+$3}' 5 | echo "1 2 3" | awk '{print $1, $(NF-1), $NF}' 6 | 7 | echo -e "1\n2\n3\n4\n" | awk 'NR==2, NR==4' 8 | 9 | for i in {1..10}; do echo ${i} ; done 10 | tail -f file | while read; do echo "$(date +%T.%N) $REPLY"; done 11 | grep -v '^\s*#' filename |grep -v '^\s*$' 12 | find . -name "*.pl" -type f -print | xargs -L 1 grep ${REGEX} 13 | cat test.log | awk '/^B\s.*$/{sum+=$2} END {print sum}' 14 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/vim/base-plugin.vim: -------------------------------------------------------------------------------- 1 | " {{_expr_:expand("%:p:t:r")}} 2 | " Version: 0.0.1 3 | " Author: {{_expr_:get(g:,"sonictemplate_author","")}} 4 | " License: {{_expr_:get(g:,"sonictemplate_license","")}} 5 | 6 | if exists('g:loaded_{{_expr_:expand("%:p:t:r")}}') 7 | finish 8 | endif 9 | let g:loaded_{{_expr_:expand("%:p:t:r")}} = 1 10 | 11 | let s:save_cpo = &cpo 12 | set cpo&vim 13 | 14 | {{_cursor_}} 15 | 16 | let &cpo = s:save_cpo 17 | unlet s:save_cpo 18 | 19 | " vim:set et: 20 | -------------------------------------------------------------------------------- /tmp/mac/playbook/ansible.cfg: -------------------------------------------------------------------------------- 1 | [defaults] 2 | inventory = /etc/ansible/hosts 3 | library = /usr/share/my_modules/ 4 | module_utils = /usr/share/my_module_utils/ 5 | remote_tmp = ~/.ansible/tmp 6 | local_tmp = ~/.ansible/tmp 7 | plugin_filters_cfg = /etc/ansible/plugin_filters.yml 8 | forks = 5 9 | poll_interval = 15 10 | sudo_user = root 11 | ask_sudo_pass = True 12 | ask_pass = True 13 | transport = smart 14 | remote_port = 22 15 | module_lang = C 16 | module_set_locale = False 17 | stdout_callback = counter_enabled 18 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/make/snip-os-cpu-detect.mak: -------------------------------------------------------------------------------- 1 | ifeq ($(OS),Windows_NT) 2 | ifeq ($(PROCESSOR_ARCHITECTURE),AMD64) 3 | endif 4 | ifeq ($(PROCESSOR_ARCHITECTURE),x86) 5 | endif 6 | else 7 | OS := $(shell uname -s) 8 | ifeq ($(OS),Linux) 9 | endif 10 | ifeq ($(OS),Darwin) 11 | endif 12 | CPU := $(shell uname -p) 13 | ifeq ($(CPU),x86_64) 14 | endif 15 | ifneq ($(filter %86,$(CPU)),) 16 | endif 17 | ifneq ($(filter arm%,$(CPU)),) 18 | endif 19 | endif 20 | -------------------------------------------------------------------------------- /linux/oth/tmp/linux/.tigrc: -------------------------------------------------------------------------------- 1 | bind main !tig-rebase.sh fixup %(commit) 2 | bind main !tig-rebase.sh ascend %(commit) 3 | bind main !tig-rebase.sh descend %(commit) 4 | bind main !tig-rebase.sh reword %(commit) 5 | bind main !tig-rebase.sh abort 6 | bind status V !@?git cfu 7 | bind status D !@?rm -rf %(file) 8 | set vertical-split = no 9 | set diff-highlight = true 10 | set main-view = line-number:no,interval=5 id:no date:custom,format=%d/%m/%Y author:full commit-title:yes,graph,refs,overflow=no 11 | -------------------------------------------------------------------------------- /tmp/mac/git/master: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | while read local_ref local_sha1 remote_ref remote_sha1 4 | do 5 | for branch in "master" "develop"; do 6 | if [[ "${remote_ref##refs/heads/}" = "${branch}" ]]; then 7 | echo "Warning: push to remote ${branch}, continue? [y/N]" 8 | 9 | exec < /dev/tty 10 | read ANSWER 11 | 12 | case $ANSWER in 13 | "Y" | "y" | "yes" | "Yes" | "YES" ) echo "OK. push start.";; 14 | * ) echo "push failed.";exit 1;; 15 | esac 16 | exit 0 17 | fi 18 | done 19 | done 20 | -------------------------------------------------------------------------------- /tmp/mac/vim/a.conf: -------------------------------------------------------------------------------- 1 | server { 2 | server_name alpha.kstyle.com; 3 | listen 443 ssl http2; 4 | ssl_certificate /etc/ssl/certs/server.crt; 5 | ssl_certificate_key /etc/ssl/certs/server.key; 6 | 7 | location / { 8 | proxy_pass http://${kstyleサーバのIP}:8443; 9 | } 10 | } 11 | 12 | server { 13 | server_name beta.kstyle.com; 14 | listen 443 ssl http2; 15 | 16 | ssl_certificate /etc/ssl/certs/server.crt; 17 | ssl_certificate_key /etc/ssl/certs/server.key; 18 | 19 | location / { 20 | proxy_pass http://${kstyleサーバのIP}:8443; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /tmp/windows/git/hooks/pre_push.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # chmod a+x pre_push 4 | 5 | git_status_before_synx=$(git status) 6 | synx -q .xcodeproj 7 | git_status_after_synx=$(git status) 8 | 9 | if [ "$git_status_before_synx" != "$git_status_after_synx" ] 10 | then 11 | git add --al 12 | git commit -am "Runs synx to change the strucutre of directory" 13 | echo "Synx changed the structure of the directory. Push the changes ones again" 14 | exit 1 15 | else 16 | echo "Synx has not changed anything. Pushing..." 17 | exit 0 18 | fi 19 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/make/base-c.mak: -------------------------------------------------------------------------------- 1 | SRCS = \ 2 | {{_expr_:join(map(split(glob('*.c'),"\n"),'"\t".substitute(v:val,"\\","/","g")')," \\\n")}} 3 | 4 | OBJS = $(subst .c,.o,$(SRCS)) 5 | 6 | CFLAGS = 7 | LIBS = 8 | TARGET = {{_expr_:expand('%:p:h:t')}} 9 | ifeq ($(OS),Windows_NT) 10 | TARGET := $(TARGET).exe 11 | endif 12 | 13 | .SUFFIXES: .c .o 14 | 15 | all : $(TARGET) 16 | 17 | $(TARGET) : $(OBJS) 18 | gcc -o $@ $(OBJS) $(LIBS) 19 | 20 | .c.o : 21 | gcc -c $(CFLAGS) -I. $< -o $@ 22 | 23 | clean : 24 | rm -f *.o $(TARGET) 25 | -------------------------------------------------------------------------------- /linux/oth/tmp/linux/vim/dein_lazy.toml: -------------------------------------------------------------------------------- 1 | #---------------------------------------------------------- 2 | # NERD 3 | #---------------------------------------------------------- 4 | [[plugins]] 5 | repo = 'scrooloose/nerdtree' 6 | hook_add = ''' 7 | ''' 8 | 9 | [[plugins]] 10 | repo = 'jistr/vim-nerdtree-tabs' 11 | 12 | 13 | #---------------------------------------------------------- 14 | # Other 15 | #---------------------------------------------------------- 16 | [[plugins]] 17 | repo = 'kien/ctrlp.vim' 18 | 19 | [[plugins]] 20 | repo = 'skanehira/translate.vim' 21 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/dein_lazy.toml: -------------------------------------------------------------------------------- 1 | #---------------------------------------------------------- 2 | # NERD 3 | #---------------------------------------------------------- 4 | [[plugins]] 5 | repo = 'scrooloose/nerdtree' 6 | hook_add = ''' 7 | ''' 8 | 9 | [[plugins]] 10 | repo = 'jistr/vim-nerdtree-tabs' 11 | 12 | 13 | #---------------------------------------------------------- 14 | # Other 15 | #---------------------------------------------------------- 16 | [[plugins]] 17 | repo = 'kien/ctrlp.vim' 18 | 19 | [[plugins]] 20 | repo = 'skanehira/translate.vim' 21 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/php/snip-getter-setter.php: -------------------------------------------------------------------------------- 1 | /** 2 | * Get {{_input_:property}} 3 | * 4 | * @return {{_input_:type}} 5 | */ 6 | public function get{{_expr_:substitute('{{_var_:property}}', '\w\+', '\u\0', '')}}() { 7 | return $this->{{_var_:property}}; 8 | } 9 | 10 | /** 11 | * Set {{_var_:property}} 12 | * 13 | * @param {{_var_:type}} {{_var_:property}} 14 | */ 15 | public function set{{_expr_:substitute('{{_var_:property}}', '\w\+', '\u\0', '')}}(${{_var_:property}}) { 16 | $this->{{_var_:property}} = ${{_var_:property}}; 17 | } 18 | -------------------------------------------------------------------------------- /linux/oth/tmp/linux/.bash_profile: -------------------------------------------------------------------------------- 1 | alias ll "ls -al" 2 | 3 | echo "[date]" 4 | date 5 | echo "[uptime]" 6 | uptime 7 | 8 | #python関連の処理 9 | export PYENV_ROOT="$HOME/.pyenv" 10 | export PATH="$PYENV_ROOT/bin:$PATH" 11 | eval "$(pyenv init -)" 12 | 13 | _path="" 14 | for _p in $(echo $PATH | tr ':' ' '); do 15 | case ":${_path}:" in 16 | *:"${_p}":* ) 17 | ;; 18 | * ) 19 | if [ "$_path" ]; then 20 | _path="$_path:$_p" 21 | else 22 | _path=$_p 23 | fi 24 | ;; 25 | esac 26 | done 27 | PATH=$_path 28 | 29 | unset _p 30 | unset _path 31 | -------------------------------------------------------------------------------- /mac/git_ignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | 3 | # Prerequisites 4 | *.d 5 | 6 | # Object files 7 | *.o 8 | *.ko 9 | *.obj 10 | *.elf 11 | 12 | # Linker output 13 | *.ilk 14 | *.map 15 | *.exp 16 | 17 | # Precompiled Headers 18 | *.gch 19 | *.pch 20 | 21 | # Libraries 22 | *.lib 23 | *.a 24 | *.la 25 | *.lo 26 | 27 | # Shared objects (inc. Windows DLLs) 28 | *.dll 29 | *.so 30 | *.so.* 31 | *.dylib 32 | 33 | # Executables 34 | *.exe 35 | *.out 36 | *.app 37 | *.i*86 38 | *.x86_64 39 | *.hex 40 | 41 | # Debug files 42 | *.dSYM/ 43 | *.su 44 | *.idb 45 | *.pdb 46 | 47 | **/.claude/settings.local.json 48 | -------------------------------------------------------------------------------- /tmp/mac/navi/cheats/curl.cheat: -------------------------------------------------------------------------------- 1 | % curl 2 | 3 | curl ifconfig.io 4 | cat <<'EOF' | curl -sS -X POST -d @- http://example.com/boopoo 5 | curl -LI ${URL} -o /dev/null -w "%{http_code}\n" -s 6 | curl -sL ${URL} -o /dev/null -w "%{time_starttransfer}\n" ; done 7 | curl -X POST -H "Content-Type: application/json" -d '{"Name":"ryuichi1208", "Age":"25"}' localhost:8080/api/v1/users 8 | curl ${URL} -H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36' 9 | curl -s https://ipvigilante.com/$(curl -s https://ipinfo.io/ip) | jq . 10 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/go/snip-sorter.go: -------------------------------------------------------------------------------- 1 | func ({{_var_:varname}} {{_var_:name}}) Len() int { 2 | return len({{_var_:varname}}) 3 | } 4 | 5 | func ({{_var_:varname}} {{_var_:name}}) Less(i, j int) bool { 6 | return {{_var_:varname}}[i] < {{_var_:varname}}[j] 7 | } 8 | 9 | func ({{_var_:varname}} {{_var_:name}}) Swap(i, j int) { 10 | {{_var_:varname}}[i], {{_var_:varname}}[j] = {{_var_:varname}}[j], {{_var_:varname}}[i] 11 | } 12 | {{_define_:name:input('name: ')}} 13 | {{_define_:varname:substitute('{{_var_:name}}' =~ '^[ij]' ? '{{_var_:name}}'[:1] : '{{_var_:name}}'[0],'\w\+', '\l\0', '')}} 14 | -------------------------------------------------------------------------------- /linux/oth/tmp/linux/.ansible.cfg: -------------------------------------------------------------------------------- 1 | [defaults] 2 | inventory = hosts 3 | remote_user = vagrant 4 | private_key_file = ~/.vagrant.d/insecure_private_key 5 | host_key_checking = False 6 | retry_files_enabled = False 7 | 8 | [redis] 9 | # refer : https://koh-sh.hatenablog.com/entry/2019/07/17/234527 10 | # cache pluginの指定 11 | # fact_caching = redis 12 | # cacheのkey名のプレフィックス 13 | # fact_caching_prefix = ansible_facts_ 14 | # Redisの接続先情報(host:port) 15 | # fact_caching_connection = localhost:6379 16 | # cache情報の有効期限(s) 17 | # fact_caching_timeout = 60 18 | # cache管理のポリシー smartの場合は有効なcacheがあれば再取得せずにそれを参照する 19 | # gathering = smart 20 | -------------------------------------------------------------------------------- /bootstrap.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | cd "$(dirname "${BASH_SOURCE}")"; 4 | 5 | git pull origin main; 6 | 7 | function doIt() { 8 | rsync --exclude ".git/" \ 9 | --exclude ".DS_Store" \ 10 | --exclude ".osx" \ 11 | --exclude "bootstrap.sh" \ 12 | --exclude "README.md" \ 13 | --exclude "LICENSE-MIT.txt" \ 14 | -avh --no-perms . ~; 15 | source ~/.bash_profile; 16 | } 17 | 18 | if [ "$1" == "--force" -o "$1" == "-f" ]; then 19 | doIt; 20 | else 21 | read -p "This may overwrite existing files in your home directory. Are you sure? (y/n) " -n 1; 22 | echo ""; 23 | if [[ $REPLY =~ ^[Yy]$ ]]; then 24 | doIt; 25 | fi; 26 | fi; 27 | 28 | unset doIt; 29 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/perl/base-psgi-static.pl: -------------------------------------------------------------------------------- 1 | use strict; 2 | use warnings; 3 | use Plack::Builder; 4 | use Plack::Request; 5 | 6 | my $app = sub { 7 | my $env = shift; 8 | my $req = Plack::Request->new($env); 9 | return root($req) if $req->path eq '/'; 10 | [ 404, [ "Content-Type" => "text/plain" ], ["Not Found"] ]; 11 | }; 12 | 13 | sub root { 14 | my $req = shift; 15 | my $res = $req->new_response(200); 16 | $res->content_type('text/html'); 17 | $res->body('hello world'); 18 | $res->finalize(); 19 | } 20 | 21 | builder { 22 | enable "Plack::Middleware::Static", path => qr/static/, root => '.'; 23 | $app; 24 | }; 25 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/perl/base-make.pl: -------------------------------------------------------------------------------- 1 | use strict; 2 | use ExtUtils::MakeMaker; 3 | 4 | my %clean = ( 5 | 'FILES' => '$(DISTVNAME).tar$(SUFFIX) *.ppd' 6 | ); 7 | 8 | my %dist = ( 9 | PREOP => 'perldoc -t {{_define_:modulepm:(split(substitute(glob("lib/*.pm"),"\\","/","g"),"\n")+[''])[0]}} > README', 10 | ); 11 | 12 | WriteMakefile( 13 | 'NAME' => '{{_expr_:fnamemodify(sonictemplate#getvar("modulepm"),":t:r")}}', 14 | 'AUTHOR' => 'Your Name ', 15 | 'ABSTRACT_FROM' => '{{_var_:modulepm}}', 16 | 'VERSION_FROM' => '{{_var_:modulepm}}', 17 | 'clean' => \%clean, 18 | 'dist' => \%dist, 19 | ); 20 | -------------------------------------------------------------------------------- /tmp/mac/navi/cheats/brew.cheat: -------------------------------------------------------------------------------- 1 | % brew, cask 2 | 3 | # update brew 4 | brew update 5 | 6 | # upgrade brew 7 | brew upgrade 8 | 9 | # brew info 10 | brew info 11 | 12 | # brew cask info 13 | brew cask info 14 | 15 | # brew install 16 | brew install 17 | 18 | # brew caks install 19 | brew cask install 20 | 21 | # brew uninstall 22 | brew uninstall 23 | 24 | # brew cask uninstall 25 | brew cask uninstall 26 | 27 | # brew edit package 28 | brew edit 29 | 30 | # brew edit cask 31 | brew cask edit 32 | 33 | $ package: brew search 34 | $ casks: brew search --casks 35 | $ installed: brew list 36 | $ caskinstalled: brew cask list 37 | -------------------------------------------------------------------------------- /tmp/mac/zsh/.zshrc: -------------------------------------------------------------------------------- 1 | # Source Prezto. 2 | if [[ -s "${ZDOTDIR:-$HOME}/.zprezto/init.zsh" ]]; then 3 | source "${ZDOTDIR:-$HOME}/.zprezto/init.zsh" 4 | fi 5 | 6 | # Source Zshrc. 7 | if [[ -d "${ZDOTDIR:-$HOME/.zsh}" ]]; then 8 | source "${ZDOTDIR:-$HOME/.zsh/alias.zsh}" 9 | source "${ZDOTDIR:-$HOME/.zsh/functions.zsh}" 10 | source "${ZDOTDIR:-$HOME/.zsh/plugin.zsh}" 11 | source "${ZDOTDIR:-$HOME/.zsh/setopt.zsh}" 12 | source "${ZDOTDIR:-$HOME/.zsh/completion.zsh}" 13 | fi 14 | 15 | 16 | export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:/usr/local/lib/python3.7/site-packages:$PATH" 17 | source <(kubectl completion zsh) 18 | # source <(helm completion zsh) 19 | #source <(kubesec completion zsh) 20 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/make/base-cpp.mak: -------------------------------------------------------------------------------- 1 | SRCS = \ 2 | {{_expr_:join(map(split(glob('*.cpp'),"\n")+split(glob('*.cxx'),"\n")+split(glob('*.cc'),"\n"),'"\t".substitute(v:val,"\\","/","g")')," \\\n")}} 3 | 4 | OBJS = $(subst .cc,.o,$(subst .cxx,.o,$(subst .cpp,.o,$(SRCS)))) 5 | 6 | CXXFLAGS = 7 | LIBS = 8 | TARGET = {{_expr_:expand('%:p:h:t')}} 9 | ifeq ($(OS),Windows_NT) 10 | TARGET := $(TARGET).exe 11 | endif 12 | 13 | .SUFFIXES: .cpp .cxx .o 14 | 15 | all : $(TARGET) 16 | 17 | $(TARGET) : $(OBJS) 18 | g++ -std=c++14 -o $@ $(OBJS) $(LIBS) 19 | 20 | .cxx.o : 21 | g++ -std=c++14 -c $(CXXFLAGS) -I. $< -o $@ 22 | 23 | .cpp.o : 24 | g++ -std=c++14 -c $(CXXFLAGS) -I. $< -o $@ 25 | 26 | clean : 27 | rm -f *.o $(TARGET) 28 | -------------------------------------------------------------------------------- /linux/oth/setup/bootstrap_worker.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | setenforce 0 4 | systemctl stop firewalld 5 | systemctl start containerd.service 6 | 7 | cat < /etc/sysctl.d/k8s.conf 8 | net.bridge.bridge-nf-call-ip6tables = 1 9 | net.bridge.bridge-nf-call-iptables = 1 10 | EOF 11 | sysctl --system 12 | 13 | cat < /etc/yum.repos.d/kubernetes.repo 14 | [kubernetes] 15 | name=Kubernetes 16 | baseurl=https://packages.cloud.google.com/yum/repos/kubernetes-el7-x86_64 17 | enabled=1 18 | gpgcheck=1 19 | repo_gpgcheck=1 20 | gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg 21 | EOF 22 | 23 | yum install -y kubelet kubeadm kubectl --disableexcludes=kubernetes 24 | 25 | systemctl enable --now kubelet 26 | -------------------------------------------------------------------------------- /mac/karabiner.json: -------------------------------------------------------------------------------- 1 | { 2 | "profiles": [ 3 | { 4 | "devices": [ 5 | { 6 | "identifiers": { 7 | "is_keyboard": true, 8 | "product_id": 34, 9 | "vendor_id": 1278 10 | }, 11 | "simple_modifications": [ 12 | { 13 | "from": { "key_code": "caps_lock" }, 14 | "to": [{ "key_code": "left_command" }] 15 | } 16 | ] 17 | } 18 | ], 19 | "name": "Default profile", 20 | "selected": true, 21 | "virtual_hid_keyboard": { "keyboard_type_v2": "jis" } 22 | } 23 | ] 24 | } -------------------------------------------------------------------------------- /linux/oth/debian/lsrc: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | show_dir() { 4 | local dir="$1" 5 | local dest_dir="$2" 6 | local dotfiles_dir="$3" 7 | local dotfiles_subdir="$4" 8 | local dotted=$5 9 | local exclude_file_globs="$6" 10 | local include_file_globs="$7" 11 | local symlink_dirs_file_globs="$8" 12 | local mk_dirs_file_globs="$9" 13 | local dest_path="$(build_path "$dest_dir" "$dir" $dotted)" 14 | 15 | $DEBUG "show_dir $1 $2 $3 $4 $5 $6 $7 $8 $9" 16 | 17 | $VERBOSE "recurring on $dest_path" 18 | 19 | pushdir "$dir" 20 | for f in *; do 21 | $DEBUG "handling the file $f" 22 | next_dir="$(file_join "$dotfiles_subdir" "$dir")" 23 | handle_file "$f" "$dest_path" "$dotfiles_dir" "$next_dir" 1 "$exclude_file_globs" "$include_file_globs" "$symlink_dirs_file_globs" "$mk_dirs_file_globs" 24 | done 25 | popdir 26 | } 27 | -------------------------------------------------------------------------------- /linux/oth/wgetrc: -------------------------------------------------------------------------------- 1 | # Use the server-provided last modification date, if available 2 | timestamping = on 3 | 4 | # Do not go up in the directory structure when downloading recursively 5 | no_parent = on 6 | 7 | # Wait 60 seconds before timing out. This applies to all timeouts: DNS, connect and read. 8 | timeout = 60 9 | 10 | # Retry a few times when a download fails, but don’t overdo it. 11 | tries = 3 12 | 13 | # Retry even when the connection was refused 14 | retry_connrefused = on 15 | 16 | # Use the last component of a redirection URL for the local file name 17 | trust_server_names = on 18 | 19 | # Follow FTP links from HTML documents by default 20 | follow_ftp = on 21 | 22 | # Ignore `robots.txt` and `` 23 | robots = off 24 | 25 | # Print the HTTP and FTP server responses 26 | server_response = on 27 | -------------------------------------------------------------------------------- /linux/oth/tmp/linux/.wgetrc: -------------------------------------------------------------------------------- 1 | # Use the server-provided last modification date, if available 2 | timestamping = on 3 | 4 | # Do not go up in the directory structure when downloading recursively 5 | no_parent = on 6 | 7 | # Wait 60 seconds before timing out. This applies to all timeouts: DNS, connect and read. 8 | timeout = 60 9 | 10 | # Retry a few times when a download fails, but don’t overdo it. 11 | tries = 3 12 | 13 | # Retry even when the connection was refused 14 | retry_connrefused = on 15 | 16 | # Use the last component of a redirection URL for the local file name 17 | trust_server_names = on 18 | 19 | # Follow FTP links from HTML documents by default 20 | follow_ftp = on 21 | 22 | # Ignore `robots.txt` and `` 23 | robots = off 24 | 25 | # Print the HTTP and FTP server responses 26 | server_response = on 27 | -------------------------------------------------------------------------------- /linux/oth/tmp/old_srv/tmux.conf: -------------------------------------------------------------------------------- 1 | # Status bar 2 | set -g status-left-length 52 3 | set -g status-right-length 451 4 | set -g status-fg white 5 | set -g status-bg colour234 6 | set -g window-status-activity-attr bold 7 | set -g pane-border-fg colour245 8 | set -g pane-active-border-fg colour39 9 | set -g message-fg colour16 10 | set -g message-bg colour221 11 | set -g message-attr bold 12 | set -g status-left '#[fg=colour235,bg=colour252,bold] ❐ #S#[fg=colour252,bg=colour238,nobold]⮀#[fg=colour245,bg=colour238,bold] #(hostname)#[fg=colour238,bg=colour234,nobold]⮀' 13 | set -g status-right "#[fg=colour39, bg=colour234]⮂#[fg=colour234,bg=colour39] 🐳 " 14 | set -g window-status-format "#[fg=white,bg=colour234] #I #W " 15 | set -g window-status-current-format "#[fg=colour234,bg=colour39]⮀#[fg=colour25,bg=colour39,noreverse,bold] #I ⮁ #W#[fg=colour39,bg=colour234,nobold]⮀" 16 | -------------------------------------------------------------------------------- /mac/mise_config.toml: -------------------------------------------------------------------------------- 1 | [tools] 2 | jq = "latest" 3 | fzf = "latest" 4 | eza = "latest" 5 | awscli = "latest" 6 | conftest = "latest" 7 | golangci-lint = "latest" 8 | go = "1.23.2" 9 | gh = "latest" 10 | usage = "latest" 11 | bat = "latest" 12 | delta = "latest" 13 | pre-commit = "4.0.1" 14 | terraform = "1.10.1" 15 | terraformer = "latest" 16 | hub = "latest" 17 | ecspresso = "latest" 18 | duf = "latest" 19 | yarn = "latest" 20 | rust = "latest" 21 | deno = "latest" 22 | uv = "latest" 23 | colima = "latest" 24 | gcloud = "latest" 25 | ghq = "latest" 26 | cmake = "latest" 27 | k6 = "latest" 28 | pnpm = "latest" 29 | ffmpeg = "latest" 30 | shellcheck = "latest" 31 | sqlite = "latest" 32 | ollama = "latest" 33 | yq = "latest" 34 | ruby = "3.3.5" 35 | ripgrep = "latest" 36 | actionlint = "latest" 37 | terragrunt = "latest" 38 | trivy = "latest" 39 | python = "3.12.9" 40 | node = "latest" 41 | -------------------------------------------------------------------------------- /linux/oth/initzshrc: -------------------------------------------------------------------------------- 1 | #!/bin/zsh 2 | 3 | # 基本機能 4 | setopt auto_cd 5 | setopt auto_pushd 6 | setopt pushd_ignore_dups 7 | export HISTFILE=${HOME}/.zsh_history 8 | export HISTSIZE=1000 9 | export SAVEHIST=100000 10 | setopt hist_ignore_dups 11 | setopt EXTENDED_HISTORY 12 | 13 | # completion 14 | autoload -U compinit; compinit 15 | zstyle ':completion:*:default' menu select=1 16 | source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh 17 | 18 | # kubernetes 19 | source <(kubectl completion zsh) 20 | alias k=kubectl 21 | source ~/.kube-ps1/kube-ps1.sh 22 | function get_cluster_short() { 23 | echo "$1" | cut -d . -f1 24 | } 25 | KUBE_PS1_CLUSTER_FUNCTION=get_cluster_short 26 | KUBE_PS1_SUFFIX=') ' 27 | PS1='$(kube_ps1)'$PS1 28 | 29 | fd() { 30 | local dir 31 | dir=$(find ${1:-.} -path '*/\.*' -prune \ 32 | -o -type d -print 2> /dev/null | fzf +m) && 33 | cd "$dir" 34 | } 35 | -------------------------------------------------------------------------------- /linux/oth/tmp/linux/.pryrc: -------------------------------------------------------------------------------- 1 | 2 | begin 3 | require 'awesome_print' 4 | Pry.config.print = proc { |output, value| output.puts value.ai } 5 | rescue LoadError => err 6 | puts "no awesome_print :(" 7 | end 8 | 9 | begin 10 | require 'hirb' 11 | rescue LoadError 12 | # Missing goodies, bummer 13 | puts "no hirb :(" 14 | end 15 | 16 | if defined? Hirb 17 | # Slightly dirty hack to fully support in-session Hirb.disable/enable toggling 18 | Hirb::View.instance_eval do 19 | def enable_output_method 20 | @output_method = true 21 | @old_print = Pry.config.print 22 | Pry.config.print = proc do |output, value| 23 | Hirb::View.view_or_page_output(value) || @old_print.call(output, value) 24 | end 25 | end 26 | 27 | def disable_output_method 28 | Pry.config.print = @old_print 29 | @output_method = nil 30 | end 31 | end 32 | 33 | Hirb.enable 34 | end 35 | -------------------------------------------------------------------------------- /tmp/mac/vscode/setting.json: -------------------------------------------------------------------------------- 1 | { 2 | // plugin 3 | "C_Cpp.updateChannel": "Insiders", 4 | "workbench.iconTheme": "vscode-icons", 5 | "diffEditor.renderSideBySide": false, 6 | 7 | // Editor 8 | "bookmarks.treeview.visible": true, 9 | "editor.fontSize":11, 10 | "editor.wordWrap": "on", 11 | "editor.minimap.enabled": false, 12 | "editor.formatOnType": true, 13 | "editor.formatOnPaste": true, // ペースト時に自動でフォーマット 14 | "editor.formatOnSave": true, 15 | "editor.wordWrap": "on", 16 | "editor.renderControlCharacters": true, 17 | "editor.renderWhitespace": "all", 18 | "editor.renderLineHighlight": "all", 19 | "emmet.includeLanguages": {"twig": "html", "vue-html": "html"}, 20 | "files.trimTrailingWhitespace": true, 21 | "workbench.colorTheme": "Monokai", 22 | 23 | // terminal 24 | "terminal.integrated.fontSize": 9, 25 | 26 | //vimplugin 27 | "vim.useCtrlKeys": true, 28 | "vim.visualstar": true, 29 | "vim.hlsearch": true 30 | } 31 | -------------------------------------------------------------------------------- /tmp/mac/zsh/.zsh/plugin.zsh: -------------------------------------------------------------------------------- 1 | # ----------------------------- 2 | # Plugin 3 | # ----------------------------- 4 | # zplugが無ければインストール 5 | if [[ ! -d ~/.zplug ]];then 6 | git clone https://github.com/zplug/zplug ~/.zplug 7 | fi 8 | 9 | # zplugを有効化する 10 | source ~/.zplug/init.zsh 11 | 12 | # プラグインList 13 | zplug "adrieanKhisbe/diractions" 14 | zplug "b4b4r07/enhancd", use:init.sh 15 | zplug "b4b4r07/zsh-gomi" 16 | zplug "mollifier/anyframe" 17 | zplug "mollifier/cd-gitroot" 18 | zplug "nnao45/zsh-kubectl-completion" 19 | zplug "zsh-users/zsh-completions" 20 | zplug "zsh-users/zsh-autosuggestions" 21 | zplug "zsh-users/zsh-syntax-highlighting", defer:2 22 | zplug "zsh-users/zsh-history-substring-search", defer:3 23 | 24 | # インストールしていないプラグインをインストール 25 | if ! zplug check --verbose; then 26 | printf "Install? [y/N]: " 27 | if read -q; then 28 | echo; zplug install 29 | fi 30 | fi 31 | 32 | # コマンドをリンクして、PATH に追加し、プラグインは読み込む 33 | zplug load --verbose 34 | 35 | PATH="/usr/local/opt/llvm/bin:$PATH" 36 | -------------------------------------------------------------------------------- /.gitconfig: -------------------------------------------------------------------------------- 1 | [user] 2 | name = ryuihi1208 3 | email = ryucrosskey@gmail.com 4 | 5 | [core] 6 | pager = less -R 7 | excludesfile = ~/.gitignore 8 | 9 | [alias] 10 | a = add 11 | b = branch 12 | c = commit 13 | d = diff 14 | f = fetch --prune 15 | h = help 16 | l = log 17 | s = status 18 | co = checkout 19 | pom = push origin master 20 | 21 | graph = log --graph --all --oneline --decorate 22 | 23 | branches = branch -a 24 | tags = tag 25 | stashes = stash list 26 | remotes = remote -v 27 | 28 | interactive = add -p 29 | edit = rebase -i 30 | 31 | unstage = reset HEAD -- 32 | discard = checkout -- 33 | discardall = reset --hard 34 | uncommit = reset HEAD~ 35 | 36 | newbranch = checkout -b 37 | 38 | deletetracking = branch -d -r -- 39 | 40 | overwrite = push --force-with-lease 41 | 42 | [commit] 43 | template = ~/.gitmessage.md 44 | 45 | [color] 46 | pager = true 47 | status = auto 48 | branch = auto 49 | diff = auto 50 | 51 | [merge] 52 | ff = false 53 | 54 | [diff] 55 | renames = true 56 | 57 | [pager] 58 | branch = false 59 | -------------------------------------------------------------------------------- /linux/oth/tmp/linux/vim/README.md: -------------------------------------------------------------------------------- 1 | ## Download vim 2 | 3 | ``` bash 4 | $ git clone https://github.com/vim/vim.git 5 | ``` 6 | 7 | ## Install req packages 8 | 9 | ``` bash 10 | $ yum install -y \ 11 | epel-release \ 12 | lua-devel.x86_64 \ 13 | python-dev python3-dev \ 14 | ruby ruby-devel \ 15 | gcc make ncurses-devel \ 16 | perl-devel perl-ExtUtils-Embed \ 17 | heckinstall mercurial \ 18 | libx11-dev libxt-dev libgtk2.0-dev libncurses5 19 | ``` 20 | 21 | ## build 22 | 23 | ``` bash 24 | $ ./configure \ 25 | --enable-fail-if-missing \ 26 | --with-features=huge \ 27 | --disable-selinux \ 28 | --enable-luainterp \ 29 | --enable-perlinterp \ 30 | --enable-pythoninterp=dynamic \ 31 | --with-python-config-dir=/usr/lib64/python2.7/config \ 32 | --enable-python3interp=dynamic \ 33 | --with-python3-config-dir=/usr/lib64/python3.6/config-3.6m-x86_64-linux-gnu \ 34 | --enable-rubyinterp=dynamic \ 35 | --enable-cscope \ 36 | --enable-fontset \ 37 | --enable-multibyte \ 38 | vi_cv_path_python3=/usr/bin/python3.6 39 | 40 | # make && make install 41 | ``` 42 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Ryuichi1208 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /tmp/mac/git/hooks/pre_push: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | remote="$1" 4 | url="$2" 5 | 6 | z40=0000000000000000000000000000000000000000 7 | 8 | while read local_ref local_sha remote_ref remote_sha 9 | do 10 | if [ "$local_sha" = $z40 ] 11 | then 12 | # Handle delete 13 | : 14 | else 15 | if [ "$remote_sha" = $z40 ] 16 | then 17 | # New branch, examine all commits 18 | range="$local_sha" 19 | else 20 | # Update to existing branch, examine new commits 21 | range="$remote_sha..$local_sha" 22 | fi 23 | 24 | commit=`git diff --name-only "$range"` 25 | if [ -n "$commit" ] 26 | for file in $commit; do 27 | case "${file##*.}" in 28 | pl | pm | t) 29 | echo $file 30 | #perlcritic -5 --verbose 8 $file || exit 1 31 | ;; 32 | *) 33 | ;; 34 | esac 35 | done 36 | exit 0 37 | then 38 | exit 1 39 | fi 40 | fi 41 | done 42 | 43 | exit 0 44 | -------------------------------------------------------------------------------- /linux/oth/tmp/old_srv/bashrc: -------------------------------------------------------------------------------- 1 | ## インタラクティブに実行しない場合は何もしない 2 | [[ $- != *i* ]] && return 3 | 4 | 5 | ## 色 6 | # Normal Colors 7 | Black='\033[0;30m' # Black 8 | Red='\033[0;31m' # Red 9 | Green='\033[0;32m' # Green 10 | Yellow='\033[0;33m' # Yellow 11 | Blue='\033[0;34m' # Blue 12 | Purple='\033[0;35m' # Purple 13 | Cyan='\033[0;36m' # Cyan 14 | White='\033[0;37m' # White 15 | 16 | 17 | ## シェルオプション 18 | umask 022 19 | ulimit -c 0 20 | set -o noclobber 21 | shopt -u cdspell 22 | shopt -s checkwinsize 23 | shopt -s direxpand 24 | shopt -s histappend 25 | 26 | 27 | ## 環境変数 28 | export PATH=~/bin:"$PATH" 29 | export PAGER=less 30 | export EDITOR=vim 31 | export LANG=en_US.UTF-8 32 | export LC_ALL=en_US.UTF-8 33 | export MYHISTFILE=~/.bash_myhistory 34 | export HISTCONTROL=ignoreboth:erasedups 35 | export HISTTIMEFORMAT="%Y/%m/%d %H:%M:%S: " 36 | export HISTSIZE=50000 37 | export HISTFILESIZE=50000 38 | 39 | 40 | ## alias 41 | alias ll='ls -l' 42 | alias la='ls -la' 43 | alias lr='ls -lR' 44 | alias rm='rm -i' 45 | alias cp='cp -i' 46 | alias mv='mv -i' 47 | alias du='du -h' 48 | alias job='jobs -l' 49 | 50 | ## 関数 51 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/go/pattern.stpl: -------------------------------------------------------------------------------- 1 | \(\S\+\)\.var$ 2 | var {{$1}} = {{_cursor_}} 3 | 4 | \(\S\+\)\.iferr$ 5 | if {{$1}} != nil { 6 | return {{$1}} 7 | } 8 | {{_cursor_}} 9 | 10 | \(\S\+\)\.fatal$ 11 | if {{$1}} != nil { 12 | log.Fatal({{$1}}) 13 | } 14 | {{_cursor_}} 15 | 16 | \(\S\+\)\.log$ 17 | log.Println({{$1}}) 18 | {{_cursor_}} 19 | 20 | \(\S\+\)\.close$ 21 | defer {{$1}}.Close() 22 | {{_cursor_}} 23 | 24 | \(\S\+\)\.query$ 25 | {{$1}}.Query("{{_cursor_}}") 26 | 27 | \(\S.*\)\.pr\%[int]$ 28 | fmt.Print({{$1}}) 29 | {{_cursor_}} 30 | 31 | \(\S.*\)\.pr\%[int]f$ 32 | fmt.Printf({{$1}}) 33 | {{_cursor_}} 34 | 35 | \(\S.*\)\.pr\%[int]l\%[n]$ 36 | fmt.Println({{$1}}) 37 | {{_cursor_}} 38 | 39 | \(\S.*\)\.fpr\%[int]$ 40 | fmt.Fprint({{$1}}) 41 | {{_cursor_}} 42 | 43 | \(\S.*\)\.fpr\%[int]f$ 44 | fmt.Fprintf({{$1}}) 45 | {{_cursor_}} 46 | 47 | \(\S.*\)\.fpr\%[int]l\%[n]$ 48 | fmt.Fprintln({{$1}}) 49 | {{_cursor_}} 50 | 51 | \(\S.*\)\.spr\%[int]$ 52 | {{_cursor_}} fmt.Sprint({{$1}}) 53 | 54 | \(\S.*\)\.spr\%[int]f$ 55 | {{_cursor_}} fmt.Sprintf({{$1}}) 56 | 57 | \(\S.*\)\.spr\%[int]l\%[n]$ 58 | {{_cursor_}} fmt.Sprintln({{$1}}) 59 | -------------------------------------------------------------------------------- /tmp/mac/nvim/install.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -o nounset # error when referencing undefined variable 4 | set -o errexit # exit when command fails 5 | 6 | # Install latest nodejs 7 | if [ ! -x "$(command -v node)" ]; then 8 | curl --fail -LSs https://install-node.now.sh/latest | sh 9 | export PATH="/usr/local/bin/:$PATH" 10 | # Or use apt-get 11 | # sudo apt-get install nodejs 12 | fi 13 | 14 | # Use package feature to install coc.nvim 15 | 16 | # for vim8 17 | mkdir -p ~/.vim/pack/coc/start 18 | cd ~/.vim/pack/coc/start 19 | curl --fail -L https://github.com/neoclide/coc.nvim/archive/release.tar.gz|tar xzfv - 20 | # for neovim 21 | # mkdir -p ~/.local/share/nvim/site/pack/coc/start 22 | # cd ~/.local/share/nvim/site/pack/coc/start 23 | # curl --fail -L https://github.com/neoclide/coc.nvim/archive/release.tar.gz|tar xzfv - 24 | 25 | # Install extensions 26 | mkdir -p ~/.config/coc/extensions 27 | cd ~/.config/coc/extensions 28 | if [ ! -f package.json ] 29 | then 30 | echo '{"dependencies":{}}'> package.json 31 | fi 32 | # Change extension names to the extensions you need 33 | npm install coc-snippets --global-style --ignore-scripts --no-bin-links --no-package-lock --only=prod 34 | -------------------------------------------------------------------------------- /linux/tmux.conf: -------------------------------------------------------------------------------- 1 | # prefixキーをC-sに変更する 2 | set -g prefix C-s 3 | 4 | # C-bのキーバインドを解除する 5 | unbind C-b 6 | 7 | # キーストロークのディレイを減らす 8 | set -sg escape-time 1 9 | 10 | # ウィンドウのインデックスを1から始める 11 | set -g base-index 1 12 | 13 | # ペインのインデックスを1から始める 14 | setw -g pane-base-index 1 15 | 16 | # 設定ファイルをリロードする 17 | bind r source-file ~/.tmux.conf \; display "Reloaded!" 18 | 19 | # C-a*2でtmux内のプログラムにC-aを送る 20 | bind C-a send-prefix 21 | 22 | # | でペインを縦に分割する 23 | bind | split-window -h 24 | 25 | # - でペインを横に分割する 26 | bind - split-window -v 27 | 28 | # Vimのキーバインドでペインを移動する 29 | bind h select-pane -L 30 | bind j select-pane -D 31 | bind k select-pane -U 32 | bind l select-pane -R 33 | bind -r C-h select-window -t :- 34 | bind -r C-l select-window -t :+ 35 | 36 | # Vimのキーバインドでペインをリサイズする 37 | bind -r H resize-pane -L 5 38 | bind -r J resize-pane -D 5 39 | bind -r K resize-pane -U 5 40 | bind -r L resize-pane -R 5 41 | 42 | # マウス操作を有効にする 43 | setw -g mouse on 44 | 45 | # 256色端末を使用する 46 | set -g default-terminal "screen-256color" 47 | 48 | # ステータスバーの色を設定する 49 | set -g status-fg black 50 | set -g status-bg green 51 | 52 | bind -n S-left select-pane -L 53 | bind -n S-down select-pane -D 54 | bind -n S-up select-pane -U 55 | bind -n S-right select-pane -R 56 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/_/file-LICENSE-mit.txt: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) {{_expr_:strftime("%Y")}} {{_input_:author}} 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /linux/oth/alias: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | alias tf='terraform' 4 | alias tfa='terraform apply' 5 | alias tfc='terraform console' 6 | alias tfd='terraform destroy' 7 | alias tff='terraform fmt' 8 | alias tfg='terraform graph' 9 | alias tfim='terraform import' 10 | alias tfin='terraform init' 11 | alias tfo='terraform output' 12 | alias tfp='terraform plan' 13 | alias tfpr='terraform providers' 14 | alias tfr='terraform refresh' 15 | alias tfsh='terraform show' 16 | alias tft='terraform taint' 17 | alias tfut='terraform untaint' 18 | alias tfv='terraform validate' 19 | alias tfw='terraform workspace' 20 | alias tfs='terraform state' 21 | alias tffu='terraform force-unlock' 22 | alias tfwst='terraform workspace select' 23 | alias tfwsw='terraform workspace show' 24 | alias tfssw='terraform state show' 25 | alias tfwde='terraform workspace delete' 26 | alias tfwls='terraform workspace list' 27 | alias tfsls='terraform state list' 28 | alias tfwnw='terraform workspace new' 29 | alias tfsmv='terraform state mv' 30 | alias tfspl='terraform state pull' 31 | alias tfsph='terraform state push' 32 | alias tfsrm='terraform state rm' 33 | alias tfay='terraform apply -auto-approve' 34 | alias tfdy='terraform destroy -auto-approve' 35 | alias tfinu='terraform init -upgrade' 36 | alias tfpde='terraform plan --destroy' 37 | -------------------------------------------------------------------------------- /linux/oth/setup/bootstrap_master.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | setenforce 0 4 | systemctl stop firewalld 5 | systemctl start containerd.service 6 | 7 | cat < /etc/sysctl.d/k8s.conf 8 | net.bridge.bridge-nf-call-ip6tables = 1 9 | net.bridge.bridge-nf-call-iptables = 1 10 | EOF 11 | sysctl --system 12 | 13 | cat < /etc/yum.repos.d/kubernetes.repo 14 | [kubernetes] 15 | name=Kubernetes 16 | baseurl=https://packages.cloud.google.com/yum/repos/kubernetes-el7-x86_64 17 | enabled=1 18 | gpgcheck=1 19 | repo_gpgcheck=1 20 | gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg 21 | EOF 22 | 23 | yum install -y kubelet kubeadm kubectl --disableexcludes=kubernetes 24 | 25 | kubeadm init \ 26 | --pod-network-cidr 10.244.0.0/16 \ 27 | --cri-socket=/run/containerd/containerd.sock 28 | 29 | mkdir -p $HOME/.kube 30 | sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config 31 | sudo chown $(id -u):$(id -g) $HOME/.kube/config 32 | 33 | systemctl enable --now kubelet 34 | kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml 35 | 36 | curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 37 | chmod 700 get_helm.sh 38 | ./get_helm.sh 39 | -------------------------------------------------------------------------------- /linux/oth/profile: -------------------------------------------------------------------------------- 1 | # /etc/profile 2 | 3 | # System wide environment and startup programs, for login setup 4 | # Functions and aliases go in /etc/bashrc 5 | 6 | pathmunge () { 7 | if ! echo $PATH | /bin/egrep -q "(^|:)$1($|:)" ; then 8 | if [ "$2" = "after" ] ; then 9 | PATH=$PATH:$1 10 | else 11 | PATH=$1:$PATH 12 | fi 13 | fi 14 | } 15 | 16 | # Path manipulation 17 | if [ `id -u` = 0 ]; then 18 | pathmunge /sbin 19 | pathmunge /usr/sbin 20 | pathmunge /usr/local/sbin 21 | fi 22 | 23 | pathmunge /usr/X11R6/bin after 24 | 25 | unset pathmunge 26 | 27 | # No core files by default 28 | ulimit -S -c 0 > /dev/null 2>&1 29 | 30 | USER="`id -un`" 31 | LOGNAME=$USER 32 | MAIL="/var/spool/mail/$USER" 33 | 34 | HOSTNAME=`/bin/hostname` 35 | HISTSIZE=500 36 | HISTFILESIZE=0 37 | HISTTIMEFORMAT="%Y-%m-%d_%H:%M:%S\ " 38 | TMOUT=32400 39 | 40 | if [ -z "$INPUTRC" -a ! -f "$HOME/.inputrc" ]; then 41 | INPUTRC=/etc/inputrc 42 | fi 43 | 44 | # set curl requests make fewer access system call 45 | NSS_SDB_USE_CACHE=yes 46 | 47 | export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE HISTFILESIZE TMOUT INPUTRC NSS_SDB_USE_CACHE 48 | 49 | for i in /etc/profile.d/*.sh ; do 50 | if [ -r "$i" ]; then 51 | . $i 52 | fi 53 | done 54 | 55 | unset i 56 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/_/file-LICENSE-pd.txt: -------------------------------------------------------------------------------- 1 | This is free and unencumbered software released into the public domain. 2 | 3 | Anyone is free to copy, modify, publish, use, compile, sell, or 4 | distribute this software, either in source code form or as a compiled 5 | binary, for any purpose, commercial or non-commercial, and by any 6 | means. 7 | 8 | In jurisdictions that recognize copyright laws, the author or authors 9 | of this software dedicate any and all copyright interest in the 10 | software to the public domain. We make this dedication for the benefit 11 | of the public at large and to the detriment of our heirs and 12 | successors. We intend this dedication to be an overt act of 13 | relinquishment in perpetuity of all present and future rights to this 14 | software under copyright law. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR 20 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 21 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | OTHER DEALINGS IN THE SOFTWARE. 23 | 24 | For more information, please refer to 25 | -------------------------------------------------------------------------------- /tmp/mac/tmux/tmux.vim: -------------------------------------------------------------------------------- 1 | if exists("g:loaded_tmux_navigator") || &cp || v:version < 700 2 | finish 3 | endif 4 | let g:loaded_tmux_navigator = 1 5 | 6 | function! s:VimNavigate(direction) 7 | try 8 | execute 'wincmd ' . a:direction 9 | catch 10 | echohl ErrorMsg | echo 'E11: Invalid in command-line window; executes, CTRL-C quits: wincmd k' | echohl None 11 | endtry 12 | endfunction 13 | 14 | if !get(g:, 'tmux_navigator_no_mappings', 0) 15 | nnoremap :TmuxNavigateLeft 16 | nnoremap :TmuxNavigateDown 17 | nnoremap :TmuxNavigateUp 18 | nnoremap :TmuxNavigateRight 19 | nnoremap :TmuxNavigatePrevious 20 | endif 21 | 22 | if empty($TMUX) 23 | command! TmuxNavigateLeft call s:VimNavigate('h') 24 | command! TmuxNavigateDown call s:VimNavigate('j') 25 | command! TmuxNavigateUp call s:VimNavigate('k') 26 | command! TmuxNavigateRight call s:VimNavigate('l') 27 | command! TmuxNavigatePrevious call s:VimNavigate('p') 28 | finish 29 | endif 30 | 31 | command! TmuxNavigateLeft call s:TmuxAwareNavigate('h') 32 | command! TmuxNavigateDown call s:TmuxAwareNavigate('j') 33 | command! TmuxNavigateUp call s:TmuxAwareNavigate('k') 34 | command! TmuxNavigateRight call s:TmuxAwareNavigate('l') 35 | command! TmuxNavigatePrevious call s:TmuxAwareNavigate('p') 36 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/coc-settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "suggest.noselect":false, 3 | "suggest.preferCompleteThanJumpPlaceholder":true, 4 | "languageserver": { 5 | 6 | "intelephense": { 7 | "command": "intelephense", 8 | "args": ["--stdio"], 9 | "filetypes": ["php"], 10 | "initializationOptions": { 11 | "storagePath": "/tmp/intelephense" 12 | } 13 | }, 14 | 15 | "clangd": { 16 | "command": "clangd", 17 | "args": ["--background-index"], 18 | "rootPatterns": ["compile_flags.txt", "compile_commands.json", ".vim/", ".git/", ".hg/"], 19 | "filetypes": ["c", "cpp", "objc", "objcpp"] 20 | }, 21 | 22 | "lua": { 23 | "command": "lua-lsp", 24 | "filetypes": ["lua"] 25 | }, 26 | 27 | "python": { 28 | "command": "python3", 29 | "filetypes": ["python", "py"], 30 | "settings": { 31 | "pyls": { 32 | "enable": true 33 | }, 34 | "plugins": { 35 | "jedi_completion": { 36 | "enabled": false 37 | }, 38 | "jedi_hover": { 39 | "enabled": true 40 | } 41 | } 42 | } 43 | } 44 | }, 45 | "python.linting.enabled": true, 46 | "python.linting.pep8Path": "pep8", 47 | "python.formatting.blackPath": "black", 48 | "python.jediPath" : "/usr/local/lib/python3.8/site-packages" 49 | } 50 | -------------------------------------------------------------------------------- /linux/oth/tmp/linux/.vim/.cheatsheet.md: -------------------------------------------------------------------------------- 1 | # Cheat Sheet 2 | 3 | ### Move Base 4 | 5 | - "hjki" ←↓↑→ 6 | - "gg" ファイル先頭へ 7 | - "G" ファイル末尾へ 8 | - "w" 次の単語の末尾 9 | - "e" 今の単語の末尾 10 | - "b" 前の単語の先頭 11 | - "%" 対の括弧 12 | - "0" 行の先頭へ 13 | - "$" 行の末尾へ 14 | - "+" 下の行の先頭へ 15 | - "-" 上の行の先頭へ 16 | 17 | ### Move Page 18 | 19 | - "C-u" 半画面分上へ 20 | - "C-d" 半画面分下へ 21 | - "C-b" 一画面分上へ 22 | - "C-f" 一画面分下へ 23 | - "zz" カーソル位置が中央となるようにスクロール 24 | - "zt" カーソル位置が最上となるようにスクロール 25 | - "zb" カーソル位置が最下となるようにスクロール 26 | - "H" ウィンドウ内の一番上へ移動 27 | - "M" ウィンドウ内の真ん中へ移動 28 | - "L" ウィンドウ内の一番下へ移動 29 | 30 | ### Tab 31 | 32 | - "gt" 次のタブへ 33 | - "Gt" 前のタブへ 34 | 35 | ### Delete 36 | 37 | - "dd" カーソル行を削除 38 | - "dw" カーソルのある単語を削除 39 | - "di(" 括弧内を削除 40 | - "ciw" カーソル上の単語を削除しインサートモードへ 41 | - "x" 一文字削除 42 | - "X" カーソル左一文字削除 43 | - "D" カーソル位置から行末まで削除 44 | 45 | ### Copy 46 | 47 | - "yy" カーソル行をコピー 48 | - "yi(" 括弧内をコピー 49 | 50 | ### Comment Out 51 | 52 | - " [1-9] cc" コメントアウト 53 | - " c " コメントアウト解除 54 | - " cs" ブロックコメント 55 | 56 | ### Search and Change 57 | 58 | - ":%s/hoge/fuga/g" 59 | 60 | ### Mode 61 | 62 | - :e ファイル読み込み 63 | - :w 上書き保存 64 | - :q 終了 65 | - ZZ 保存して終了 66 | - ZQ 保存せずに終了 67 | 68 | ### NERD 69 | - NERD起動 70 | - w 切り替え 71 | 72 | ### LSP 73 | - 定義ジャンプ 74 | - gD 参照チェック 75 | -------------------------------------------------------------------------------- /tmp/mac/vim/.vim/.cheatsheet.md: -------------------------------------------------------------------------------- 1 | # Cheat Sheet 2 | 3 | ### Move Base 4 | 5 | - "hjki" ←↓↑→ 6 | - "gg" ファイル先頭へ 7 | - "G" ファイル末尾へ 8 | - "w" 次の単語の末尾 9 | - "e" 今の単語の末尾 10 | - "b" 前の単語の先頭 11 | - "%" 対の括弧 12 | - "0" 行の先頭へ 13 | - "$" 行の末尾へ 14 | - "+" 下の行の先頭へ 15 | - "-" 上の行の先頭へ 16 | - "][%" 関数の先頭へ移動 17 | 18 | ### Move Page 19 | 20 | - "C-u" 半画面分上へ 21 | - "C-d" 半画面分下へ 22 | - "C-b" 一画面分上へ 23 | - "C-f" 一画面分下へ 24 | - "zz" カーソル位置が中央となるようにスクロール 25 | - "zt" カーソル位置が最上となるようにスクロール 26 | - "zb" カーソル位置が最下となるようにスクロール 27 | - "H" ウィンドウ内の一番上へ移動 28 | - "M" ウィンドウ内の真ん中へ移動 29 | - "L" ウィンドウ内の一番下へ移動 30 | 31 | ### Tab 32 | 33 | - "gt" 次のタブへ 34 | - "Gt" 前のタブへ 35 | 36 | ### Delete 37 | 38 | - "dd" カーソル行を削除 39 | - "dw" カーソルのある単語を削除 40 | - "di(" 括弧内を削除 41 | - "ciw" カーソル上の単語を削除しインサートモードへ 42 | - "x" 一文字削除 43 | - "X" カーソル左一文字削除 44 | - "D" カーソル位置から行末まで削除 45 | 46 | ### Copy 47 | 48 | - "yy" カーソル行をコピー 49 | - "yi(" 括弧内をコピー 50 | 51 | ### Comment Out 52 | 53 | - " [1-9] cc" コメントアウト 54 | - " c " コメントアウト解除 55 | - " cs" ブロックコメント 56 | 57 | ### Search and Change 58 | 59 | - ":%s/hoge/fuga/g" 60 | 61 | ### Mode 62 | 63 | - :e ファイル読み込み 64 | - :w 上書き保存 65 | - :q 終了 66 | - ZZ 保存して終了 67 | - ZQ 保存せずに終了 68 | 69 | ### NERD 70 | - NERD起動 71 | - w 切り替え 72 | 73 | ### LSP 74 | - 定義ジャンプ 75 | - gD 参照チェック 76 | -------------------------------------------------------------------------------- /linux/oth/tmp/linux/.tmux.conf: -------------------------------------------------------------------------------- 1 | # 色設定をデフォルトにする 2 | set-option -g default-terminal screen-256color 3 | set -g terminal-overrides 'xterm:colors=256' 4 | 5 | # 画面ドラッグ時にコピーモードにする 6 | set-option -g mode-mouse on 7 | 8 | # prefixキーをC-tに変更する 9 | set -g prefix C-t 10 | 11 | # 設定ファイル再読み込み r 12 | bind r source-file ~/.tmux.conf 13 | 14 | # C-bのキーバインドを解除する 15 | unbind C-b 16 | 17 | # キーストロークのディレイを減らす 18 | set -sg escape-time 1 19 | 20 | # ウィンドウのインデックスを1から始める 21 | set -g base-index 1 22 | 23 | # ペインのインデックスを1から始める 24 | setw -g pane-base-index 1 25 | 26 | # | でペインを縦に分割する 27 | bind | split-window -h 28 | 29 | # - でペインを横に分割する 30 | bind - split-window -v 31 | 32 | # Vimのキーバインドでペインを移動する 33 | bind h select-pane -L 34 | bind j select-pane -D 35 | bind k select-pane -U 36 | bind l select-pane -R 37 | bind -r C-h select-window -t :- 38 | bind -r C-l select-window -t :+ 39 | 40 | # Vimのキーバインドでペインをリサイズする 41 | bind -r H resize-pane -L 5 42 | bind -r J resize-pane -D 5 43 | bind -r K resize-pane -U 5 44 | bind -r L resize-pane -R 5 45 | 46 | # マウス操作を有効にする 47 | #setw -g mouse on 48 | 49 | # ステータスバーの色を設定する 50 | #set -g status-fg white 51 | #set -g status-bg black 52 | 53 | # ウィンドウリストの色を設定する 54 | setw -g window-status-fg cyan 55 | setw -g window-status-bg default 56 | setw -g window-status-attr dim 57 | # アクティブなウィンドウを目立たせる 58 | setw -g window-status-current-fg white 59 | setw -g window-status-current-bg red 60 | setw -g window-status-current-attr bright 61 | -------------------------------------------------------------------------------- /linux/oth/tmp/linux/.ctags: -------------------------------------------------------------------------------- 1 | --append=yes 2 | --recurse=yes 3 | 4 | --exclude=node_modules 5 | --exclude=.git 6 | #--exclude=build 7 | --exclude=dist 8 | --exclude=public 9 | 10 | --languages=-javascript 11 | --langdef=js 12 | --langmap=js:.js 13 | --langmap=js:+.jsx 14 | 15 | --regex-js=/[ \t.]([A-Z][A-Z0-9._$]+)[ \t]*[=:][ \t]*([0-9"'\[\{]|null)/\1/n,constant/ 16 | --regex-js=/\.([A-Za-z0-9._$]+)[ \t]*=[ \t]*\{/\1/o,object/ 17 | --regex-js=/['"]*([A-Za-z0-9_$]+)['"]*[ \t]*:[ \t]*\{/\1/o,object/ 18 | --regex-js=/([A-Za-z0-9._$]+)\[["']([A-Za-z0-9_$]+)["']\][ \t]*=[ \t]*\{/\1\.\2/o,object/ 19 | --regex-js=/([A-Za-z0-9._$]+)[ \t]*=[ \t]*\(function\(\)/\1/c,class/ 20 | --regex-js=/['"]*([A-Za-z0-9_$]+)['"]*:[ \t]*\(function\(\)/\1/c,class/ 21 | --regex-js=/class[ \t]+([A-Za-z0-9._$]+)[ \t]*/\1/c,class/ 22 | --regex-js=/([A-Za-z$][A-Za-z0-9_$()]+)[ \t]*=[ \t]*[Rr]eact.createClass[ \t]*\(/\1/c,class/ 23 | --regex-js=/([A-Z][A-Za-z0-9_$]+)[ \t]*=[ \t]*[A-Za-z0-9_$]*[ \t]*[{(]/\1/c,class/ 24 | --regex-js=/([A-Z][A-Za-z0-9_$]+)[ \t]*:[ \t]*[A-Za-z0-9_$]*[ \t]*[{(]/\1/c,class/ 25 | --regex-js=/([A-Za-z$][A-Za-z0-9_$]+)[ \t]*=[ \t]*function[ \t]*\(/\1/f,function/ 26 | --regex-js=/(function)*[ \t]*([A-Za-z$_][A-Za-z0-9_$]+)[ \t]*\([^)]*\)[ \t]*\{/\2/f,function/ 27 | --regex-js=/['"]*([A-Za-z$][A-Za-z0-9_$]+)['"]*:[ \t]*function[ \t]*\(/\1/m,method/ 28 | --regex-js=/([A-Za-z0-9_$]+)\[["']([A-Za-z0-9_$]+)["']\][ \t]*=[ \t]*function[ \t]*\(/\2/m,method/ 29 | -------------------------------------------------------------------------------- /mac/brew.list: -------------------------------------------------------------------------------- 1 | asdf 2 | atlantis 3 | autoconf 4 | autoconf-archive 5 | automake 6 | ca-certificates 7 | cairo 8 | coreutils 9 | curl-http3-libressl 10 | drill 11 | duckdb 12 | fontconfig 13 | freetype 14 | fribidi 15 | gettext 16 | ghostscript 17 | giflib 18 | glib 19 | gmp 20 | gnupg 21 | gnutls 22 | graphite2 23 | harfbuzz 24 | icu4c@75 25 | icu4c@76 26 | jbig2dec 27 | jpeg-turbo 28 | krb5 29 | leptonica 30 | libarchive 31 | libassuan 32 | libassuan@2 33 | libb2 34 | libevent 35 | libgcrypt 36 | libgpg-error 37 | libidn 38 | libidn2 39 | libksba 40 | libnghttp2 41 | libpng 42 | libpq 43 | libtasn1 44 | libtiff 45 | libtool 46 | libunistring 47 | libusb 48 | libx11 49 | libxau 50 | libxcb 51 | libxdmcp 52 | libxext 53 | libxrender 54 | libyaml 55 | little-cms2 56 | lz4 57 | lzo 58 | m4 59 | mpdecimal 60 | ncurses 61 | nettle 62 | ninja 63 | npth 64 | openjpeg 65 | openssl@3 66 | overmind 67 | p11-kit 68 | pango 69 | pcre 70 | pcre2 71 | pinentry 72 | pinentry-mac 73 | pinentry-touchid 74 | pipx 75 | pixman 76 | pkgconf 77 | pyenv 78 | python-packaging 79 | python@3.13 80 | readline 81 | sqlite 82 | telnet 83 | tesseract 84 | the_silver_searcher 85 | tmux 86 | tree 87 | unbound 88 | unixodbc 89 | utf8proc 90 | webp 91 | wget 92 | xorgproto 93 | xz 94 | zsh-completions 95 | zsh-git-prompt 96 | zsh-syntax-highlighting 97 | zstd 98 | aws-vpn-client 99 | ghostty 100 | mactex 101 | -------------------------------------------------------------------------------- /tmp/windows/git/hooks/git_pymem: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | import sys 4 | import subprocess 5 | 6 | """Detect forced pushes (on the client) and prompt the user before going on.""" 7 | def read_from_tty(): 8 | try: 9 | import posix # No way to do this on Windows, just give up there. 10 | with open('/dev/tty') as tty_fd: 11 | return tty_fd.readline().strip() 12 | except: 13 | return None 14 | 15 | def Main(): 16 | # Allow force pushes in repos forked elsewhere (e.g. googlesource). 17 | remote_url = sys.argv[2] if len(sys.argv) >= 2 else '' 18 | if 'github.com' not in remote_url: 19 | return 0 20 | parts = sys.stdin.readline().split() 21 | if len(parts) < 4: 22 | return 0 23 | local_ref, local_sha, remote_ref, remote_sha = parts 24 | cmd = ['git', 'rev-list', '--count', remote_sha, '--not', local_sha, 25 | '--max-count=1'] 26 | is_force_push = '0' 27 | try: 28 | is_force_push = subprocess.check_output(cmd).strip() 29 | except(subprocess.CalledProcessError): 30 | return 0 31 | if is_force_push != '0': 32 | sys.stderr.write('\033[31mWARNING: Force pushing will break the ' + 33 | 'github.com -> googlesource.com mirroring.\033[0m\n' + 34 | 'This is almost certainly a bad idea.\n') 35 | sys.stderr.write('Type y to continue: ') 36 | if read_from_tty() != 'y': 37 | return 1 38 | return 0 39 | 40 | if __name__ == '__main__': 41 | sys.exit(Main()) 42 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/.cheatsheet.md: -------------------------------------------------------------------------------- 1 | # Cheat Sheet 2 | 3 | #### Base 4 | 5 | - "u" アンドゥ 6 | - "." 直前のキー入力と同じ操作を繰り返す 7 | - "c-r" リドゥ 8 | 9 | #### Delete 10 | 11 | - "x" 1文字削除 12 | - "dd" 1行切り取り 13 | - "dw" 1単語削除 14 | - "D" 行末まで削除 15 | - "diw" カーソル位置にある単語を1つを削除 16 | - "dt)" 次に出現する「)」を含まない削除 17 | - "df)" 次に出現する「)」を含む削除 18 | - "di)" 「()」を削除 19 | - "dit" タグ間の文字を削除 20 | - "ci'" 「''」の中身を削除してインサートモードへ 21 | - ":%d" 全削除 22 | 23 | #### Move 24 | 25 | - "gj" 下へ一つ 26 | - "gk" 上へ一つ 27 | - "+" 下の行の先頭へ 28 | - "-" 上の行の先頭へ 29 | - "w" 単語の先頭へ進む 30 | - "b" 単語の先頭へ戻る 31 | - "e" 単語の末尾へ進む 32 | - "ge" 単語の末尾へ戻る 33 | - "H" 画面の最初の行へ移動 34 | - "M" 画面の中央の行へ移動 35 | - "L" 画面の最後の行へ移動 36 | 37 | #### Move Plus 38 | 39 | - "c-u" 半画面上へ 40 | - "c-d" 半画面下へ 41 | - "c-b" 1画面上へ 42 | - "c-f" 1画面下へ 43 | - "c-o" ジャンプしてきた箇所へ戻る 44 | - "c-i" ジャンプしてきた箇所へ進む 45 | 46 | #### Search 47 | 48 | - "*" カーソル位置の単語を下へ検索 49 | - "#" カーソル位置の単語を上へ検 50 | - "g*" カーソル位置の単語(部分一致)を下へ検索f 51 | - "f aa" 同じ行内のカーソル位置以前で指定された文字がある場所へ移動する 52 | - "t aa" 同じ行内のカーソル位置以降で指定された文字がある場所へ移動する 53 | 54 | #### Mode 55 | 56 | - "r" リプレイスモード 57 | - "v" ヴィジュアルモード 58 | 59 | #### NERD 60 | 61 | - "c-e" タブツリーを表示 62 | - "c-w" バッファ切り替え 63 | 64 | #### QuickRun 65 | 66 | - "Leader e" 実行 67 | 68 | #### Jedi 69 | 70 | - "d" Definition(またはAssignment)に移動 71 | - "r" 変数リネーム 72 | -------------------------------------------------------------------------------- /tmp/mac/zsh/.zsh/completion.zsh: -------------------------------------------------------------------------------- 1 | # ----------------------------- 2 | # Completion 3 | # ----------------------------- 4 | fpath=(~/.zsh/completion $fpath) 5 | 6 | # 自動補完を有効にする 7 | autoload -Uz compinit ; compinit 8 | 9 | # 単語の入力途中でもTab補完を有効化 10 | setopt complete_in_word 11 | 12 | # コマンドミスを修正 13 | setopt correct 14 | 15 | # 補完の選択を楽にする 16 | zstyle ':completion:*' menu select 17 | 18 | # 補完候補をできるだけ詰めて表示する 19 | setopt list_packed 20 | 21 | # キャッシュの利用による補完の高速化 22 | zstyle ':completion::complete:*' use-cache true 23 | 24 | # 補完候補に色つける 25 | autoload -U colors ; colors ; zstyle ':completion:*' list-colors "${LS_COLORS}" 26 | #zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS} 27 | 28 | # 大文字・小文字を区別しない(大文字を入力した場合は区別する) 29 | zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}' 30 | 31 | # manの補完をセクション番号別に表示させる 32 | zstyle ':completion:*:manuals' separate-sections true 33 | 34 | # sudo の後ろでコマンド名を補完する 35 | zstyle ':completion:*:sudo:*' command-path /usr/local/sbin /usr/local/bin \ 36 | /usr/sbin /usr/bin /sbin /bin /usr/X11R6/bin 37 | 38 | # ps コマンドのプロセス名補完 39 | zstyle ':completion:*:processes' command 'ps x -o pid,s,args' 40 | 41 | # --prefix=/usr などの = 以降でも補完 42 | setopt magic_equal_subst 43 | 44 | # pip 45 | function _pip_completion { 46 | local words cword 47 | read -Ac words 48 | read -cn cword 49 | reply=( $( COMP_WORDS="$words[*]" \ 50 | COMP_CWORD=$(( cword-1 )) \ 51 | PIP_AUTO_COMPLETE=1 $words[1] ) ) 52 | } 53 | compctl -K _pip_completion pip 54 | compctl -K _pip_completion pip3 55 | -------------------------------------------------------------------------------- /linux/oth/dotfiles.yml: -------------------------------------------------------------------------------- 1 | bash: 2 | .bash 3 | bash_completion: 4 | .bash_completion 5 | bashrc: 6 | .bashrc.wkentaro 7 | config/catkin/verb_aliases/01-roslint.yaml: 8 | .config/catkin/verb_aliases/01-roslint.yaml 9 | config/htop/htoprc: 10 | .config/htop/htoprc 11 | config/nvim/init.vim: 12 | .config/nvim/init.vim 13 | cows: 14 | .cows 15 | dircolors.256dark: 16 | .dircolors.256dark 17 | editrc: 18 | .editrc 19 | emacs.d: 20 | .emacs.d 21 | events_config.yaml: 22 | .events_config.yaml 23 | gitconfig: 24 | .gitconfig 25 | gitignore_global: 26 | .gitignore_global 27 | gvimrc: 28 | .gvimrc 29 | hgignore_global: 30 | .hgignore_global 31 | hgrc: 32 | .hgrc 33 | inputrc: 34 | .inputrc 35 | ipython_config.py: 36 | .ipython/profile_default/ipython_config.py 37 | latexmkrc: 38 | .latexmkrc 39 | lessfilter: 40 | .lessfilter 41 | local/bin/*: 42 | .local/bin 43 | percol.d: 44 | .percol.d 45 | private/aws: 46 | .aws 47 | private/gpu_checker.cfg: 48 | .gpu_checker.cfg 49 | private/pypirc: 50 | .pypirc 51 | private/ssh/config: 52 | .ssh/config 53 | private/zshrc: 54 | .zshrc.private 55 | pythonstartup: 56 | .pythonstartup 57 | ptpython/config.py: 58 | .ptpython/config.py 59 | sh: 60 | .sh 61 | tmux: 62 | .tmux 63 | tmux.conf: 64 | .tmux.conf 65 | tmuxinator: 66 | .tmuxinator 67 | vim: 68 | .vim 69 | vimrc: 70 | .vimrc 71 | Xmodmap: 72 | .Xmodmap 73 | zprofile: 74 | name: .zprofile 75 | uname: Darwin 76 | zsh: 77 | .zsh 78 | zshrc: 79 | .zshrc.wkentaro 80 | zshrc.template: 81 | name: .zshrc 82 | type: copy 83 | -------------------------------------------------------------------------------- /linux/oth/tmp/linux/vim/dein_init.vim: -------------------------------------------------------------------------------- 1 | "---------------------------------------------------------- 2 | " Plugin dein.vim 3 | "---------------------------------------------------------- 4 | if &compatible 5 | set nocompatible " Be iMproved 6 | endif 7 | 8 | set runtimepath+=~/.cache/dein/repos/github.com/Shougo/dein.vim 9 | set runtimepath+=~/.cache/dein/repos/github.com/tomasr/molokai/colors/molokai.vim 10 | 11 | let s:dein_dir = expand('~/.cache/dein') 12 | let s:dein_repo_dir = s:dein_dir . '/repos/github.com/Shougo/dein.vim' 13 | 14 | " dein.vim がなければ github から落としてくる 15 | if &runtimepath !~# '/dein.vim' 16 | if !isdirectory(s:dein_repo_dir) 17 | execute '!git clone https://github.com/Shougo/dein.vim' s:dein_repo_dir 18 | endif 19 | execute 'set runtimepath^=' . fnamemodify(s:dein_repo_dir, ':p') 20 | endif 21 | 22 | if dein#load_state('~/.cache/dein') 23 | call dein#begin('~/.cache/dein') 24 | 25 | call dein#add('~/.cache/dein/repos/github.com/Shougo/dein.vim') 26 | 27 | call dein#load_toml('~/.vim/dein.toml', {'lazy': 0}) 28 | call dein#load_toml('~/.vim/dein_lazy.toml', {'lazy': 0}) 29 | 30 | call dein#end() 31 | call dein#save_state() 32 | endif 33 | 34 | " Required: 35 | filetype plugin indent on 36 | syntax enable 37 | 38 | " If you want to install not installed plugins on startup. 39 | if dein#check_install() 40 | call dein#install() 41 | endif 42 | 43 | 44 | "---------------------------------------------------------- 45 | " init.vim 46 | "---------------------------------------------------------- 47 | syntax on 48 | colorscheme molokai 49 | -------------------------------------------------------------------------------- /mac/settings_claude.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/claude-code-settings.json", 3 | "cleanupPeriodDays": 30, 4 | "env": { 5 | "ANTHROPIC_CUSTOM_HEADERS": "[object Object]", 6 | "BASH_DEFAULT_TIMEOUT_MS": "120000", 7 | "DISABLE_TELEMETRY": "false" 8 | }, 9 | "permissions": { 10 | "allow": [ 11 | "Read(~/.zshrc)", 12 | "List(*)", 13 | "Bash(ls:*)", 14 | "Bash(grep:*)", 15 | "Bash(awk:*)", 16 | "Bash(bat:*)", 17 | "Bash(cat:*)", 18 | "Bash(rg:*)", 19 | "Bash(find:*)", 20 | "Bash(sed:*)", 21 | "Bash(sort:*)", 22 | "Bash(uniq:*)", 23 | "Bash(uv sync)", 24 | "Bash(uv pip list)", 25 | "Bash(uv run * --help)", 26 | "Bash(go version)", 27 | "Bash(go env)", 28 | "Bash(go mod tidy)", 29 | "Bash(perl --version)", 30 | "Bash(npm run lint)", 31 | "Bash(npm run test:*)", 32 | "Bash(actionlint:*)", 33 | "Bash(mkdir -p ./:*)", 34 | "Bash(rm hello.py)", 35 | "Bash(find ./:*)", 36 | "WebFetch(domain:github.com)", 37 | "WebFetch(domain:vercel.com)", 38 | "WebFetch(domain:docs.anthropic.com)", 39 | "WebFetch(domain:stackoverflow.com)", 40 | "WebFetch(domain:developer.mozilla.org)", 41 | "WebFetch(domain:npmjs.com)", 42 | "WebFetch(domain:nextjs.org)", 43 | "WebFetch(domain:docs.aws.amazon.com)" 44 | ], 45 | "deny": [ 46 | "Write(~/.zshrc)", 47 | "Write(~/.vimrc)", 48 | "Write(~/.claude/settings.json)" 49 | ], 50 | "defaultMode": "plan" 51 | }, 52 | "model": "opus", 53 | "feedbackSurveyState": { 54 | "lastShownTime": 1754103918075 55 | }, 56 | "alwaysThinkingEnabled": false 57 | } 58 | -------------------------------------------------------------------------------- /tmp/mac/tmux/.tmux.conf: -------------------------------------------------------------------------------- 1 | # prefixキーをC-sに変更する 2 | set -g prefix C-s 3 | 4 | # C-bのキーバインドを解除する 5 | unbind C-b 6 | 7 | # キーストロークのディレイを減らす 8 | set -sg escape-time 1 9 | 10 | # ウィンドウのインデックスを1から始める 11 | set -g base-index 1 12 | 13 | # ペインのインデックスを1から始める 14 | setw -g pane-base-index 1 15 | 16 | # 設定ファイルをリロードする 17 | bind r source-file ~/.tmux.conf \; display "Reloaded!" 18 | 19 | # C-a*2でtmux内のプログラムにC-aを送る 20 | bind C-a send-prefix 21 | 22 | # | でペインを縦に分割する 23 | bind | split-window -h 24 | 25 | # - でペインを横に分割する 26 | bind - split-window -v 27 | 28 | # Vimのキーバインドでペインを移動する 29 | bind h select-pane -L 30 | bind j select-pane -D 31 | bind k select-pane -U 32 | bind l select-pane -R 33 | bind -r C-h select-window -t :- 34 | bind -r C-l select-window -t :+ 35 | 36 | # Vimのキーバインドでペインをリサイズする 37 | bind -r H resize-pane -L 5 38 | bind -r J resize-pane -D 5 39 | bind -r K resize-pane -U 5 40 | bind -r L resize-pane -R 5 41 | 42 | # マウス操作を有効にする 43 | setw -g mouse on 44 | 45 | # 256色端末を使用する 46 | set -g default-terminal "screen-256color" 47 | 48 | # ステータスバーの色を設定する 49 | set -g status-fg black 50 | set -g status-bg green 51 | 52 | bind -n S-left select-pane -L 53 | bind -n S-down select-pane -D 54 | bind -n S-up select-pane -U 55 | bind -n S-right select-pane -R 56 | 57 | # コピーモードを設定する 58 | ## viのキーバインドを使用する 59 | # setw -g mode-keys vi 60 | ## クリップボード共有を有効にする 61 | # set-option -g default-command "reattach-to-user-namespace -l zsh" 62 | ## コピーモードの操作をvi風に設定する 63 | # bind-key -T copy-mode-vi v send-keys -X begin-selection 64 | # bind-key -T copy-mode-vi y send-keys copy-pipe-and-cancel "reattach-to-user-namespace pbcopy" 65 | # unbind -T copy-mode-vi Enter 66 | # bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy" 67 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/init.vim: -------------------------------------------------------------------------------- 1 | "---------------------------------------------------------- 2 | " Encoding 3 | "---------------------------------------------------------- 4 | set encoding=utf-8 5 | set fileencoding=utf-8 6 | set fileencodings=ucs-boms,utf-8,euc-jp,cp932 7 | scriptencoding utf-8 8 | 9 | "---------------------------------------------------------- 10 | " release autogroup in MyAutoCmd 11 | "---------------------------------------------------------- 12 | augroup MyAutoCmd 13 | autocmd! 14 | augroup END 15 | 16 | "---------------------------------------------------------- 17 | " Plugin dein.vim 18 | "---------------------------------------------------------- 19 | if &compatible 20 | set nocompatible " Be iMproved 21 | endif 22 | 23 | set runtimepath+=~/.cache/dein/repos/github.com/Shougo/dein.vim 24 | 25 | if dein#load_state('~/.cache/dein') 26 | call dein#begin('~/.cache/dein') 27 | 28 | call dein#add('~/.cache/dein/repos/github.com/Shougo/dein.vim') 29 | 30 | call dein#load_toml('~/.config/nvim/dein.toml', {'lazy': 0}) 31 | call dein#load_toml('~/.config/nvim/dein_lazy.toml', {'lazy': 1}) 32 | 33 | call dein#end() 34 | call dein#save_state() 35 | endif 36 | 37 | " Required: 38 | filetype plugin indent on 39 | syntax enable 40 | 41 | " If you want to install not installed plugins on startup. 42 | if dein#check_install() 43 | call dein#install() 44 | endif 45 | 46 | "---------------------------------------------------------- 47 | " Other 48 | "---------------------------------------------------------- 49 | runtime! ./options.vim 50 | runtime! ./keymap.vim 51 | runtime! ./functions.vim 52 | runtime! ./indent.vim 53 | 54 | let g:python_host_prog="/usr/local/bin/python" 55 | let g:python3_host_prog="/usr/local/bin/python3" 56 | -------------------------------------------------------------------------------- /linux/oth/tests/py_main.py: -------------------------------------------------------------------------------- 1 | import muirc 2 | import sys 3 | import pybot 4 | 5 | from threading import Thread 6 | 7 | 8 | def userInput(): 9 | while connected: 10 | msg = raw_input(); 11 | if connected: 12 | conn.privmsg("#local", msg) 13 | 14 | connected = True 15 | 16 | server = "" 17 | channel = "" 18 | 19 | if(len(sys.argv) < 2): 20 | print("Not enough arguments. Please specify a server and channel") 21 | sys.exit() 22 | else: 23 | server = str(sys.argv[1]) 24 | channel = str(sys.argv[2]) 25 | 26 | conn = muirc.Connection((server, 6667)) 27 | conn.nick("AnnoyingBot") 28 | conn.UsEr("pythonbot", "pythonHost", "a", "bot") 29 | 30 | state = "wait_motd" 31 | for message in conn: 32 | 33 | #if sever message, print content 34 | if message["command"] == "372": 35 | print(message["params"][1]) 36 | 37 | if state == "wait_motd": 38 | # 376 => MOTD ends 39 | if message["command"] == "376": 40 | state = "end_motd" 41 | 42 | # Join #muirc 43 | if state == "end_motd": 44 | conn.join(channel) 45 | state = "wait_join" 46 | 47 | # Wait for join ack 48 | if state == "wait_join": 49 | if message["command"] == "JOIN": 50 | connected = True 51 | #start input thread from user 52 | t = Thread(target=userInput) 53 | t.start() 54 | state = "hello_world" 55 | 56 | # Send "Hello, World! :-)" to the #muirc channel 57 | if state == "hello_world": 58 | bot = pybot.pyrcAI(conn, channel) 59 | bot.handleMessage(message) 60 | #conn.privmsg("#local", "\001ACTION yo\001") 61 | #conn.action("Is waving like a madman....") 62 | 63 | connected = False 64 | -------------------------------------------------------------------------------- /linux/oth/tumxrc: -------------------------------------------------------------------------------- 1 | # Options 2 | set-option -g status-keys vi 3 | set-option -g default-terminal screen-256color 4 | 5 | set-option -g status-left-length 20 6 | set-option -g status-right '%Y/%m/%d %H:%M' 7 | set-option -g visual-bell on 8 | set-option -g history-limit 32768 9 | set-option -g mouse on 10 | set-option -g set-titles on 11 | set-option -g set-titles-string "#W #{session_alerts}" 12 | set-option -g base-index 1 13 | set-option -g renumber-windows on 14 | set-option -g detach-on-destroy off 15 | 16 | set-window-option -g automatic-rename off 17 | set-window-option -g allow-rename on 18 | set-window-option -g mode-keys vi 19 | 20 | set-option -g display-time 3000 21 | 22 | set-option -g escape-time 1 23 | 24 | # update-environment SSH_CLIENT 25 | 26 | # Colors 27 | set-option -g status-bg white 28 | set-window-option -g window-status-current-style "bg=cyan" 29 | 30 | # Keys 31 | ## Prefix key 32 | set-option -g prefix C-z 33 | unbind-key C-b 34 | bind-key C-z send-prefix 35 | 36 | bind-key . source-file $HOME/.tmux.conf 37 | 38 | # Open a new window at the right of current window instead of at the rightest 39 | bind-key c new-window -a 40 | bind-key < swap-window -t - 41 | bind-key > swap-window -t + 42 | bind-key T break-pane 43 | bind-key S command-prompt -p "(new-session)" "new-session -s \"%%%\"" 44 | bind-key L choose-tree -w "link-window -s '%%'" 45 | 46 | bind-key -T copy-mode-vi v send-keys -X begin-selection 47 | bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel 48 | 49 | if-shell '[[ -x ~/.go/bin/lemonade ]]' \ 50 | 'bind-key ] run-shell "~/.go/bin/lemonade paste | tmux load-buffer -" \; paste-buffer ; \ 51 | bind-key -T copy-mode-vi y send -X copy-pipe-and-cancel "~/.go/bin/lemonade copy"' 52 | if-shell '[[ "$(uname)" == "Darwin" ]]' 'source-file ~/.tmux.mac.conf' 53 | 54 | # vim: ft=tmux 55 | -------------------------------------------------------------------------------- /.gitignore_template: -------------------------------------------------------------------------------- 1 | #### MacOS 2 | 3 | # General 4 | .DS_Store 5 | .AppleDouble 6 | .LSOverride 7 | 8 | # Icon must end with two \r 9 | Icon 10 | 11 | # Thumbnails 12 | ._* 13 | 14 | # Files that might appear in the root of a volume 15 | .DocumentRevisions-V100 16 | .fseventsd 17 | .Spotlight-V100 18 | .TemporaryItems 19 | .Trashes 20 | .VolumeIcon.icns 21 | .com.apple.timemachine.donotpresent 22 | 23 | # Directories potentially created on remote AFP share 24 | .AppleDB 25 | .AppleDesktop 26 | Network Trash Folder 27 | Temporary Items 28 | .apdisk 29 | 30 | #### Python 31 | 32 | # Byte-compiled / optimized / DLL files 33 | __pycache__/ 34 | *.py[cod] 35 | *$py.class 36 | 37 | # C extensions 38 | *.so 39 | 40 | *.egg-info/ 41 | .installed.cfg 42 | *.egg 43 | 44 | # PyInstaller 45 | *.manifest 46 | *.spec 47 | 48 | # Installer logs 49 | pip-log.txt 50 | pip-delete-this-directory.txt 51 | 52 | # Unit test / coverage reports 53 | htmlcov/ 54 | 55 | # Translations 56 | *.mo 57 | *.pot 58 | 59 | # Django stuff: 60 | *.log 61 | local_settings.py 62 | db.sqlite3 63 | 64 | # Flask stuff: 65 | instance/ 66 | .webassets-cache 67 | 68 | # Scrapy stuff: 69 | .scrapy 70 | 71 | # Sphinx documentation 72 | docs/_build/ 73 | 74 | # PyBuilder 75 | target/ 76 | 77 | # Jupyter Notebook 78 | .ipynb_checkpoints 79 | 80 | # pyenv 81 | .python-version 82 | 83 | # celery beat schedule file 84 | celerybeat-schedule 85 | 86 | # SageMath parsed files 87 | *.sage.py 88 | 89 | # Environments 90 | .env 91 | .venv 92 | env/ 93 | venv/ 94 | ENV/ 95 | env.bak/ 96 | venv.bak/ 97 | 98 | # Spyder project settings 99 | .spyderproject 100 | .spyproject 101 | 102 | # Rope project settings 103 | .ropeproject 104 | 105 | # mkdocs documentation 106 | /site 107 | 108 | # mypy 109 | .mypy_cache/ 110 | -------------------------------------------------------------------------------- /tmp/mac/playbook/brew_list.c: -------------------------------------------------------------------------------- 1 | /* 2 | ansible 3 | atk 4 | autoconf 5 | automake 6 | bash 7 | bat 8 | berkeley-db 9 | cairo 10 | ccat 11 | circleci 12 | clang-format 13 | cmake 14 | coreutils 15 | cpanminus 16 | ctags 17 | dep 18 | diffutils 19 | dive 20 | ed 21 | figlet 22 | findutils 23 | fish 24 | fontconfig 25 | fontforge 26 | freetype 27 | fribidi 28 | fzf 29 | gawk 30 | gcc 31 | gd 32 | gdb 33 | gdbm 34 | gdk-pixbuf 35 | gettext 36 | giflib 37 | git 38 | glib 39 | gmp 40 | gnu-sed 41 | gnu-tar 42 | gnutls 43 | go 44 | graphite2 45 | graphviz 46 | grep 47 | groff 48 | gsasl 49 | gsettings-desktop-schemas 50 | gtk+3 51 | gts 52 | gzip 53 | hadolint 54 | harfbuzz 55 | heroku 56 | heroku-node 57 | hicolor-icon-theme 58 | htop 59 | httpie 60 | icu4c 61 | isl 62 | jasper 63 | jemalloc 64 | jpeg 65 | jq 66 | lazydocker 67 | lazygit 68 | libarchive 69 | libepoxy 70 | libevent 71 | libffi 72 | libidn2 73 | libinfinity 74 | libmagic 75 | libmpc 76 | libomp 77 | libpng 78 | libspiro 79 | libtasn1 80 | libtermkey 81 | libtiff 82 | libtool 83 | libuninameslist 84 | libunistring 85 | libuv 86 | libvterm 87 | libyaml 88 | llvm 89 | lua 90 | lua@5.1 91 | luajit 92 | luarocks 93 | lzo 94 | mpfr 95 | msgpack 96 | navi 97 | ncurses 98 | neovim 99 | netpbm 100 | nettle 101 | nkf 102 | node 103 | nodebrew 104 | oniguruma 105 | openssl 106 | openssl@1.1 107 | p11-kit 108 | pango 109 | pcre 110 | pcre2 111 | perl 112 | pixman 113 | pkg-config 114 | plantuml 115 | popt 116 | protobuf 117 | python 118 | python@2 119 | rbenv 120 | readline 121 | ricty 122 | ripgrep 123 | rpm 124 | ruby 125 | ruby-build 126 | sqlite 127 | swig 128 | tcl-tk 129 | the_silver_searcher 130 | tmux 131 | tree 132 | trivy 133 | unbound 134 | unibilium 135 | utf8proc 136 | vim 137 | webp 138 | wget 139 | xz 140 | zsh 141 | zstd 142 | */ 143 | -------------------------------------------------------------------------------- /tmp/mac/nvim/.config/nvim/plugins/template/c/c/base-socket-server.c: -------------------------------------------------------------------------------- 1 | #ifdef _WIN32 2 | # include 3 | #else 4 | # include 5 | # include 6 | # include 7 | # include 8 | # include 9 | # include 10 | #define closesocket(fd) close(fd) 11 | #endif 12 | 13 | int 14 | main(int argc, char* argv[]) { 15 | int server_fd; 16 | int client_fd; 17 | int writer_len; 18 | struct sockaddr_in reader_addr; 19 | struct sockaddr_in writer_addr; 20 | 21 | #ifdef _WIN32 22 | WSADATA wsa; 23 | WSAStartup(MAKEWORD(2, 0), &wsa); 24 | #endif 25 | 26 | if ((server_fd = socket(PF_INET, SOCK_STREAM, 0)) < 0) { 27 | perror("reader: socket"); 28 | exit(1); 29 | } 30 | 31 | memset((char *) &reader_addr, 0, sizeof(reader_addr)); 32 | reader_addr.sin_family = PF_INET; 33 | reader_addr.sin_addr.s_addr = htonl(INADDR_ANY); 34 | //reader_addr.sin_port = htons(8000); 35 | reader_addr.sin_port = 0; 36 | 37 | if (bind(server_fd, (struct sockaddr *)&reader_addr, sizeof(reader_addr)) < 0) { 38 | perror("reader: bind"); 39 | exit(1); 40 | } 41 | size_t socklen = sizeof(reader_addr); 42 | if (getsockname(server_fd, (struct sockaddr *)&reader_addr, &socklen) < 0) { 43 | perror("reader: bind"); 44 | exit(1); 45 | } 46 | 47 | if (listen(server_fd, 5) < 0) { 48 | perror("reader: listen"); 49 | close(server_fd); 50 | exit(1); 51 | } 52 | 53 | if ((client_fd = accept(server_fd,(struct sockaddr *)&writer_addr, &writer_len)) < 0) { 54 | perror("reader: accept"); 55 | exit(1); 56 | } 57 | 58 | while (1) { 59 | char buf[256]; 60 | size_t n = recv(client_fd, buf, sizeof(buf), 0); 61 | puts(buf); 62 | if (n == 0) { 63 | break; 64 | } else if (n == -1) { 65 | perror("recv"); 66 | exit(EXIT_FAILURE); 67 | } else { 68 | send(client_fd, buf, n, 0); 69 | } 70 | } 71 | 72 | closesocket(server_fd); 73 | 74 | #ifdef _WIN32 75 | WSACleanup(); 76 | #endif 77 | } 78 | -------------------------------------------------------------------------------- /linux/oth/tmp/linux/vim/dein.toml: -------------------------------------------------------------------------------- 1 | #---------------------------------------------------------- 2 | # Plugin manager 3 | #---------------------------------------------------------- 4 | [[plugins]] 5 | repo = 'Shougo/dein.vim' 6 | 7 | 8 | #---------------------------------------------------------- 9 | # Theme 10 | #---------------------------------------------------------- 11 | [[plugins]] 12 | repo = 'tomasr/molokai' 13 | 14 | 15 | #---------------------------------------------------------- 16 | # Git 17 | #---------------------------------------------------------- 18 | [[plugins]] 19 | repo = 'airblade/vim-gitgutter' 20 | hook_add = ''' 21 | let g:gitgutter_override_sign_column_highlight = 0 22 | highlight GitGutterAdd ctermfg=blue ctermbg=brown 23 | ''' 24 | 25 | [[plugins]] 26 | repo = 'tpope/vim-fugitive' 27 | 28 | [[plugins]] 29 | repo='prabirshrestha/async.vim' 30 | 31 | [[plugins]] 32 | repo='prabirshrestha/vim-lsp' 33 | hook_add=''' 34 | if executable('clangd') 35 | au User lsp_setup call lsp#register_server({ 36 | \ 'name': 'clangd', 37 | \ 'cmd': {server_info->['clangd']}, 38 | \ 'whitelist': ['c', 'cpp', 'objc', 'objcpp'], 39 | \ }) 40 | endif 41 | 42 | let g:lsp_signs_enabled = 1 " enable signs 43 | let g:lsp_diagnostics_echo_cursor = 1 " enable echo under cursor when in normal mode 44 | ''' 45 | 46 | [[plugins]] 47 | repo='prabirshrestha/asyncomplete.vim' 48 | 49 | [[plugins]] 50 | repo='prabirshrestha/asyncomplete-lsp.vim' 51 | 52 | [[plugins]] 53 | repo='prabirshrestha/asyncomplete-neosnippet.vim' 54 | hook_add=''' 55 | call asyncomplete#register_source(asyncomplete#sources#neosnippet#get_source_options({ 56 | \ 'name': 'neosnippet', 57 | \ 'whitelist': ['*'], 58 | \ 'completor': function('asyncomplete#sources#neosnippet#completor'), 59 | \ })) 60 | imap (neosnippet_expand_or_jump) 61 | smap (neosnippet_expand_or_jump) 62 | xmap (neosnippet_expand_target) 63 | ''' 64 | -------------------------------------------------------------------------------- /tmp/windows/teraterm.ini: -------------------------------------------------------------------------------- 1 | [BG] 2 | BGEnable=off 3 | BGUseAlphaBlendAPI=on 4 | BGSPIPath=plugin 5 | BGFastSizeMove=on 6 | BGFlickerlessMove=on 7 | BGNoFrame=on 8 | BGThemeFile=theme\*.ini 9 | 10 | 11 | [Tera Term] 12 | Version=2.3 13 | Language=UTF-8 14 | UILanguageFile=lang\Default.lng 15 | ConnectingTimeout=0 16 | DisablePasteMouseRButton=off 17 | DisablePasteMouseMButton=on 18 | ConfirmPasteMouseRButton=off 19 | ConfirmChangePaste=on 20 | ConfirmChangePasteCR=on 21 | PasteDialogSize=330,220 22 | ConfirmChangePasteStringFile= 23 | ScrollWindowClearScreen=on 24 | AutoScrollOnlyInBottomLine=on 25 | SelectOnlyByLButton=on 26 | AcceleratorNewConnection=on 27 | DisableAcceleratorDuplicateSession=off 28 | AcceleratorCygwinConnection=on 29 | DisableAcceleratorSendBreak=off 30 | DisableMenuNewConnection=off 31 | DisableMenuDuplicateSession=off 32 | DisableMenuSendBreak=off 33 | MouseCursor=ibeam 34 | AlphaBlend=255 35 | CygwinDirectory= 36 | ViewlogEditor=C:\Windows\notepad.exe 37 | ;Locale=chs 38 | Locale=american 39 | CodePage=65001 40 | UseNormalBGColor=on 41 | Port=serial 42 | VTPos=-2147483648,-2147483648 43 | TEKPos=-2147483648,-2147483648 44 | TerminalSize=80,24 45 | TermIsWin=on 46 | AutoWinResize=off 47 | CRReceive=CR 48 | CRSend=CR 49 | TerminalID=VT100 50 | LocalEcho=off 51 | Answerback= 52 | AutoWinSwitch=off 53 | KanjiReceive=UTF-8 54 | KatakanaReceive=8 55 | KanjiSend=UTF-8 56 | KatakanaSend=8 57 | KanjiIn=B 58 | KanjiOut=B 59 | RussHost=Windows 60 | RussClient=Windows 61 | Title=Tera Term 62 | CursorShape=block 63 | HideTitle=off 64 | PopupMenu=off 65 | EnableANSIColor=on 66 | PcBoldColor=on 67 | Aixterm16Color=on 68 | Xterm256Color=on 69 | EnableClickableUrl=on 70 | EnableScrollBuff=on 71 | ScrollBuffSize=10000 72 | VTColor=255,255,255,0,0,0 73 | 74 | ANSIColor=0,0,0,0, 1,255,0,0, 2,0,255,0, 3,255,255,0, 4,128,128,255, 5,255,0,255, 6,0,255,255, 7,255,255,255, 8,64,64,64, 9,192,0,0, 10,0,192,0, 11,192,192,0, 12,64,64,192, 13,192,0,192, 14,0,192,192, 15,192,192,192 75 | EnableContinuedLineCopy=on 76 | -------------------------------------------------------------------------------- /mac/bashrc: -------------------------------------------------------------------------------- 1 | ## Set $PATH, which tells the computer where to search for commands 2 | export PATH="$PATH:/usr/sbin:/sbin:/bin:/usr/bin:/etc:/usr/ucb:/usr/local/bin:/usr/local/local_dfs/bin:/usr/bin/X11:/usr/local/sas" 3 | 4 | ## Where to search for manual pages 5 | export MANPATH="/usr/share/man:/usr/local/man:/usr/local/local_dfs/man" 6 | 7 | ## Which pager to use. 8 | export PAGER=less 9 | 10 | ## Choose your weapon 11 | EDITOR=/usr/bin/vim 12 | #EDITOR=/usr/bin/emacs 13 | #EDITOR=/usr/bin/nano 14 | export EDITOR 15 | 16 | ## The maximum number of lines in your history file 17 | export HISTFILESIZE=50 18 | 19 | ## UVM! 20 | export ORGANIZATION="University of Vermont" 21 | 22 | ## Enables displaying colors in the terminal 23 | export TERM=xterm-color 24 | 25 | # Uncomment the following lines if you are an ARC/INFO user 26 | #alias arc=/usr/local/bin/arc 27 | #alias arcdoc=/usr/local/bin/arcdoc 28 | #alias info=/usr/local/bin/arcinfo 29 | 30 | ## Disable automatic mail checking 31 | unset MAILCHECK 32 | 33 | ## If this is an interactive console, disable messaging 34 | #tty -s && mesg n 35 | 36 | ## Aliases from 'ol EMBA tcsh 37 | #alias bye=logout 38 | #alias h=history 39 | #alias jobs='jobs -l' 40 | #alias lf='ls -algF' 41 | #alias log=logout 42 | #alias cls=clear 43 | #alias edit=$EDITOR 44 | #alias restore=/usr/local/local_dfs/bin/restore 45 | 46 | ## Automatically correct mistyped 'cd' directories 47 | #shopt -s cdspell 48 | 49 | ## Append to history file; do not overwrite 50 | shopt -s histappend 51 | 52 | ## Prevent accidental overwrites when using IO redirection 53 | set -o noclobber 54 | 55 | ## Set the prompt to display the current git branch 56 | ## and use pretty colors 57 | export PS1='$(git branch &>/dev/null; if [ $? -eq 0 ]; then \ 58 | echo "\[\e[1m\]\u@\h\[\e[0m\]: \w [\[\e[34m\]$(git branch | grep ^* | sed s/\*\ //)\[\e[0m\]\ 59 | $(echo `git status` | grep "nothing to commit" > /dev/null 2>&1; if [ "$?" -ne "0" ]; then \ 60 | echo "\[\e[1;31m\]*\[\e[0m\]"; fi)] \$ "; else \ 61 | echo "\[\e[1m\]\u@\h\[\e[0m\]: \w \$ "; fi )' 62 | -------------------------------------------------------------------------------- /mac/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "breadcrumbs.enabled": true, 3 | "editor.minimap.enabled": false, 4 | "editor.renderControlCharacters": true, 5 | "editor.fontLigatures": true, 6 | "editor.fontSize": 13, 7 | "editor.renderLineHighlight": "all", 8 | "editor.cursorBlinking": "smooth", 9 | "editor.cursorStyle": "block", 10 | "editor.bracketPairColorization.enabled": true, 11 | "editor.formatOnSave": true, 12 | "files.autoGuessEncoding": true, 13 | "files.insertFinalNewline": true, 14 | "files.trimTrailingWhitespace": true, 15 | "vim.hlsearch": true, 16 | "vim.ignorecase": true, 17 | "vim.incsearch": true, 18 | "vim.whichwrap": "h,l,<,>,[,]", 19 | "vim.normalModeKeyBindingsNonRecursive": [ 20 | { 21 | "before": [ 22 | "J" 23 | ], 24 | "after": [ 25 | "1", 26 | "0", 27 | "j" 28 | ] 29 | }, 30 | { 31 | "before": [ 32 | "K" 33 | ], 34 | "after": [ 35 | "1", 36 | "0", 37 | "k" 38 | ] 39 | }, 40 | { 41 | "before": [ 42 | "H" 43 | ], 44 | "after": [ 45 | "0" 46 | ] 47 | }, 48 | { 49 | "before": [ 50 | "L" 51 | ], 52 | "after": [ 53 | "$" 54 | ] 55 | }, 56 | { 57 | "before": [ 58 | "" 59 | ], 60 | "after": [ 61 | "g", 62 | "t" 63 | ] 64 | }, 65 | { 66 | "before": [ 67 | "" 68 | ], 69 | "after": [ 70 | "g", 71 | "T" 72 | ] 73 | }, 74 | ], 75 | "vim.leader": "", 76 | "[python]": { 77 | // 拡張機能のBlack Formatterを使う場合には必ず指定する 78 | "editor.defaultFormatter": "ms-python.black-formatter", 79 | // ファイルの保存時にフォーマットを自動実行する場合 80 | "editor.formatOnSave": true 81 | }, 82 | // 最大文字数などのオプション引数を指定する場合 83 | "black-formatter.args": [ 84 | "--line-length=120" 85 | ], 86 | "workbench.editor.enablePreview": false, 87 | "github.copilot.chat.codeGeneration.useInstructionFiles": true 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /tmp/mac/mini/dein.toml: -------------------------------------------------------------------------------- 1 | #---------------------------------------------------------- 2 | # Theme 3 | #---------------------------------------------------------- 4 | [[plugins]] 5 | repo = 'tomasr/molokai' 6 | 7 | [[plugins]] 8 | repo = 'morhetz/gruvbox' 9 | 10 | #---------------------------------------------------------- 11 | # Git 12 | #---------------------------------------------------------- 13 | [[plugins]] 14 | repo = 'airblade/vim-gitgutter' 15 | hook_add = ''' 16 | let g:gitgutter_override_sign_column_highlight = 0 17 | highlight GitGutterAdd ctermfg=blue ctermbg=brown 18 | ''' 19 | 20 | [[plugins]] 21 | repo = 'tpope/vim-fugitive' 22 | 23 | #---------------------------------------------------------- 24 | # NERD 25 | #---------------------------------------------------------- 26 | [[plugins]] 27 | repo = 'scrooloose/nerdtree' 28 | 29 | [[plugins]] 30 | repo = 'jistr/vim-nerdtree-tabs' 31 | 32 | #---------------------------------------------------------- 33 | # fzf 34 | #---------------------------------------------------------- 35 | [[plugins]] 36 | repo = 'junegunn/fzf' 37 | build_on = ''' 38 | ./install -all 39 | ''' 40 | 41 | [[plugins]] 42 | repo = 'junegunn/fzf.vim' 43 | 44 | #---------------------------------------------------------- 45 | # coc 46 | #---------------------------------------------------------- 47 | [[plugins]] 48 | repo = 'neoclide/coc.nvim' 49 | rev = 'release' 50 | on_i = 1 51 | merged = '0' 52 | hook_source = 'call coil398#init#coc#hook_source()' 53 | 54 | #---------------------------------------------------------- 55 | # Editor 56 | #---------------------------------------------------------- 57 | [[plugins]] 58 | repo = 'tpope/vim-surround' 59 | 60 | [[plugins]] 61 | repo = 'tpope/vim-commentary' 62 | 63 | #---------------------------------------------------------- 64 | # Statu Line 65 | #---------------------------------------------------------- 66 | [[plugins]] 67 | repo = 'vim-airline/vim-airline' 68 | 69 | [[plugins]] 70 | repo = 'vim-airline/vim-airline-themes' 71 | hook_add = ''' 72 | let g:airline_theme='ayu_dark' 73 | ''' 74 | -------------------------------------------------------------------------------- /linux/oth/curlrc: -------------------------------------------------------------------------------- 1 | # HTTP-Version 2 | 3 | http1.0 4 | #http1.1 5 | #http2 6 | 7 | 8 | ipv4 9 | #ipv6 10 | 11 | # User-Agentの設定 12 | 13 | ##MS-Edge 14 | #user-agent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36 Edge/16.16299" 15 | ##Chrome 16 | #user-agent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.87 Safari/537.36" 17 | #IE11 18 | #user-agent = "Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko" 19 | #Firefox 20 | user-agent = "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:64.0) Gecko/20100101 Firefox/64.0" 21 | 22 | # Referer (リファラ)の設定 23 | 24 | referer = ";auto" 25 | 26 | 27 | #netrc 28 | #netrc-optional 29 | 30 | 31 | #anyauth 32 | 33 | # !!! remote-time dosn't work with ftp upload from stdin !!! : use -R switch for downloading 34 | 35 | #remote-time 36 | remote-name-all 37 | create-dirs 38 | 39 | # Don't show/download error document - only error code 40 | 41 | #fail 42 | 43 | # Append to target file when uploading (F/SFTP) 44 | 45 | #append 46 | 47 | # Use HTTP Basic Authentication 48 | 49 | #basic 50 | 51 | # Maximum time allowed for connection (seconds) 52 | 53 | connect-timeout = 300 54 | speed-time = 120 55 | speed-limit = 9000000 56 | 57 | # Retry only within this period 58 | 59 | retry = 4 60 | retry-delay = 5 61 | retry-max-time = 10 62 | 63 | # Convert LF to CRLF in upload 64 | 65 | #crlf 66 | 67 | # Make the operation more talkative 68 | 69 | #verbose 70 | #silent 71 | #show-error 72 | 73 | # FTP setup 74 | 75 | ftp-create-dirs 76 | ftp-ssl 77 | ftp-pasv 78 | ftp-method = nocwd 79 | 80 | # Proxy 81 | 82 | #proxy-user = "(ユーザ名):(パスワード)" 83 | #proxy = "http://proxy.xxx.co.jp:(ポート)" 84 | 85 | # SSL 証明書 86 | 87 | cacert = /usr/ssl/certs/ca-bundle.crt 88 | capath = /usr/ssl/certs/ 89 | 90 | #insecure 91 | tlsv1 92 | #tlsv1.0 93 | #tlsv1.1 94 | #tlsv1.2 95 | #sslv2 96 | #sslv3 97 | 98 | # SSL ciphers to use 99 | 100 | #ciphers = PFE 101 | 102 | ## cookie 103 | cookie-jar = /tmp/.curl_cookies 104 | cookie = /tmp/.curl_cookies 105 | -------------------------------------------------------------------------------- /linux/oth/bashrc: -------------------------------------------------------------------------------- 1 | if [ $UID -eq 0 ]; then 2 | PS1="\[\033[36m\]\u@\h\[\033[00m\]:\[\033[01m\]\w\[\033[00m\]\\$ " 3 | else 4 | PS1="\[\033[36m\]\u@\h\[\033[00m\]:\[\033[01m\]\w\[\033[00m\]\\$ " 5 | fi 6 | 7 | 8 | # Normal Colors 9 | Black='\033[0;30m' # Black 10 | Red='\033[0;31m' # Red 11 | Green='\033[0;32m' # Green 12 | Yellow='\033[0;33m' # Yellow 13 | Blue='\033[0;34m' # Blue 14 | Purple='\033[0;35m' # Purple 15 | Cyan='\033[0;36m' # Cyan 16 | White='\033[0;37m' # White 17 | 18 | # Bold 19 | BBlack='\033[1;30m' # Black 20 | BRed='\033[1;31m' # Red 21 | BGreen='\033[1;32m' # Green 22 | BYellow='\033[1;33m' # Yellow 23 | BBlue='\033[1;34m' # Blue 24 | BPurple='\033[1;35m' # Purple 25 | BCyan='\033[1;36m' # Cyan 26 | BWhite='\033[1;37m' # White 27 | 28 | # Background 29 | On_Blac='\033[40m' # Black 30 | On_Red='\033[41m' # Red 31 | On_Green='\033[42m' # Green 32 | On_Yellow='\033[43m' # Yellow 33 | On_Blue='\033[44m' # Blue 34 | On_Purple='\033[45m' # Purple 35 | On_Cyan='\033[46m' # Cyan 36 | On_White='\033[47m' # White 37 | 38 | NC="\033[m" # Color Reset 39 | CR="$(echo -ne '\r')" 40 | LF="$(echo -ne '\n')" 41 | TAB="$(echo -ne '\t')" 42 | ESC="$(echo -ne '\033')" 43 | 44 | alias psg='ps aux | grep' 45 | alias ls='ls --color=auto' 46 | alias ll='ls -hlG --color=auto' 47 | alias la='ls -hlaG --color=auto' 48 | alias sl='ls' 49 | alias c='clear' 50 | alias 644='chmod 644' 51 | alias 755='chmod 755' 52 | alias fo='open .' 53 | alias cp="cp -i" 54 | alias mv="mv -i" 55 | alias du='du -h' 56 | alias job='jobs -l' 57 | alias grep='grep --color=auto' 58 | alias fgrep='fgrep --color=auto' 59 | alias egrep='egrep --color=auto' 60 | 61 | export LANG=en_US.UTF-8 62 | 63 | export LSCOLORS=gxfxcxdxbxegedabagacad 64 | export LESS="-FX -R" 65 | export PAGER=less 66 | export EDITOR=vim 67 | 68 | export RSYNC_RSH=ssh 69 | 70 | export HISTSIZE=50000 71 | export HISTFILESIZE=50000 72 | export HISTTIMEFORMAT="%Y/%m/%d %H:%M:%S: " 73 | 74 | umask 022 75 | ulimit -c 0 76 | 77 | # Comp Dir Only 78 | complete -d cd 79 | 80 | function psgrep() { 81 | ps aux | grep -v grep | grep "USER.*COMMAND" 82 | ps aux | grep -v grep | grep $1 83 | } 84 | -------------------------------------------------------------------------------- /linux/oth/tmp/linux/.bashrc: -------------------------------------------------------------------------------- 1 | if [ $UID -eq 0 ]; then 2 | PS1="\[\033[36m\]\u@\h\[\033[00m\]:\[\033[01m\]\w\[\033[00m\]\\$ " 3 | else 4 | PS1="\[\033[36m\]\u@\h\[\033[00m\]:\[\033[01m\]\w\[\033[00m\]\\$ " 5 | fi 6 | 7 | 8 | # Normal Colors 9 | Black='\033[0;30m' # Black 10 | Red='\033[0;31m' # Red 11 | Green='\033[0;32m' # Green 12 | Yellow='\033[0;33m' # Yellow 13 | Blue='\033[0;34m' # Blue 14 | Purple='\033[0;35m' # Purple 15 | Cyan='\033[0;36m' # Cyan 16 | White='\033[0;37m' # White 17 | 18 | # Bold 19 | BBlack='\033[1;30m' # Black 20 | BRed='\033[1;31m' # Red 21 | BGreen='\033[1;32m' # Green 22 | BYellow='\033[1;33m' # Yellow 23 | BBlue='\033[1;34m' # Blue 24 | BPurple='\033[1;35m' # Purple 25 | BCyan='\033[1;36m' # Cyan 26 | BWhite='\033[1;37m' # White 27 | 28 | # Background 29 | On_Black='\033[40m' # Black 30 | On_Red='\033[41m' # Red 31 | On_Green='\033[42m' # Green 32 | On_Yellow='\033[43m' # Yellow 33 | On_Blue='\033[44m' # Blue 34 | On_Purple='\033[45m' # Purple 35 | On_Cyan='\033[46m' # Cyan 36 | On_White='\033[47m' # White 37 | 38 | NC="\033[m" # Color Reset 39 | CR="$(echo -ne '\r')" 40 | LF="$(echo -ne '\n')" 41 | TAB="$(echo -ne '\t')" 42 | ESC="$(echo -ne '\033')" 43 | 44 | alias psg='ps aux | grep' 45 | alias ls='ls --color=auto' 46 | alias ll='ls -hlG --color=auto' 47 | alias la='ls -hlaG --color=auto' 48 | alias sl='ls' 49 | alias c='clear' 50 | alias 644='chmod 644' 51 | alias 755='chmod 755' 52 | alias fo='open .' 53 | alias cp="cp -i" 54 | alias mv="mv -i" 55 | alias du='du -h' 56 | alias job='jobs -l' 57 | alias grep='grep --color=auto' 58 | alias fgrep='fgrep --color=auto' 59 | alias egrep='egrep --color=auto' 60 | 61 | export LANG=en_US.UTF-8 62 | 63 | export LSCOLORS=gxfxcxdxbxegedabagacad 64 | export LESS="-FX -R" 65 | export PAGER=less 66 | export EDITOR=vim 67 | 68 | export RSYNC_RSH=ssh 69 | 70 | export HISTSIZE=50000 71 | export HISTFILESIZE=50000 72 | export HISTTIMEFORMAT="%Y/%m/%d %H:%M:%S: " 73 | 74 | umask 022 75 | ulimit -c 0 76 | 77 | # Comp Dir Only 78 | complete -d cd 79 | 80 | function psgrep() { 81 | ps aux | grep -v grep | grep "USER.*COMMAND" 82 | ps aux | grep -v grep | grep $1 83 | } 84 | -------------------------------------------------------------------------------- /linux/oth/k8s-master.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # curl -s https://raw.githubusercontent.com/ryuichi1208/dotfiles/master/linux/oth/k8s-master.sh | bash 3 | 4 | readonly K8S_VERSION="1.23.6-00" 5 | readonly POD_CIDR="10.244.0.0/16" 6 | 7 | function init() { 8 | modprobe overlay 9 | modprobe br_netfilter 10 | 11 | cat > /etc/sysctl.d/99-kubernetes-cri.conf < Python section 3 | """""""""""""""""""""""""""""" 4 | let python_highlight_all = 1 5 | au FileType python syn keyword pythonDecorator True None False self 6 | 7 | au BufNewFile,BufRead *.jinja set syntax=htmljinja 8 | au BufNewFile,BufRead *.mako set ft=mako 9 | 10 | au FileType python map F :set foldmethod=indent 11 | 12 | au FileType python inoremap $r return 13 | au FileType python inoremap $i import 14 | au FileType python inoremap $p print 15 | au FileType python inoremap $f # --- a 16 | au FileType python map 1 /class 17 | au FileType python map 2 /def 18 | au FileType python map C ?class 19 | au FileType python map D ?def 20 | 21 | 22 | """""""""""""""""""""""""""""" 23 | " => JavaScript section 24 | """"""""""""""""""""""""""""""" 25 | au FileType javascript call JavaScriptFold() 26 | au FileType javascript setl fen 27 | au FileType javascript setl nocindent 28 | 29 | au FileType javascript imap $log();hi 30 | au FileType javascript imap alert();hi 31 | 32 | au FileType javascript inoremap $r return 33 | au FileType javascript inoremap $f // --- PHFP2xi 34 | 35 | function! JavaScriptFold() 36 | setl foldmethod=syntax 37 | setl foldlevelstart=1 38 | syn region foldBraces start=/{/ end=/}/ transparent fold keepend extend 39 | 40 | function! FoldText() 41 | return substitute(getline(v:foldstart), '{.*', '{...}', '') 42 | endfunction 43 | setl foldtext=FoldText() 44 | endfunction 45 | 46 | 47 | """""""""""""""""""""""""""""" 48 | " => CoffeeScript section 49 | """"""""""""""""""""""""""""""" 50 | function! CoffeeScriptFold() 51 | setl foldmethod=indent 52 | setl foldlevelstart=1 53 | endfunction 54 | au FileType coffee call CoffeeScriptFold() 55 | 56 | au FileType gitcommit call setpos('.', [0, 1, 1, 0]) 57 | 58 | 59 | """""""""""""""""""""""""""""" 60 | " => Shell section 61 | """""""""""""""""""""""""""""" 62 | if exists('$TMUX') 63 | if has('nvim') 64 | set termguicolors 65 | else 66 | set term=screen-256color 67 | endif 68 | endif 69 | 70 | 71 | """""""""""""""""""""""""""""" 72 | " => Twig section 73 | """""""""""""""""""""""""""""" 74 | autocmd BufRead *.twig set syntax=html filetype=html 75 | 76 | 77 | """""""""""""""""""""""""""""" 78 | " => Markdown 79 | """""""""""""""""""""""""""""" 80 | let vim_markdown_folding_disabled = 1 81 | -------------------------------------------------------------------------------- /linux/oth/setup/setup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | yum update -y 4 | yum install -y \ 5 | automake \ 6 | bind-utils \ 7 | bzip2 \ 8 | ctags \ 9 | curl \ 10 | dstat \ 11 | epel-release \ 12 | gcc \ 13 | git \ 14 | htop \ 15 | iftop \ 16 | kernel-devel \ 17 | lua-devel \ 18 | make \ 19 | net-tools \ 20 | openssl-devel \ 21 | pcre-devel \ 22 | readline-devel \ 23 | strace \ 24 | tcpdump \ 25 | telnet \ 26 | vim \ 27 | wget \ 28 | xz-devel \ 29 | yum-utils \ 30 | zlib-devel \ 31 | zsh 32 | 33 | chsh -s $(which zsh) 34 | curl -so ~/.vimrc https://raw.githubusercontent.com/ryuichi1208/dotfiles/master/linux/vimrc 35 | curl -so ~/.zshrc https://raw.githubusercontent.com/ryuichi1208/dotfiles/master/linux/zshrc 36 | 37 | #### fzf #### 38 | wget https://github.com/junegunn/fzf/releases/download/0.27.2/fzf-0.27.2-linux_amd64.tar.gz 39 | tar -xvf fzf-0.27.2-linux_amd64.tar.gz && mv fzf /usr/local/bin/ 40 | 41 | #### ag #### 42 | wget https://github.com/ggreer/the_silver_searcher/archive/refs/tags/2.2.0.tar.gz 43 | tar -xvf 2.2.0.tar.gz && ./the_silver_searcher-2.2.0/build.sh && mv the_silver_searcher-2.2.0/ag /usr/local/bin 44 | 45 | #### nodejs #### 46 | curl -fsSL https://rpm.nodesource.com/setup_16.x | bash - 47 | yum install -y nodejs 48 | 49 | #### rbenv #### 50 | git clone https://github.com/sstephenson/rbenv.git ~/.rbenv 51 | git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build 52 | .rbenv/bin/rbenv install 2.6.8 53 | .rbenv/bin/rbenv global 2.6.8 54 | .rbenv/bin/rbenv rehash 55 | 56 | #### lltsv #### 57 | wget https://github.com/sonots/lltsv/releases/download/v0.7.0/lltsv_linux_amd64 -O lltsv 58 | chmod +x lltsv 59 | mv lltsv /usr/local/bin 60 | 61 | #### firewalld #### 62 | systemctl stop firewalld 63 | systemctl disable firewalld 64 | 65 | #### selinux #### 66 | setenforce 0 67 | sed -i 's/^SELINUX=enforcing$/SELINUX=permissive/' /etc/selinux/config 68 | 69 | #### swap #### 70 | swapoff -a 71 | sed -i '/ swap / s/^/#/' /etc/fstab 72 | 73 | #### containerd #### 74 | cat > /etc/modules-load.d/containerd.conf < /etc/sysctl.d/99-kubernetes-cri.conf <