Skip to content

Instantly share code, notes, and snippets.

View jordan8037310's full-sized avatar

Jordan Ryan jordan8037310

View GitHub Profile
@jordan8037310
jordan8037310 / .lando.yml
Last active January 12, 2021 22:58
Mautic LEMP Lando
name: mautic
recipe: lemp
config:
webroot: mautic
php: '7.2'
composer_version: '1.10.19'
database: mysql:5.7
xdebug: false
config:
vhosts: nginx-lando.conf
@jordan8037310
jordan8037310 / parse_yaml.sh
Created October 26, 2016 05:37 — forked from pkuczynski/LICENSE
Read YAML file from Bash script
#!/bin/sh
parse_yaml() {
local prefix=$2
local s='[[:space:]]*' w='[a-zA-Z0-9_]*' fs=$(echo @|tr @ '\034')
sed -ne "s|^\($s\)\($w\)$s:$s\"\(.*\)\"$s\$|\1$fs\2$fs\3|p" \
-e "s|^\($s\)\($w\)$s:$s\(.*\)$s\$|\1$fs\2$fs\3|p" $1 |
awk -F$fs '{
indent = length($1)/2;
vname[indent] = $2;
for (i in vname) {if (i > indent) {delete vname[i]}}
@jordan8037310
jordan8037310 / jryan-mac-config.sh
Created September 28, 2016 04:00
Shell Script to install and configure all apps for Mac OS X clean installs
#!/binbash
# firsrun (Uncomment):
install xcode-cli-tools
xcode-select --install
# install homebrew (Uncomment)
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# install caskroom
@jordan8037310
jordan8037310 / launch.sh
Created February 9, 2016 22:31 — forked from genoma/launch.sh
Script to use pageres
#!/bin/bash
echo ""
echo -n "$(tput setaf 1)What script you'd like to launch? $(tput bold)[C = Cropped/N = Normal] $(tput sgr 0)"
read script
if [ "$script" = "n" ]; then
cat resolutions|pageres localhost:3000
else
cat resolutions|pageres localhost:3000 -c
@jordan8037310
jordan8037310 / pageres-mogrify.sh
Created February 9, 2016 22:30 — forked from mazuhl/pageres-mogrify.sh
Get screenshots and resize/crop them
pageres 1024x768 < urls.txt ; mogrify -resize 474 -crop 474x501+0+0 *.png
# Go get screenshots from list in clipboard
# Once that's done, resize all the images
# and crop them
# And then optimise them: /Applications/ImageOptim.app/Contents/MacOS/ImageOptim *.png
@jordan8037310
jordan8037310 / setGlobalMaxAllowedPacket
Created April 3, 2015 01:02
Set Global max_allowed_packet
SET GLOBAL max_allowed_packet =1024*1024*512;
@jordan8037310
jordan8037310 / SecureCHMODFiles
Created April 3, 2015 00:58
Secure Files by CHMOD
find /path/to/base/dir -type d -print0 | xargs -0 chmod 755 find /path/to/base/dir -type f -print0 | xargs -0 chmod 644
# /path/to/base/dir should be the root of your web instance, if you're into securing that kinda thing
mysqldump -u sqluser -ppassword database | gzip > /root/sqlbackups/databasename_`date '+%m-%d-%Y'`.sql.gz
# Crontab Settings to manage this export
# Yes, not sophisticated at all
##############
# crontab -e #
##############
# 30 2 * * * /root/awsmysqldump.sh 2>&1>> /root/awsmysqldump.log
# 00 3 * * * s3cmd put /root/sqlbackups/* s3://mybackupsbucket/serverfolder/sqlbackups/ > /dev/null
# 30 3 * * * rm -rf /root/sqlbackups/*
@jordan8037310
jordan8037310 / FreeNAS.CouchPotato.Git.Install
Created March 30, 2015 20:27
FreeNAS - Installing CouchPotato from GIT
ssh [email protected]
jls
jexec 4 tcsh #Replace 4 with the # of your CouchPotato Jail
cd /usr/pbi/couchpotato-amd64/share/couchpotato
tar -cvf CBP_backup.tar.gz CouchPotatoServer/
service couchpotato stop
pkg install git nginx python
# Fork CouchPotatoServer, Set up Deploy Key for git user for Forked instance
# Alternatively can simply clone from https://github.com/RuudBurger/CouchPotatoServer, but you will be deploying your user credentials instead of a more secure deploy credential
git clone [email protected]:jordan8037310/CouchPotatoServer.git
<?php
/**
* @file
* local.settings.php (Drupal 6.x)
*
* This settings file is intended to contain settings specific to a local
* development environment, by overriding options set in settings.php.
*
* Include this file from your regular settings.php by including this at the
* bottom: