把 Caps Lock 變成智慧的 Control 以及 Escape :
- 單獨輕按一下就是 Escape 。
- 若按下時同時按著其他鍵,就會是 Control 。
這應該是 Vim 和 Emacs 的最佳解了!(Emacs? Bash 的快捷鍵就是 Emacs 系列的)
- Send Escape if you tap Caps Lock alone.
{ | |
"type": "module", | |
"dependencies": { }, | |
"devDependencies": { | |
"webpack": "^5.87.0", | |
"webpack-bundle-analyzer": "^4.9.0", | |
"webpack-cli": "^4.10.0", | |
"webpack-dev-server": "^4.15.1", | |
}, |
/*! | |
* xhrBinary.js | |
* Author: Jared Abbott | |
* Copyright 2015 Jared Abbott | |
* Distributed under the MIT license | |
*/ | |
var xhrBinary = function(url, fn) { | |
// RESOURCES | |
// http://mgran.blogspot.com/2006/08/downloading-binary-streams-with.html |
// Author: Jared Abbott | |
// Created: December 2015 | |
// License: MIT | |
var template = function(tpl, data) { | |
// Make sure the cache is available | |
var w = window; | |
w.tplCache = !w.tplCache ? {} : w.tplCache; | |
// Prepare and load the template | |
tpl = ('"' + tpl.replace(/\{\{(.*?)\}\}/g, '"+$1+"') + '"').split(/\'+ | + \'/); |
(function(){ | |
var cache = {}; | |
this.tmpl = function tmpl(str, data){ | |
// Figure out if we're getting a template, or if we need to | |
// load the template - and be sure to cache the result. | |
var fn = !/\W/.test(str) ? | |
cache[str] = cache[str] || | |
tmpl(document.getElementById(str).innerHTML) : |
# powershell XOR encoder / decoder and hex / byte - byte / hex conversions | |
# usage: execute & see output | |
# xor encoder / decoder | |
function xor($bytes, $string) { | |
$newBytes = @(); | |
for ($i = 0; $i -lt $bytes.Count; $i++) { | |
$newBytes += $bytes[$i] -bxor $string[$i % $string.Length]; | |
} | |
return $newBytes; |
(function() { | |
var cache = {}; | |
this.tmpl = function tmpl(str, data) { | |
// Figure out if we're getting a template, or if we need to | |
// load the template - and be sure to cache the result. | |
var fn = !/\W/.test(str) ? | |
cache[str] = cache[str] || | |
tmpl(document.getElementById(str).innerHTML) : |
/* | |
This comes directly from John Resig's MicroTemplating, but with {%= %} instead of <%= %> for the dynamic sections. | |
http://ejohn.org/blog/javascript-micro-templating/ | |
This lets you use just natural Javascript, along with whatever JS library you're using, and can be inside of a Rails erb template, or whatever. | |
Used with a template inside the HTML of the page: | |
<script type="text/html" id="user_tmpl"> |
Summary | How to control (or Understand) your GIST page's files list order. |
Notice | not official documentation. |
In most programming languages, most functions are synchronous: a call to the function does all of its business in the same thread of execution. For functions meant to retrieve data, this means the data can be returned by calls to the function.
For an asynchronous function, a call to the function triggers business in some other thread, and that business (usually) does not complete until after the call returns. An asynchronous function that retrieves data via another thread cannot directly return the data to the caller because the data is not necessarily ready by the time the function returns.
In a sense, asynchronous functions are infectious: if a function foo calls an asynchronous function to conclude its business, then foo itself is asynchronous. Once you rely upon an asynchronous function to do your work, you cannot somehow remove the asynchronicity.
When the business initiated by an asynchronous function completes, we may want to run some code in response, so the code run