Skip to content

Instantly share code, notes, and snippets.

Making people happy

Eduard Urbach akyoto

Making people happy
Block or report user

Report or block akyoto

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
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
akyoto /
Created Jul 5, 2017
Gnome Numpad Shortcuts for 9 Workspaces
dconf write /org/gnome/desktop/wm/keybindings/switch-to-workspace-1 "['KP_7']"
dconf write /org/gnome/desktop/wm/keybindings/switch-to-workspace-2 "['KP_8']"
dconf write /org/gnome/desktop/wm/keybindings/switch-to-workspace-3 "['KP_9']"
dconf write /org/gnome/desktop/wm/keybindings/switch-to-workspace-4 "['KP_4']"
dconf write /org/gnome/desktop/wm/keybindings/switch-to-workspace-5 "['KP_5']"
dconf write /org/gnome/desktop/wm/keybindings/switch-to-workspace-6 "['KP_6']"
dconf write /org/gnome/desktop/wm/keybindings/switch-to-workspace-7 "['KP_1']"
dconf write /org/gnome/desktop/wm/keybindings/switch-to-workspace-8 "['KP_2']"
dconf write /org/gnome/desktop/wm/keybindings/switch-to-workspace-9 "['KP_3']"
You can’t perform that action at this time.