This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env nix-shell | |
#!nix-shell -i bash -p cowsay fortune | |
## NixOS' nix-shell can be used as a shebang to then load in dependencies for the script without ever having to install them. | |
# This executes as expected, albeit a bit more slowly at start up to load in the dependencies | |
fortune | cowsay |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package database | |
import ( | |
"context" | |
"database/sql" | |
"fmt" | |
"log" | |
"os" | |
"strconv" | |
"time" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
if [[ $1 == "-h" ]]; then | |
echo "Usage: update-discord [-c]" | |
echo " -h: Display this help message" | |
echo " -c: Clean up after install" | |
exit 0 | |
fi | |
wget https://discordapp.com/api/download?platform=linux -O ~/Downloads/discord.deb |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
See the blog post here: https://blog.triassi.ca/blog/01-docker-laravel-production/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Leverages Docker containers to create a temporary signing server | |
# Obtain a SSL cert and then apply it to the service in question we're interested in | |
# Usage: ./kasm_cert.sh mydomain.test | |
mkdir -p /tmp/webroot | |
# Start an ephemeral nginx container |