Skip to content

Instantly share code, notes, and snippets.

View dazeb's full-sized avatar
🎯
Focusing

Darren Bennett dazeb

🎯
Focusing
View GitHub Profile
@dazeb
dazeb / dazeb.md
Created February 22, 2024 16:01
This code snippet is a configuration file for the Dazeb project. It specifies various settings such as theme, color customizations, text files, font family, and language information to be used in different languages (Cascadia Code, Droid Sans Mono), including default

dazeb

Preview:
{"name":"dazeb","settings":"{\"settings\":\"{\\n  \\\"workbench.iconTheme\\\": \\\"vscode-icons\\\",\\n  \\\"vsicons.associations.file.Default.file\\\": \\\"object\\\",\\n  \\\"vsicons.dontShowNewVersionMessage\\\": true,\\n  \\\"workbench.colorCustomizations\\\": {},\\n  \\\"workbench.editor.defaultBinaryEditor\\\": \\\"default\\\",\\n  \\\"editor.formatOnPaste\\\": true,\\n  \\\"editor.formatOnSave\\\": true,\\n  \\\"diffEditor.codeLens\\\": true,\\n  \\\"editor.minimap.autohide\\\": true,\\n  \\\"editor.minimap.enabled\\\": false,\\n  \\\"editor.acceptSuggestionOnEnter\\\": \\\"smart\\\",\\n  \\\"files.autoGuessEncoding\\\": true,\\n  \\\"files.enableTrash\\\": false,\\n  \\\"files.associations\\\": {\\n    \\\"*.ts\\\": \\\"typescript\\\",\\n    \\\"*.js\\\": \\\"javascript\\\"\\n  },\\n  \\\"files.insertFinalNewline\\\": true,\\n  \\\"telemetry.telemetryLevel\\\": \\\"crash\\\",\\n  \\\"security.workspace.trust.untrustedFiles\\\": \\\"open\\\",\\n  \\\"security.workspace.t
@dazeb
dazeb / files.and.folders.txt
Last active February 11, 2024 17:29
File and folder layout
# coolify
* [.tinkerwell/](.\coolify\.tinkerwell)
* [snippets/](.\coolify\.tinkerwell\snippets)
* [DeleteUser.php](.\coolify\.tinkerwell\snippets\DeleteUser.php)
* [SendEmail.php](.\coolify\.tinkerwell\snippets\SendEmail.php)
* [app/](.\coolify\app)
* [Actions/](.\coolify\app\Actions)
* [Application/](.\coolify\app\Actions\Application)
* [StopApplication.php](.\coolify\app\Actions\Application\StopApplication.php)
@dazeb
dazeb / docker-all.sh
Created February 4, 2024 12:40
Docker, Docker Compose, Dockge & Portainer 4in1 BASH
#!/bin/bash
# Check for curl and wget
if ! command -v curl &> /dev/null; then
echo "curl could not be found, please install curl."
exit 1
fi
if ! command -v wget &> /dev/null; then
echo "wget could not be found, please install wget."
@dazeb
dazeb / docker-repo-install.sh
Created January 28, 2024 13:45
Install Docker using repo
#!/bin/bash
# Ensure the script is run as root
if [ "$(id -u)" != "0" ]; then
echo "This script must be run as root" 1>&2
exit 1
fi
# Update the package index
echo "Updating package index..."
@dazeb
dazeb / install-docker-and-compose-traditional-method.sh
Created January 27, 2024 17:26
Docker and Compose V2 BASH Installer
#!/bin/bash
# Update and Upgrade the System
echo "Updating and upgrading your system..."
sudo apt-get update && sudo apt-get upgrade -y
# Install required packages
echo "Installing packages required for Docker installation..."
sudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common lsb-release gnupg
@dazeb
dazeb / postalserver-dns-records.sh
Last active January 25, 2024 17:40
BASH Script for PostalServer.io Installation - DNS RECORDS
#!/bin/bash
# Ask the user for their Cloudflare API key, email, and zone
read -p "Enter your Cloudflare API key: " API_KEY
read -p "Enter your Cloudflare email: " EMAIL
read -p "Enter your Cloudflare zone: " ZONE
# Get the IP addresses
IPV4=$(curl -s -X GET -4 https://ifconfig.co)
IPV6=$(curl -s -X GET -6 https://ifconfig.co)
@dazeb
dazeb / screen-bash-start.sh
Created January 25, 2024 17:06
This is a BASH snippet meant for use at the beginning of a shell/bash script that adds SCREEN every time we run the script.
#!/bin/bash
# Check if we are running inside a screen session
if [ -z "$STY" ]; then
# Check if screen is installed
if ! command -v screen &> /dev/null; then
echo "Screen is not installed. Would you like to install it now? (y/n)"
read -r install_screen
if [[ $install_screen == "y" ]]; then
# Install screen (Debian/Ubuntu example)

# The top level settings are used as module
# and system configuration.
# A set of users which may be applied and/or used by various modules
# when a 'default' entry is found it will reference the 'default_user'
# from the distro configuration specified below
users:
   - default
@dazeb
dazeb / docker-docker-compose-v2.sh
Created January 25, 2024 07:10
Docker & Docker-Compose v2 Bash Install
#!/bin/bash
# Install Docker
echo -e "\n\nInstalling Docker..."
sh <(curl -sSL https://get.docker.com)
if [ $? -eq 0 ]; then
echo -e "\033[0;32mDocker installation succeeded.\033[0m"
else
echo -e "\033[0;31mDocker installation failed.\033[0m"
exit 1
@dazeb
dazeb / #cloud-config.md
Created January 25, 2024 01:14
Cloud-Init functions for Debian 12 - 2024

Debian 12 Bookworm cloud-init configs.

Other Linux flavours may have different configs! Test in dev mode first!

The configs below are all seperated. Pick what you need, theres a sample script at the bottom.

  1. Set Timezone and Locale: Configure the system's timezone and locale to match your geographic location and preferred language settings.
timezone: "Etc/UTC"