create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "[email protected]"
| git rev-list --all | ( | |
| while read revision; do | |
| git grep -F 'phrase' $revision | |
| done | |
| ) |
| // Phaser.Scene context | |
| const keys = new Set(); | |
| this.input.keyboard.on('keydown', (event) => { | |
| if (keys.has(event.code)) { | |
| return | |
| } | |
| keys.add(event.code); |
| import { makeRequestWhile } from './make-request-while' | |
| const MOCKED_API = { | |
| PENDING: 'https://www.mocky.io/v2/5d4db060330000254b33796a', | |
| SUCCESS: 'https://www.mocky.io/v2/5d4db057330000d43f337969', | |
| ERROR: 'https://www.mocky.io/v2/5d4db0463300004b44337968', | |
| } | |
| const STATUSES = { | |
| PENDING: 1, |
| echo off | |
| for %%a in ("./source/*.mp4") do ffmpeg -i "%%a" -b:a 320K -vn "./output/%%a.mp3" | |
| pause |
| // fade out | |
| function fade(el) { | |
| var op = 1; | |
| var timer = setInterval(function () { | |
| if (op <= 0.1){ | |
| clearInterval(timer); | |
| el.style.display = 'none'; | |
| } | |
| el.style.opacity = op; |
| class AnimationLoop { | |
| constructor(fps = 24) { | |
| this.updateFn = null; | |
| this.id = 0; | |
| this.setFps(fps); | |
| } | |
| onUpdate(fn) { | |
| this.updateFn = fn; | |
| } |
create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "[email protected]"
| function addDelayedEventListener($el, eventName, action) { | |
| const listener = async function (event) { | |
| $el.removeEventListener(eventName, listener); | |
| $el.disabled = true; | |
| await action.call(action, event); | |
| $el.disabled = false; | |
| addDelayedEventListener($el, eventName, action); | |
| }; |
| # Random 4-letter word from the dictionary | |
| $ shuf -n4 /usr/share/dict/words | tr -d '\n' |
| // https://jsfiddle.net/koldev/cW7W5/ | |
| var saveData = (function () { | |
| var a = document.createElement("a"); | |
| document.body.appendChild(a); | |
| a.style = "display: none"; | |
| return function (data, fileName) { | |
| var json = JSON.stringify(data), | |
| blob = new Blob([json], {type: "octet/stream"}), | |
| url = window.URL.createObjectURL(blob); | |
| a.href = url; |