Skip to content

Instantly share code, notes, and snippets.

View kashewnuts's full-sized avatar

Kashun YOSHIDA kashewnuts

View GitHub Profile
@kashewnuts
kashewnuts / tox
Created September 6, 2018 17:20
Ubuntu18.04LTSの/usr/share/bash-completion/completions/toxで補完が効かないので修正したcompletionsファイル
# tox completion -*- shell-script -*-
_tox()
{
local cur prev words cword split
_init_completion -s || return
case $prev in
-h|--help|--version|-n|--num|-i|--index-url|--hashseed|--force-dep)
return
@kashewnuts
kashewnuts / filter.md
Created August 2, 2018 14:26
Python2と3のfilterの違い
Python 2.7.15rc1 (default, Apr 15 2018, 21:51:34)
[GCC 7.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> a = [-1, 3, -5, 7, -9]
>>> filter(lambda x: abs(x) > 5, a)
[7, -9]
>>>
@kashewnuts
kashewnuts / .bashrc
Last active June 30, 2022 14:45
peco & ghq でいい感じにした bashrc (関連部分だけ抜粋)
# bash history
export HISTSIZE=10000
export HISTCONTROL=ignoreboth # ignorespace+ignoredups = ignoreboth
export HISTIGNORE="ls:fg*:history*"
# peco
function peco-repo() {
local selected_file=$(ghq list --full-path | peco --query "$LBUFFER")
if [ -n "$selected_file" ]; then
if [ -t 1 ]; then
@kashewnuts
kashewnuts / python-and-pip-command-list.txt
Last active August 9, 2017 15:59
Python & pipコマンド一覧
kashewnuts@kashew-mbp:~$
python
python python2.6-config python3-config python3.5m-config pythonw
python-config python2.7 python3.5 python3.6 pythonw2
python2 python2.7-config python3.5-32 python3.6-config pythonw2.6
python2-config python3 python3.5-config python3.6m pythonw2.7
python2.6 python3-32 python3.5m python3.6m-config
kashewnuts@kashew-mbp:~$
python -V
Python 2.7.10
@kashewnuts
kashewnuts / github-flow.ja.md
Created June 5, 2017 14:28 — forked from Gab-km/github-flow.ja.md
GitHub Flow (Japanese translation)

GitHub Flow

31 Aug 2011

git-flowの問題点 (Issues with git-flow)

私は人々にGitを教えるためにあちこちを飛び回っているが、最近のほぼすべてのクラスやワークショップで git-flow についてどう思うかを尋ねられた。私はいつも、git-flowは素晴らしいと思うと答えている。何百万ものワークフローを持ったシステム(Git)を提供し、ドキュメントもあるし、よくテストされている。フレキシブルなワークフローは、実に容易なやり方で多くの開発者の役に立つ。標準的なものになりつつあり、開発者はプロジェクトや企業の間を移動しつつこの標準的なワークフローに馴染むことができる。

@kashewnuts
kashewnuts / 2017-05-09-githubからはじまるssh入門.md
Last active January 4, 2018 11:40
GitHubからはじまるSSH入門.md

GitHubからはじまるSSH入門

GitHub使ってますよね!

一度使い始めると当たり前に使っているのですが、毎回調べてしまうことがSSHの使い方。 コマンドの流れはGitHubの方を参照すればわかるのですが、それぞれの意味やそれに伴いできるファイルが何なのか一度整理してみました。

SSH

  • SecureShellの略。Secureな通信を行うためのプロトコル。
@kashewnuts
kashewnuts / clink_git.lua
Last active January 17, 2017 03:09 — forked from sweiss3/git_checkout.lua
A clink script for supporting tab-completion of git branches when using "git checkout", and showing branch name.

Climbing History

クライミングの記録です。

略歴

RP OS/FL
外岩 三段 初段
ジム 三段 二段
@kashewnuts
kashewnuts / gista-file
Created October 26, 2016 06:48
denite.nvim&memolist.vim error
[denite] Traceback (most recent call last):
[denite] File "C:\Users\kashew_nuts\.cache\dein\repos\github.com\Shougo\denite.nvim/rplugin/python3\denite\ui\default.py", line 61, in start
[denite] self.__denite.gather_candidates(self.__context)
[denite] File "C:\Users\kashew_nuts\.cache\dein\repos\github.com\Shougo\denite.nvim/rplugin/python3\denite\denite.py", line 41, in gather_candidates
[denite] candidates = source.gather_candidates(source.context)
[denite] File "C:/Users/kashew_nuts/.cache/dein/repos/github.com/Shougo/denite.nvim/rplugin/python3/denite/source\file_rec.py", line 61, in gather_candidates
[denite] self.__proc = Process(command, context, directory)
[denite] File "C:\Users\kashew_nuts\.cache\dein\repos\github.com\Shougo\denite.nvim/rplugin/python3\denite\process.py", line 25, in __init__
[denite] cwd=cwd)
[denite] File "C:\Python\35\Lib\subprocess.py", line 947, in __init__
@kashewnuts
kashewnuts / csv_split.py
Last active September 6, 2016 09:18
csv_split.py
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import csv
import sys
import time
'''
CSV形式のファイルでISBN13の末尾に応じてファイル作成
'''