Skip to content

Instantly share code, notes, and snippets.

View MeesJ's full-sized avatar

Mees MeesJ

View GitHub Profile
@MeesJ
MeesJ / topleft.gif
Last active April 4, 2022 14:26
topleft.gif
topleft.gif
@MeesJ
MeesJ / topright.gif
Last active April 4, 2022 14:29
topright.gif
topright.gif
@MeesJ
MeesJ / bottomleft.gif
Last active April 4, 2022 14:32
bottomleft.gif
bottomleft.gif
@MeesJ
MeesJ / bottomright.gif
Last active April 4, 2022 14:34
bottomright.gif
bottomright.gif
@MeesJ
MeesJ / netplan.yml
Created June 19, 2023 10:03
DNS servers (dual-stack)
nameservers:
addresses:
- 2606:4700:4700::1111
- 2606:4700:4700::1001
- 2001:4860:4860::8888
- 2001:4860:4860::8844
- 1.1.1.1
- 1.0.0.1
- 8.8.8.8
- 8.8.4.4
@MeesJ
MeesJ / code.js
Last active August 23, 2023 16:35
Code to make Discord interactions endpoints created in n8n work. Set the environmental variable NODE_FUNCTION_ALLOW_EXTERNAL to contain tweetnacl, otherwise it won't work!
const nacl = require('tweetnacl');
const PUBLIC_KEY = 'APPLICATIONPUBLICKEY';
if (!items || items.length === 0) {
return [
{
json: {
error: 'Invalid payload'
}
@MeesJ
MeesJ / .bashrc
Created September 21, 2023 18:43
Bash configuration Hetzner
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
echo "GB Written: $(echo "scale=3; $(sudo /usr/sbin/smartctl -A /dev/sda | grep "Total_LBAs_Written" | awk '{print $10}') * 512 / 1073741824" | bc | sed ':a;s/\B[0-9]\{3\}\>/,&/;ta')"