Skip to content

Instantly share code, notes, and snippets.


Eduard Urbach akyoto

  • Korea / Japan
View GitHub Profile
akyoto / cpu-registers.txt
Last active Oct 16, 2019
View cpu-registers.txt
Register sizes
================ rax (64 bits)
======== eax (32 bits)
==== ax (16 bits)
== ah (8 bits)
== al (8 bits)
Register purpose
akyoto /
Last active May 28, 2019
Run wasm locally in Go
GOOS=js GOARCH=wasm go run -exec="$(go env GOROOT)/misc/wasm/go_js_wasm_exec" .
akyoto /
Created May 17, 2019
Terminal Truecolor (RGB 24-bit)
printf "\x1b[38;2;255;128;0mTRUECOLOR\x1b[0m\n"
akyoto /
Created Apr 22, 2019
Add go.mod to existing project
export TAG=v0.1.0 go mod init && gb -v && go mod tidy && git add . && git commit -m "Added Go module definition" && git push && git tag $TAG && git push origin $TAG
akyoto /
Created Apr 6, 2019
Update all docker images
docker images --format "{{.Repository}}:{{.Tag}}" | grep :latest | xargs -L1 docker pull
akyoto /
Last active Jun 30, 2018 | Task for new contributors | Make your own page and menu item in the sidebar!

Task for new contributors

This task assumes that you have installed already, started the server with the run tool and have the code open in Visual Studio Code.

Step 1: Create a new page

Let's call it foobar. Create a new directory under pages, called foobar. Then create the following files inside it:

  • foobar.go (controller)
akyoto / Diff.ts
Last active Jun 5, 2018
Diff and MutationQueue 🍰🥞
View Diff.ts
import MutationQueue from "./MutationQueue"
// Diff provides diffing utilities to morph existing DOM elements
// into the target HTML string.
// Example:
// Diff.innerHTML(body, "<div>This is my new content</div>")
// Whatever contents will be in the body, they will be re-used and morphed
// into the new DOM defined by a simple HTML string. This is useful for
akyoto /
Last active May 17, 2018
Optimize Linux for SSDs
  1. Activate noatime in /etc/fstab
  2. Set vm.swappiness from 60 to 1 in /etc/sysctl.conf
akyoto /
Last active Mar 5, 2018
HTTP/2 Push async flows


See Start your pushes before you respond.

Indeed we can fix the problem by pushing before the HTML is sent, however that increases TTFB by a lot and creates a completely new set of performance problems. Therefore we're pushing resources after sending the HTML. When we do that, there are 2 possible async flows that can occur.

Flow under normal network conditions:

  1. Server sends HTML.
akyoto / time-pack.txt
Created Oct 22, 2017 assets compile time
View time-pack.txt
~/workspace/src/ λ time pack
❀ mixins/Input.pixy
❀ mixins/Character.pixy
❀ mixins/FuzzySearch.pixy
❀ mixins/Icon.pixy
❀ mixins/ForumTags.pixy
❀ mixins/Avatar.pixy
❀ mixins/AnimeGrid.pixy
❀ mixins/Japanese.pixy
❀ layout/layout.pixy