Skip to content

Instantly share code, notes, and snippets.

View techmagus's full-sized avatar
💭
🇵🇭

Yohan Yuki Xieㆍ사요한・謝雪矢 techmagus

💭
🇵🇭
View GitHub Profile
@revelt
revelt / Hugo — Replace dashes on taxonomy terms
Created June 19, 2016 06:04
When your Hugo taxonomy term consists of multiple words, it will be shown with dashes. Here's how to restore spaces.
<a href="/categories/{{ $name | urlize }}">{{ replace $name "-" " " }}</a>
@d1manson
d1manson / BlobWorker.js
Last active June 27, 2018 11:28
Using an HTML5 Blob, you can get around the same-origin security restriction for Web Workers. The only slight complication is the need to return a Worker-like interface synchrounously. But this is actually fairly simple. Requires jQuery $ for ajax call. IE doesn't permit making workers from blob-urls, but other browsers do.
Worker = (function(){
var nativeWorker = Worker;
var BlobWorker = function(){
this.queuedCallList = [];
this.trueWorker = null;
this.onmessage = null;
}
BlobWorker.prototype.postMessage = function(){
if(this.trueWorker)
@techmagus
techmagus / keybase.md
Last active June 3, 2017 07:54
Keybase verification

Keybase proof

I hereby claim:

  • I am techmagus on github.
  • I am yukino (https://keybase.io/yukino) on keybase.
  • I have a public key whose fingerprint is CDB7 5E8E 8397 0FE2 8887 A05A DF3B 8EBF D250 A680

To claim this, I am signing this object: