Skip to content

Instantly share code, notes, and snippets.

View damashe's full-sized avatar

Damashe Thomas damashe

  • Tuscaloosa Alabama
View GitHub Profile
@damashe
damashe / binds_on_mount.sh
Created November 5, 2018 22:53 — forked from alexandrusavin/binds_on_mount.sh
Add letsencrypt certificate to dd-wrt web interface
#!/bin/sh
if [ `nvram get https_enable` -gt 0 ] ; then
# get the absolute directory of the executable
SELF_PATH=$(cd -P "$(dirname "$0")" && pwd -P)
echo SELF_PATH: ${SELF_PATH}
# extract the mount path
@damashe
damashe / wp-update-plugins-git.sh
Created April 5, 2019 03:01 — forked from markjaquith/wp-update-plugins-git.sh
Update all WordPress plugins using WP-CLI and make a separate git commit for each one
#!/bin/bash
PLUGINS=$(wp plugin list --update=available --field=name | tr -d '\r');
wp plugin update-all;
for plugin in $PLUGINS; do
git add -A "wp-content/plugins/$plugin";
git commit -m "Update plugin: $plugin";
done;
@damashe
damashe / fd-clear-elementor-cache.php
Created April 23, 2019 21:33 — forked from heyfletch/fd-clear-elementor-cache.php
Clear Elementor Cache After a WP Migrate DB Pro Migration - Must Use Plugin (mu-plugins)
<?php
/*
Plugin Name: Clear Elementor Cache After WP Migrate DB Migration
Plugin URI: https://gist.github.com/heyfletch/769c64ad1fab8679032b076433afafd1
Description: Deletes CSS in uploads/elementor/css, which auto-regenerates on pageload. This clears the cache locally and remotely. Must-use plugin (mu-plugin).
Author: Fletcher Digital
Version: 0.1
Author URI: https://fletcherdigital.com
*/
@damashe
damashe / licence activation.php
Created August 11, 2019 20:57 — forked from mattradford/licence activation.php
ACF5 Pro licence activation. Could be adapted for any other plugin that requires a licence key, but doesn't yet support defining it in wp-config. Fires on theme activation.
// Place this in wp-config
define( 'ACF_5_KEY', 'yourkeyhere' );
// Set ACF 5 license key on theme activation. Stick in your functions.php or equivalent.
function auto_set_license_keys() {
if ( ! get_option( 'acf_pro_license' ) && defined( 'ACF_5_KEY' ) ) {
$save = array(
'key' => ACF_5_KEY,