Skip to content

Instantly share code, notes, and snippets.

@kanziw
kanziw / gcrgc.sh
Created Feb 10, 2020 — forked from ahmetb/gcrgc.sh
Script to clean up Google Container Registry images pushed before a particular date
View gcrgc.sh
#!/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
@kanziw
kanziw / python-es6-comparison.md
Created Jan 2, 2019 — forked from revolunet/python-es6-comparison.md
# Python VS ES6 syntax comparison
View python-es6-comparison.md

Python VS ES6 syntax comparison

Python syntax here : 2.7 - online REPL

Javascript ES6 via Babel transpilation - online REPL

Imports

import math
@kanziw
kanziw / range.js
Created Dec 27, 2018
Idea of range in js
View range.js
function* rangeG(length) {
let cnt = -1
while (cnt < length - 1) yield ++cnt
}
function range(length) {
return [...rangeG(length)]
}
console.log(range(0)) // []
View keybase.md

Keybase proof

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:

@kanziw
kanziw / server-to-server-request-sample.js
Created Sep 1, 2017
server-to-server-request-sample
View server-to-server-request-sample.js
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}
@kanziw
kanziw / kr_won_to_backquote.sh
Created Jun 5, 2017 — forked from redism/kr_won_to_backquote.sh
macOS Sierra에서 원화(₩) 대신 백 쿼트(`) 입력하기
View kr_won_to_backquote.sh
#!/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:", "\`");