Skip to content

Instantly share code, notes, and snippets.

@vintagefuture
vintagefuture / README.md
Created August 23, 2024 13:51 — forked from sebastianneubert/README.md
Enable TrueNAS Wake On Lan permanently

Enabling WoL on a TrueNAS System

Source: https://www.truenas.com/community/threads/enable-wol.95856/

As an Admin user you can use the ethtool with sudo rights to check if WoL is available on your system. The usual ethernet NIC name is "enp3s0" so I use everytime this name.

Check if WoL is available

// ==UserScript==
// @name Force YAML on AWS docs
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author githhub.com/vintagefuture
// @match https://docs.aws.amazon.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=amazon.com
// @grant none
// ==/UserScript==
@vintagefuture
vintagefuture / load_dotenv.sh
Created February 6, 2023 20:12 — forked from mihow/load_dotenv.sh
Load environment variables from dotenv / .env file in Bash
if [ ! -f .env ]
then
export $(cat .env | xargs)
fi
@vintagefuture
vintagefuture / terminal-prompt-git-branch-zsh.md
Created November 3, 2022 13:53 — forked from reinvanoyen/terminal-prompt-git-branch-zsh.md
Add Git Branch Name to Terminal Prompt (MacOS Catalina zsh)

Add Git Branch Name to Terminal Prompt (MacOS Catalina zsh)

screenshot

Open ~/.zshrc in your favorite editor and add the following content to the bottom.

function parse_git_branch() {
    git branch 2> /dev/null | sed -n -e 's/^\* \(.*\)/[\1]/p'
}
#!/bin/bash
# Backup directory and name suffix
BACKUP_DIR=/path/for/backup
FILE_SUFFIX=backup.tar
# Name file using the date and supplied suffix
FILE=`date +"%Y%m%d%H%M"`${FILE_SUFFIX}
# Combine the backup directory and file name
OUTPUT_FILE=${BACKUP_DIR}/${FILE}
@vintagefuture
vintagefuture / noip2.service
Created July 9, 2020 18:04 — forked from NathanGiesbrecht/noip2.service
Systemd Service file for no-ip.com dynamic ip updater
# Simple No-ip.com Dynamic DNS Updater
#
# By Nathan Giesbrecht (http://nathangiesbrecht.com)
#
# 1) Install binary as described in no-ip.com's source file (assuming results in /usr/local/bin)
# 2) Run sudo /usr/local/bin/noip2 -C to generate configuration file
# 3) Copy this file noip2.service to /etc/systemd/system/
# 4) Execute `sudo systemctl daemon-reload`
# 5) Execute `sudo systemctl enable noip2`
# 6) Execute `sudo systemctl start noip2`