Skip to content

Instantly share code, notes, and snippets.

@nisovin
nisovin / Godot Web Server Configs.md
Last active February 1, 2024 15:53
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 24, 2024 20:06
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.

Wayland proponents make it seem like Wayland is "the successor" of Xorg, when in fact it is not. It is merely an incompatible alternative, and not even one that has (nor wants to have) feature parity (missing features). And unlike X11 (the X Window System), Wayland protocol designers actively avoid the concept of "windows" (making up incompr

@slok
slok / pprof.md
Last active April 22, 2024 17: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 April 14, 2024 21:40
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.

@fnky
fnky / ANSI.md
Last active April 25, 2024 19:35
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 24, 2024 06:51
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.
@fntlnz
fntlnz / self-signed-certificate-with-custom-ca.md
Last active April 19, 2024 12:30
Self Signed Certificate with Custom Root CA

Create Root CA (Done once)

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096
@rauchg
rauchg / README.md
Last active January 6, 2024 07:19
require-from-twitter