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 | |
# Copyright © 2017 Google Inc. | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software |
Python syntax here : 2.7 - online REPL
Javascript ES6 via Babel transpilation - online REPL
import math
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
function* rangeG(length) { | |
let cnt = -1 | |
while (cnt < length - 1) yield ++cnt | |
} | |
function range(length) { | |
return [...rangeG(length)] | |
} | |
console.log(range(0)) // [] |
I hereby claim:
- I am kanziw on github.
- I am kanziw (https://keybase.io/kanziw) on keybase.
- I have a public key ASDLRyCeu6FzCMXXYJtjL2eWRCM3ALQKvZLzHUyk8Y-eugo
To claim this, I am signing this object:
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
import request from 'request' | |
const requester = request.defaults({ | |
headers: { 'Content-Type': 'application/json, charset=utf8', 'Api-Token': 'sample-api-token' }, | |
baseUrl: 'https://sample.kanziw.github.io/v3', | |
json: true, | |
}) | |
/** | |
* @param options {object} |
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 | |
if [ -f ~/Library/KeyBindings/DefaultkeyBinding.dict ]; then | |
echo "~/Library/KeyBindings/DefaultkeyBinding.dict already exists" | |
exit -1 | |
fi | |
mkdir -p ~/Library/KeyBindings | |
cat << EOF > ~/Library/KeyBindings/DefaultkeyBinding.dict | |
{ | |
"₩" = ("insertText:", "\`"); |