Skip to content

Instantly share code, notes, and snippets.

View foomin10's full-sized avatar

foomin10

  • Japan
View GitHub Profile
@foomin10
foomin10 / _shellcheck.md
Last active May 4, 2024 02:25 — forked from eggplants/_shellcheck.csv
Enumerated shellcheck codes https://github.com/koalaman/shellcheck/wiki/Checks (Update: 05-21-2021)
  • SC1000 $ is not used specially and should therefore be escaped.
  • SC1001 This \o will be a regular 'o' in this context.
  • SC1003 Want to escape a single quote? echo 'This is how it'\''s done'.
  • SC1004 This backslash+linefeed is literal. Break outside single quotes if you just want to break the line.
  • SC1007 Remove space after = if trying to assign a value (or for empty string, use var='' ... ).
  • SC1008 This shebang was unrecognized. ShellCheck only supports sh/bash/dash/ksh. Add a 'shell' directive to specify.
  • SC1009 The mentioned parser error was in ...
  • SC1010 Use s
#! /bin/env bash
set -eu -o pipefail
twitter_pic() {
src=/storage/emulated/0/Android/data/com.twitter.android/cache/image_cache/v2.ols100.1
#echo >&2 "src: $src"
cd -- "$src" || _error
export -f _find1
find . -depth -mindepth 1 -maxdepth 2 -name "*.cnt" -type f -size -11k -delete
#! /bin/env bash
set -eu -o pipefail
be_present_command() {
local cmd="${1:?}"
if ! type -a "$cmd" &>/dev/null; then
echo >&2 "No command $cmd found"
fi
}
@foomin10
foomin10 / 0. _gTLD-list.md
Last active June 26, 2020 07:52
gTLD-list

1. 従来からあるgTLD

com	商業組織用	世界の誰でも登録可	第2レベルに登録
net	ネットワーク用	世界の誰でも登録可	第2レベルに登録
org	非営利組織用	世界の誰でも登録可	第2レベルに登録
edu	教育機関用	米国教育省公認の認定機関から認可された教育機関	第2レベルに登録
gov	米国政府機関用	米国政府機関および認定インディアン部族	第2レベルに登録(認定インディアン部族は「***-nsn.gov」という形で登録)
mil	米国軍事機関用	米国軍事機関	第2レベルに登録
int	国際機関用	国際機関	第2レベルに登録
@foomin10
foomin10 / file0.sh
Last active October 24, 2018 03:31
[git] fsck と cat-file で なくしたファイルを探す ref: https://qiita.com/foom/items/b5dbbd506d90fcacaad5
# dangling なファイルのオブジェクト ID (SHA1 ハッシュ) を出力
git fsck --no-progress |grep blob |sed -Ee 's/.* blob //' >.git/dangling.txt
# 一つずつ less に出力される
cat .git/dangling.txt |while read LINE || [ -n "$LINE" ]; do { echo -e "$LINE\n"; git cat-file -p $LINE; } |less; done
@foomin10
foomin10 / ISO639-1.txt
Last active December 23, 2017 00:25 — forked from koseki/ISO639-1.txt
ISO 639-1 Code => English Name text list / http://www.loc.gov/standards/iso639-2/ascii_8bits.html
aa Afar
ab Abkhazian
af Afrikaans
ak Akan
sq Albanian
am Amharic
ar Arabic
an Aragonese
hy Armenian
as Assamese
@foomin10
foomin10 / seiyuu_jisyo.tsv.txt
Last active May 22, 2018 16:24
声優名の辞書ファイル。<http://tomoch.s28.xrea.com/ime.cgi> からコピーして自分の知ってる人だけ大雑把に抽出。
あいさかゆうか 相坂優歌 人名
あいざわまい 相沢舞 人名
あいみ 愛美 人名
あおいしょうた 蒼井翔太 人名
あおきさやか あおきさやか 人名
あおきるりこ 青木瑠璃子 人名
あおばりんご 青葉りんご 人名
あかさきちなつ 赤﨑千夏 人名
あかねやひみか 茜屋日海夏 人名
あかばねけんじ 赤羽根健治 人名
@foomin10
foomin10 / Contract_attr_accessor.md
Last active November 17, 2015 20:25
Contract_attr_accessor
@foomin10
foomin10 / 歌詞検索.js
Created October 11, 2015 12:57
歌詞検索
javascript:(function(t){t=''+getSelection();t=t||prompt('serch lyrics:');t&&open('https://www.google.co.jp/#num=10&safe=off&q='+encodeURIComponent(t)+'+site:www.kasi-time.com+OR+site:j-lyric.net+OR+site:www.kget.jp')}())