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
akyoto / run.sh
Last active May 28, 2019
Run wasm locally in Go
View run.sh
GOOS=js GOARCH=wasm go run -exec="$(go env GOROOT)/misc/wasm/go_js_wasm_exec" .
@akyoto
akyoto / terminal-truecolor.sh
Created May 17, 2019
Terminal Truecolor (RGB 24-bit)
View terminal-truecolor.sh
printf "\x1b[38;2;255;128;0mTRUECOLOR\x1b[0m\n"
@akyoto
akyoto / add-go-mod.sh
Created Apr 22, 2019
Add go.mod to existing project
View add-go-mod.sh
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
akyoto / update-docker-images.sh
Created Apr 6, 2019
Update all docker images
View update-docker-images.sh
docker images --format "{{.Repository}}:{{.Tag}}" | grep :latest | xargs -L1 docker pull
@akyoto
akyoto / task.md
Last active Jun 30, 2018
notify.moe | Task for new contributors | Make your own page and menu item in the sidebar!
View task.md

Task for new contributors

This task assumes that you have installed notify.moe 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
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
akyoto / optimize-ssd.md
Last active May 17, 2018
Optimize Linux for SSDs
View optimize-ssd.md
  1. Activate noatime in /etc/fstab
  2. Set vm.swappiness from 60 to 1 in /etc/sysctl.conf
@akyoto
akyoto / http2-push-async-flows.md
Last active Mar 5, 2018
HTTP/2 Push async flows
View http2-push-async-flows.md

Problem

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
akyoto / time-pack.txt
Created Oct 22, 2017
notify.moe assets compile time
View time-pack.txt
~/workspace/src/github.com/animenotifier/notify.moe λ 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
akyoto / gnome-more-than-4-workspace-shortcuts.sh
Created Jul 5, 2017
Gnome Numpad Shortcuts for 9 Workspaces
View gnome-more-than-4-workspace-shortcuts.sh
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.