ChangeLog を書く際によく使われる英語をまとめました。
ほとんど引用です。
#!/usr/bin/env bash | |
# MIT © Sindre Sorhus - sindresorhus.com | |
# git hook to run a command after `git pull` if a specified file was changed | |
# Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`. | |
changed_files="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)" | |
check_run() { | |
echo "$changed_files" | grep --quiet "$1" && eval "$2" |
node.js でパスを取得する方法についてのメモ
$ node ~/hoge/Foo.js/a.js
を実行したときに、
process.argv[1]
から、node コマンドに指定された a.js のパス( ~/hoge/Foo.js/a.js
)を取得できますjavascript:(function(){var d=document.getElementsByClassName("css-18t94o4 css-1dbjc4n r-1niwhzg r-p1n3y5 r-sdzlij r-1phboty r-rs99b7 r-1w2pmg r-1vuscfd r-1dhvaqw r-1ny4l3l r-1fneopy r-o7ynqc r-6416eg r-lrvibr")[0].getAttribute('data-testid').split('-')[0];window.open('https://idtwi.com/'+d);})() |
'.platform-win32 .editor, .platform-linux .editor': | |
'ctrl-shift-L': 'editor:split-selections-into-lines' | |
'ctrl-shift-up': 'editor:add-selection-above' | |
'ctrl-shift-down': 'editor:add-selection-below' |
Since Twitter doesn't have an edit button, it's a suitable host for JavaScript modules.
Source tweet: https://twitter.com/rauchg/status/712799807073419264
const leftPad = await requireFromTwitter('712799807073419264');
sudo apt install ruby ruby-dev | |
sudo gem install travis | |
# install path: /var/lib/gems/ |
// for more info about ReDoS, see: | |
// https://en.wikipedia.org/wiki/ReDoS | |
var r = /([a-z]+)+$/ | |
var s = 'aaaaaaaaaaaaaaaaaaaaaaaaaaaa!' | |
console.log('Running regular expression... please wait') | |
console.time('benchmark') | |
r.test(s) |