Skip to content

Instantly share code, notes, and snippets.

View Eun's full-sized avatar
💭
I may be slow to respond.

Tobias Salzmann Eun

💭
I may be slow to respond.
View GitHub Profile
@fsmv
fsmv / pass.go
Last active October 9, 2022 21:15
A runnable go script that creates an http basic auth password hash compatible with .htaccess (this is just the password part, you have to add username:<hash>)
/*?sr/bin/env go run "$0" "$@"; exit $? #*/
// This is actually not a shebang, the first line is both valid shell script and valid go code
// Just run: chmod +x pass.go; ./pass.go
package main
import (
"bufio"
"crypto/sha256"
"encoding/base64"
"fmt"
@Eun
Eun / avn-pg
Last active July 6, 2021 16:56
connect to an aiven postgres database with ease
#!/bin/bash
set -euo pipefail
######################################################
## REQUIREMENTS
## * proper configured and running avn cli: (https://github.com/aiven/aiven-client)
## * installed fzf (https://github.com/junegunn/fzf)
## * installed jq (https://github.com/stedolan/jq)
## * docker
######################################################
## CHANGE BELOW IF NECESSARY
@JoeyBurzynski
JoeyBurzynski / 55-bytes-of-css.md
Last active November 17, 2024 14:13
58 bytes of css to look great nearly everywhere

58 bytes of CSS to look great nearly everywhere

When making this website, i wanted a simple, reasonable way to make it look good on most displays. Not counting any minimization techniques, the following 58 bytes worked well for me:

main {
  max-width: 38rem;
  padding: 2rem;
  margin: auto;
}
@HarlemSquirrel
HarlemSquirrel / pulseaudio-dlna.service
Last active September 20, 2023 22:03
a pulseaudio-dlna Unit file for systemd
## Systemd user unit file for pulseaudio-dlna
# Copy to: ~/.config/systemd/user/pulseaudio-dlna.service
# Enable: systemctl --user enable pulseaudio-dlna
[Unit]
Description=PulseAudio-DLNA Service
[Install]
WantedBy=default.target
@manishtpatel
manishtpatel / main.go
Last active October 18, 2023 03:12
GoLang Encrypt string to base64 and vice versa using AES encryption.
package main
import (
"crypto/aes"
"crypto/cipher"
"crypto/rand"
"encoding/base64"
"fmt"
"io"
)