Skip to content

Instantly share code, notes, and snippets.

@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 / 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 / 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
Last active March 25, 2024 19:28
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 / quickmount.md
Last active June 13, 2020 22:16
Mount synology nas on Mac through bash

Installation

  1. Copy the contents of the quickmount.sh file to your ~/.bash_profile
  2. Edit lines 4, 5, and 6 with the appropriate information for connecting to your synology NAS
  3. Edit/duplicate the projects function for any folders you want to mount on your mac.
  4. Save your ~/.bash_profile, then in terminal run source ~/.bash_profile

Usage

To mount a directory from terminal, just call your function:

@mindfullsilence
mindfullsilence / README.md
Last active February 12, 2024 20:50
Root Bedrock Homestead site-type

This script will create a roots/bedrock project in your desired directory, install composer dependencies, and install wordpress via the wp-cli tool. Works with mailhog.

For global homestead installations (not per-project installs)

Place the sh file in Homestead/scripts/site-types/

In your Homestead.yaml file, use "bedrock" as the type key for a site mapping, and the value of the map key as the database. Be sure to add /web to the end of your to: key for your folder mapping. The script will generate the web folder for you. E.g.:

---
@mindfullsilence
mindfullsilence / KeepsHistory.js
Last active March 10, 2021 17:38
Object history tracking mixin with undo and redo abilities
const log = Symbol('log')
const present = Symbol('present')
const observer = Symbol('observer')
const real = Symbol('real')
const KeepsHistory = superclass => class extends superclass {
;[log] = []
;[present] = null
;[observer] = undefined
;[real] = undefined
@mindfullsilence
mindfullsilence / wp-end-maintainance.sh
Last active July 16, 2018 17:18
Bash scripts to start and stop maintainance mode for wordpress.
#!/usr/bin/env bash
WP_WEB_ROOT=/var/www/html;
cd $WP_WEB_ROOT;
# Disable maintainance mode by removing the .maintainance file
rm -f $WP_WEB_ROOT/.maintainance;
# Flush caches
@mindfullsilence
mindfullsilence / README.md
Last active October 4, 2017 22:56
Creates a triangle with fill and stroke on any side(s) you want.

Use the mixin inside of a ::before or ::after pseudo element.

E.g.:

div::before {
  @include svg-triangle(
    $width: 30px, // any unit
    $height: 20px, // any unit
    $borders: left right, // left, right, bottom, or any combination of the 3
 $border-color: #cccccc, // hex
/* dockter eval
namespace: components
name: [{[Component name]}]
description: [{[Description]}]
file: [{[Component name]}].less
require:
- jquery
endeval */