typeof foo !== 'undefined'
上記以外.
[上記以外が有用でない理由]
typeofの戻り値は仕様で定義されていないものを返します。よって、実装によって別の結果になる事がある
Cmd-Z -> Undo, Cmd-Shift-Z -> Redo in zsh. | |
1. bindkey in zsh | |
2. remap in keyremap4macbook |
tmp
#!/usr/bin/env ruby | |
# Usage | |
# $ htpasswd.rb 'your_usrename', 'your_password' | |
# UseCase | |
# Generate htpasswd for nginx without apache tools. | |
require "base64" | |
username, password = ARGV | |
salt = Base64.encode64((("a".."z").to_a + ("A".."Z").to_a + (0..9).to_a).shuffle[0..7].join) | |
puts "#{username}:#{password.crypt(salt)}" |
cat notebook.ipynb | jq -r '.cells[] | select(.cell_type == "code") | select(.source != "") | .source + "\n"' | sed -e 's/\( *\)%.* /\1/' |
install:
$ go get github.com/google/codesearch/cmd/...
generate indexes:
$ cindex /usr/include /usr/local/include $HOME/_go/src $HOME/_dev
多分 `` に fill
や `style="fill:` の指定が動かない
$ sudo defaults write com.apple.loginwindow LoginHook /path/to/script |
select timestamp 'epoch' + CAST(ts AS BIGINT)/1000 * interval '1 second' from (select 1498783941705 AS ts); |
{ | |
"libs": [ | |
"browser" | |
], | |
"plugins": { | |
"node": {}, | |
"es_modules": {}, | |
"node_resolve": {} | |
} | |
} |