Skip to content

Instantly share code, notes, and snippets.

Rory McDaniel rorymcdaniel

  • Frederick, MD
Block or report user

Report or block rorymcdaniel

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
rorymcdaniel / .bashrc
Created Apr 26, 2017
Sync a remote WordPress database with local
View .bashrc
# this assumes you have a WP CLI alias set up for your production environment already
# Just add this to your ~/.bashrc for unix or ~/.bash_profile for Mac
alias syncwpdb='wp @production db dump - > production.sql && wp db reset --yes && wp db import production.sql && rm production.sql'
rorymcdaniel /
Last active May 1, 2017
Generate a self signed certificate for development and make Chrome trust it
# Usage:
# Generates a key and self signed certificate, then requires Linux Chrome to trust the certificate
# Dependency: libnss3-tools (sudo apt install libnss3-tools)
if (( $EUID != 0 )); then
echo "Please run again with sudo"
View deleteEmptyFiles.php
* Recursively searches the current directory and deletes any file that has only an opening PHP tag and empty lines
* Thanks to Jan for providing the solution here:
$directory = new RecursiveDirectoryIterator('./');
$iterator = new RecursiveIteratorIterator($directory);
rorymcdaniel /
Created Mar 8, 2017
Deployment Script for Pagely VPS and Envoyer
rorymcdaniel / .htaccess
Created Jun 22, 2017
Pull Uploads from Production in WordPress staging environment
View .htaccess
# /wp-content/uploads/.htaccess
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule (.*)$1 [L]
rorymcdaniel /
Last active Dec 19, 2019
Provision my mac after re-installing
# First, install Homebrew
/usr/bin/ruby -e "$(curl -fsSL"
brew install caskroom/cask/brew-cask 2> /dev/null
brew install node
brew cask install iterm2
You can’t perform that action at this time.