Skip to content

Instantly share code, notes, and snippets.

View hdemon's full-sized avatar

Masami Yonehara hdemon

  • LINE
  • Fukuoka, Japan
  • 11:13 (UTC +09:00)
View GitHub Profile
// File Inclusion
exclude
extends
files
include
references
typeAcquisition
# Rename files recursively
find . -name "*.jsx" -type f | xargs rename "s/hoge/fuga/g"
# Rename files
for f in *; do mv "$f" "${f/%./}"; done
# Retrieve only file name (eliminate paths)
find . -name "*.png" -type f | awk -F/ '{print $NF}'
# プロンプトを出さずにキーを生成
{
"errors": [],
"tokens": [],
"type": "Program",
"loc": {
"source": "tests/dev/ur.js",
"start": {
"line": 4,
"column": 0
},
## sfi
SharedFunctionInfo
## smi
Small Integer
## Map
var obj1 = {
x: 1,
};
var obj2 = {};
obj2.x = 1;
// d8 map.js --allow-natives-syntax
print(%HaveSameMap(obj1, obj2)); // false
@hdemon
hdemon / shell-script.md
Created December 8, 2016 07:14
シェルスクリプト芸

カレントディレクトリ取得

CURRENT=$(cd $(dirname $0) && pwd)
@hdemon
hdemon / onion_soup.md
Last active June 4, 2016 15:58
オニオンスープ
  • 水1500mlに対し、たまねぎ小2個
  • 味の素チキンコンソメx3
  • ローリエ1枚
  • たまねぎの水分をちゃんと飛ばさないとまずい -> レンジでチンする
  • バターを使うのをやめてみる。あじつけは塩コショウで
@hdemon
hdemon / case.md
Last active February 17, 2016 02:44
git hands on

git pushしたけどpushできてないっぽいパターン

upstreamが指定されていない

$ git push

fatal: The current branch hoge has no upstream branch.
To push the current branch and set the remote as upstream, use
* 牛乳
* 上白糖
* 上白糖を入れる入れ物とスプーン
* 鷹の爪
* あさり
* 白ワイン
* パスタ
* 髪染め
* ジャム用容器
* めんたいこ
* クラッカー
* マーマレードジャム
*