Skip to content

Instantly share code, notes, and snippets.

@mindfullsilence
mindfullsilence / README.md
Last active June 1, 2025 10:11
Deployment scripts for atomic deployment of laravel applications in runcloud

Runcloud Automic Deployment Script For Laravel Applications

These scripts can be used to set up automic deployments in runcloud for laravel applications

@mindfullsilence
mindfullsilence / README.md
Created April 13, 2023 15:12
Brewphus - Simply bash function for installing and switching php versions using brew

Add the function to your bash profile Ensure brew is installed Run it!

Example:

brewphus install 8.0
@mindfullsilence
mindfullsilence / README.md
Created April 13, 2023 15:21
Add multiple accounts to your AWS cli, and activate them when needed

Add the contents of aws-profile.sh to your bash profile.

Use like the following:

Create a user in AWS IAM with CLI capabilities Get the users' access key and secret key

Add the profile to your CLI

aws-add-profile {the account name} {your access key} {your secret key}
@mindfullsilence
mindfullsilence / guidelines.md
Last active January 27, 2024 21:18
Theme Developers Guide

Theming Rules:

The following guidelines have been written to provide optimal performance, scalability, maintainability, and flexibility within a CMS system.

This document uses the following conventions to express intent:

  • SHALL: The statement that follows must always be followed.
  • SHALL NOT: The statement that follows must never happen.
  • SHOULD: If the statement that follows can happen, then it must happen.
  • SHOULD NOT: If the statement that follows doesn't need to happen, then it must not happen.
@mindfullsilence
mindfullsilence / backup.sh
Created July 1, 2024 04:30
Error at line 1 in file: importing database "Unknown Command '\-'"
#!/bin/bash
DB_BACKUP_DIR_ROOT="$HOME/Desktop/mysql_backup"
# Create the backup directory
mkdir -p $DB_BACKUP_DIR_ROOT
# Backup each db in the server, skip schema dbs though
for db in $(mysql -u root -Bse 'show databases'|egrep -vi 'information_schema|performance_schema|user')
do
@mindfullsilence
mindfullsilence / README.md
Created July 10, 2024 16:25
Mac: Send a text and notification when a domain has propagated

Propagate

A very simple script to add to your bash/zsh profile that shows a notification on your mac, and sends you a text message when a domain has propagated. Let's you know when to issue an SSL certificate. Great for LetsEncrypt SSL as you cannot pass the LetsEncrypt challenge until a domain has propagated.

Requirements

  • Only works on MacOS.
  • Requires alerter to be installed for sending notifications.
  • Requires dig - but this comes with macos so you shouldn't need to do anything there.

Installation

Add the above script to your ~/.profile or ~/.zprofile or wherever you store your terminal profile. Then close and re-open your terminal, or simply call source ~/.profile to load in the new functionality.