Skip to content

Instantly share code, notes, and snippets.

echo 192.168.3.{1..254} | xargs -P256 -n1 ping -s1 -c1 -W1 | grep ttl
help
prefix+?
起動
% tmux
or
% tmux new-session
セッションの確認
% tmux ls
@ahy4
ahy4 / vscode.json
Last active November 8, 2017 15:45
{
"editor.fontFamily": "'CamingoCode', 'Ricty Diminished'",
"editor.fontSize": 14,
"editor.tabSize": 2,
"editor.formatOnType": true,
"editor.cursorBlinking": "smooth",
"editor.renderWhitespace": "boundary",
"editor.renderControlCharacters": true,
"editor.renderIndentGuides": true,
"editor.renderLineHighlight": "all",
javascript:$("img.avatar").attr("src", "https://pbs.twimg.com/profile_images/903950953459490816/1_wK5kUp_400x400.jpg")
$ ps auxf
ruby -run -e httpd . -p 8000
curl wttr.in/kawagoe
((abs .) . (+)) (-3) 2
@ahy4
ahy4 / mastodon-client.md
Created April 19, 2017 02:45 — forked from okapies/mastodon-client.md
Mastodon API の叩き方

Mastodon の API を叩くには以下の手順を踏む必要がある:

  1. OAuth2 クライアントを登録する
  2. アクセストークンを取得する
  3. アクセストークンを Authorization ヘッダに指定して API にアクセスする

OAuth2 クライアント登録

Mastodon の Apps API に登録情報を送ってクライアントを払い出してもらう(一度だけやれば OK).

// bool*2-1
let ary = [1,2,3];
ary.sort((a, b) => (a>b)*2-1); // 小さい順
console.log(ary);
ary.sort((a, b) => a-b); // 小さい順
console.log(ary);