marp |
---|
true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
color = { | |
0: 'black', | |
1: 'white', | |
2: 'yellow', | |
3: 'lightgreen', | |
4: 'pink', | |
5: 'blue', | |
6: 'red', | |
7: 'lightgreen', | |
8: 'black', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cat ~/.bash_history | \ | |
tr -d '\r' | \ | |
perl -pe ' | |
chomp; | |
s/\\/\\\\/g; | |
s/"/\\"/g; | |
$_ = qq({\n "length": ) . length($_) . qq(,\n "command": ") . $_ . qq("\n}, ); | |
' | \ | |
perl -pe 's/, $//' | \ | |
awk ' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
which $( | |
for i in {a..z}; do | |
echo $i | |
for j in {a..z}; do | |
echo $i$j | |
for k in {a..z}; do | |
echo $i$j$k | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
COMMAND="$1" | |
BEFORE_STR="$2" | |
AFTER_STR="$3" | |
prt "$COMMAND" "$BEFORE_STR" "$AFTER_STR" $(git grep --name-only "$BEFORE_STR") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const allHais = [ | |
'一萬', '二萬', '三萬', '四萬', '五萬', '六萬', '七萬', '八萬', '九萬', | |
'一筒', '二筒', '三筒', '四筒', '五筒', '六筒', '七筒', '八筒', '九筒', | |
'一索', '二索', '三索', '四索', '五索', '六索', '七索', '八索', '九索', | |
'東 ', '南 ', '西 ', '北 ', '白 ', '発 ', '中 ', | |
] as const; | |
type HaiName = typeof allHais[number]; | |
type HaiNameArray = HaiName[]; | |
type HaiNameSetForShow = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
document.styleSheets[0].insertRule('.blob-code-marker:before { border-right: black 1px dotted; }'); | |
linedata = {}; | |
[ | |
...Array.from(document.querySelectorAll('.blob-code-addition')), | |
...Array.from(document.querySelectorAll('.blob-code-context')) | |
].forEach(line => { | |
lineNumber = line.parentNode.querySelector('.blob-num').getAttribute('data-line-number'); | |
marker = line.querySelector('.blob-code-marker'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## ghq look on ghq list | |
function glk() { | |
ARG_STR="$1" | |
PECO_RESULT=$(ghq list | peco --query "$ARG_STR") | |
PECO_RESULT=$(echo -n "${PECO_RESULT}" | tr -d '\n' | perl -pe 's/(^ | $)//g') | |
if [ ! -n "$PECO_RESULT" ]; then | |
return 1 | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cat src/* \ | |
| perl -pe 's/[^a-zA-Z]/ /g' \ | |
| perl -pe 's/([a-z])([A-Z])/$1 $2/g' \ | |
| perl -pe 's/([A-Z])([A-Z][a-z])/$1 $2/g' \ | |
| perl -pe 's/ +/\n/g' \ | |
| perl -pe '$_ = lc' \ | |
| sort \ | |
| uniq > words.txt | |
cat src/* \ | |
| perl -pe 's/[^a-zA-Z]/ /g' \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// this is unsupported | |
// added from https://github.com/hogashi/twitterOpenOriginalImage/blob/master/tooi-forGreaseTamperMonkey.user.js | |
var collectUrlParams = function (rawUrl) { | |
if (!/https:\/\/pbs\.twimg\.com\/media/.test(rawUrl)) { | |
return null; | |
} | |
var url = new URL(rawUrl); | |
var searchSet = { | |
format: 'jpg', |