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
# Install caddy | |
```sh | |
sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https curl | |
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg | |
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-stable.list | |
sudo apt update | |
sudo apt install caddy | |
``` |
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 | |
# Fully backup a docker-compose project, including all images, named and unnamed volumes, container filesystems, config, logs, and databases. | |
project_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && cd .. && pwd )" | |
cd "$project_dir" | |
project_name=$(basename "$project_dir") | |
backup_time=$(date +"%Y-%m-%d_%H-%M") | |
backup_dir="$project_dir/data/backups/$backup_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
{ | |
"workbench.iconTheme": "vscode-icons", | |
"editor.suggestSelection": "first", | |
"vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue", | |
"eslint.format.enable": true, | |
"eslint.packageManager": "yarn", | |
"typescriptHero.imports.organizeOnSave": true, | |
"editor.formatOnSave": true, | |
"editor.codeActionsOnSave": { | |
"source.fixAll": true, |
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
/* generated using http://www.network-science.de/ascii/ */ | |
```js | |
// _ _ _____ ____ _ _ _____ _______ | |
// _| || |_ / ____|/ __ \ | \ | | / ____||__ __| | |
// |_ __ _| | | | | | || \| || (___ | | | |
// _| || |_ | | | | | || . ` | \___ \ | | | |
// |_ __ _| | |____| |__| || |\ | ____) | | | | |
// |_||_| \_____|\____/ |_| \_||_____/ |_| |
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
var Promise = require('bluebird'), | |
mysql = require('mysql'), | |
using = Promise.using; | |
Promise.promisifyAll(require("mysql/lib/Connection").prototype); | |
Promise.promisifyAll(require("mysql/lib/Pool").prototype); | |
var env = (process.env.NODE_ENV == 'production') ? 'prod': 'dev'; | |
var pools = {}; | |
var base = { |