Skip to content

Instantly share code, notes, and snippets.

😌
Developing workflows and solutions @Mixd

Ash Davies DrizzlyOwl

😌
Developing workflows and solutions @Mixd
View GitHub Profile
@DrizzlyOwl
DrizzlyOwl / component-scanner.py
Created Jun 8, 2020
Scan a WordPress theme directory for any PHP components that are not in use
View component-scanner.py
#! /usr/bin/python
# Load libs
import os
import re
import argparse
# Register CLI args
parser = argparse.ArgumentParser(
description='Parse all your WordPress templates to determine which PHP components are not in use',
View tls-enable.sh
#! /bin/bash
#
# A quick bash script to make it easier for non tech-savvy folks
# to set up TLS for a Virtual Host
#
# @author Ash Davies <a.davies@mixd.co.uk>
# @version 1.0.0
#
asksure() {
@DrizzlyOwl
DrizzlyOwl / mailhog-mamp.md
Created Aug 7, 2019 — forked from jaredatch/mailhog-mamp.md
Install MailHog with MAMP Pro
View mailhog-mamp.md

Install MailHog with MAMP Pro, using HomeBrew.

MailHog

First let's make sure HB is updated. Open up terminal for the following steps.

$ brew update
@DrizzlyOwl
DrizzlyOwl / FizzBuzz in SCSS.scss
Last active Mar 9, 2018
Generated by SassMeister.com.
View FizzBuzz in SCSS.scss
// ----
// Sass (v3.4.21)
// ----
@for $var from 1 through 100 {
.n {
@if ($var % 3) == 0 and ($var % 5) == 0 {
count: "fizzbuzz"
} @else if ($var % 3) == 0 {
count: "fizz"
View keybase.md

Keybase proof

I hereby claim:

  • I am drizzlyowl on github.
  • I am drizzlyowl (https://keybase.io/drizzlyowl) on keybase.
  • I have a public key ASAWR06KilncQvc-xv_imgXHLuXfHH9MzkBQQOCu63NnAQo

To claim this, I am signing this object:

View check-wordpress-versions.sh
#! /bin/bash
#
# Author: Ash Davies <github.com/drizzlyowl>
# Requires: wp-cli, curl, python, sendmail
# Description: Checks through all vhost directories to determine whether WordPress is
# installed and whether the version is out of date and sends a summary email to
# a recipient
#
touch $HOME/wordpress-versions.tmp
View create-vhost.sh
#! /bin/bash
#
# A quick bash script to make it easier for non tech-savvy folks
# to create a vhost conf file and enable it for apache2.
#
# @author Ash Davies <a.davies@mixd.co.uk>
# @version 1.0.0
#
asksure() {
@DrizzlyOwl
DrizzlyOwl / admin.php
Last active Mar 10, 2017
WP REST API Disable
View admin.php
<?php
/**
* $. Remove & disable JSON API
******************************************************************************/
function wpst_remove_json_api() {
/**
* Remove API scripts from header/footer
*/
View homebrew_multiple_mysql_versions.md

Multiple MySQL Versions with Homebrew

For homebrew version 0.9.5.

brew -v # => Homebrew 0.9.5

Install the current version of mysql.

# Install current mysql version
brew install mysql
View .zshrc
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH=/Users/ashleydavies/.oh-my-zsh
# Set name of the theme to load. Optionally, if you set this to "random"
# it'll load a random theme each time that oh-my-zsh is loaded.
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
ZSH_THEME="clean"
You can’t perform that action at this time.