Skip to content

Instantly share code, notes, and snippets.

View akyoto's full-sized avatar

Eduard Urbach akyoto

View GitHub Profile
@nisovin
nisovin / Godot Web Server Configs.md
Last active September 8, 2024 04:27
Godot Web Server Configs

Godot Web Server Configs

For Godot 4 and the threads export in Godot 3, you need to set special headers on your web server in order to enable SharedArrayBuffer. There are some examples here for various web servers.

Python

The script below can be used to start a web server that sets the required headers. The easiest way to use this is to place this python script in your export folder and double click it to start the server. Then you can view your game at http://localhost:8000.

@probonopd
probonopd / Wayland.md
Last active April 16, 2025 20:29
Think twice about Wayland. It breaks everything!

Think twice before abandoning Xorg. Wayland breaks everything!

Hence, if you are interested in existing applications to "just work" without the need for adjustments, then you may be better off avoiding Wayland.

Wayland solves no issues I have but breaks almost everything I need. Even the most basic, most simple things (like xkill) - in this case with no obvious replacement. And usually it stays broken, because the Wayland folks mostly seem to care about Automotive, Gnome, maybe KDE - and alienating everyone else (e.g., people using just an X11 window manager or something like GNUstep) in the process.


As 2024 is winding down:

@slok
slok / pprof.md
Last active March 29, 2025 10:36
Go pprof cheat sheet

Enable profiling

Default http server

import (
    _ "net/http/pprof"
    "net/http"
)
@sakshatshinde
sakshatshinde / [GUIDE] linux-zen Arch Linux systemd-boot.md
Last active February 2, 2025 01:21
A guide to install linux-zen kernel on Arch Linux for systemd-boot

A simple guide to install linux-zen (The "Zen" kernel) on Arch Linux for Systemd-boot

Firstly run the following command with the appropriate privilege:

sudo pacman -S linux-zen linux-zen-headers

When asked for confirmation, type 'y', press ENTER

Now the kernel is installed on your system. We need to tell systemd-boot to boot with the newly kernel installed.

@CAFxX
CAFxX / golang_minimize_allocations.md
Last active March 9, 2025 14:32
Minimize allocations in Go

📂 Minimize allocations in Go

A collection of tips for when you need to minimize the number of allocations in your Go programs.

Use the go profiler to identify which parts of your program are responsible for most allocations.

⚠️ Never apply these tricks blindly (i.e. without measuring the actual performance benefit/impact). ⚠️

Most of these tricks cause a tradeoff between reducing memory allocations and other aspects (including e.g. higher peak memory usage, higher CPU usage, lower maintainability, higher probability of introducing subtle bugs). Only apply these tricks if the tradeoff in every specfic case is globally positive.

@fnky
fnky / ANSI.md
Last active April 21, 2025 18:34
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@asukakenji
asukakenji / 0-go-os-arch.md
Last active April 5, 2025 21:07
Go (Golang) GOOS and GOARCH

Go (Golang) GOOS and GOARCH

All of the following information is based on go version go1.17.1 darwin/amd64.

GOOS Values

GOOS Out of the Box
aix
android
@akyoto
akyoto / RandomBytes.go
Created June 7, 2017 14:51
RandomBytes with dynamic length (golang)
package aero
import (
"math/rand"
"time"
)
const (
characterPool = "abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
characterPoolLength = uint64(len(characterPool))
@akyoto
akyoto / Fate - Stay Admin.txt
Created June 1, 2017 05:49
Fate / Stay Admin
I am the bone of my backend
Linux is my body and nginx is my blood
I have created over a thousand GitHub repos
Unknown to Google
Nor known to life
Have withstood pain to create many sites
Yet those hands will never finish anything
So, as I pray, Unlimited Bash Works.