Skip to content

Instantly share code, notes, and snippets.

View fronbasal's full-sized avatar
👨‍💻

Daniel Malik fronbasal

👨‍💻
View GitHub Profile
@alexanderkjeldaas
alexanderkjeldaas / hetzner-cloud-wipe-and-install-nixos.sh
Last active April 16, 2021 16:59 — forked from nh2/hetzner-dedicated-wipe-and-install-nixos.sh
Example script to install NixOS on a Hetzner dedicated server via the Hetzner rescue mode
#!/usr/bin/env bash
# Installs NixOS on a Hetzner Cloud CX51 server, wiping the server.
#
# This is for a specific server configuration; adjust where needed.
#
# Prerequisites:
# * Update the script to adjust SSH pubkeys, hostname, NixOS version etc.
#
# Usage:
@sawaYch
sawaYch / leak.sh
Created October 21, 2019 05:57
NordVPN openvpn private key leak
# _ _
# (c).-.(c)
# / ._. \
# __\( Y )/__
#(_.-/'-'\-._)
# || ||
# _.' `-' '._
#(.-./`-'\.-.)
# `-' `-'
root@vm-fi6:~# lxc-ls
@Staubgeborener
Staubgeborener / mydealz_preisfehler.sh
Last active October 11, 2021 09:25
Rechtzeitig über Preisfehler auf mydealz.de benachrichtigt werden
#!/bin/bash
#Praktisches Skript für alle mydealerz. Am besten diese Codezeilen mit crontab -e jede Minute ausführen lassen (siehe: https://www.linuxwiki.de/crontab)
#Die folgenden Zeilen prüfen dann jede Minute (oder von mir aus Sekunde) ob es einen neuen Preisfehler-Deal gibt und schickt dann eine Telegram-Nachricht mit dem Link raus
#So ist es nun möglich tatsächlich auch _rechtzeitig_ über Preisfehler informiert zu werden und nicht erst ~10 Minuten später (beim ersten ausführen wird eine Preisfehler-Nachricht verschickt da eine Referenz fehlt, sit aber völlig normal)
TOKEN=<TOKEN> #https://core.telegram.org/bots/api#authorizing-your-bot
CHAT_ID=<CHAT_ID> #https://stackoverflow.com/a/32572159
touch .tmp_file_lastknowndeal
@angelo-v
angelo-v / jwt-decode.sh
Last active May 3, 2024 10:56
Decode a JWT via command line
# will not work in all cases, see https://gist.github.com/angelo-v/e0208a18d455e2e6ea3c40ad637aac53#gistcomment-3439904
function jwt-decode() {
sed 's/\./\n/g' <<< $(cut -d. -f1,2 <<< $1) | base64 --decode | jq
}
JWT=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ
jwt-decode $JWT
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active May 4, 2024 06:22
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@beeftornado
beeftornado / nginx-conf
Last active January 18, 2024 19:54
Nginx reverse proxy for Sentry (github.com/getsentry/sentry). I removed some personal information and replaced it with <UPPERCASE> so look closely. Some key information in the sentry settings - SENTRY_URL_PREFIX, FORCE_SCRIPT_NAME, and ALLOWED_HOSTS. The rest of that is pretty standard.
server {
listen 80; ## listen for ipv4; this line is default and implied
listen [::]:80 default ipv6only=on; ## listen for ipv6
root /usr/share/nginx/www;
index index.php index.html index.htm;
# Make site accessible from http://localhost/
server_name _;