Skip to content

Instantly share code, notes, and snippets.

View migrate-wp-user-avatar.php
Migrate from WP User Avatar to Simple Local Avatars
Allows sites to easily move away from the WP User Avatar plugin and switch to Simple Local Avatars instead.
Run by invoking with WP CLI like so:
`wp eval-file migrate-wp-user-avatar.php`
Author: Philip John
View dimox_breadcrumbs.php
* WordPress Breadcrumbs
* author: Dimox
* version: 2019.03.03
* license: MIT
function dimox_breadcrumbs() {
/* === OPTIONS === */
ecos / FTP Upload and URL in Clipboard
Created Mar 19, 2013
A cool Windows batch script to upload a file to an FTP folder, and then copy the URL in the clipboard. Useful for posting screenshots quickly in a post on a forum. You only have to change these parameters SET Server=yourFTPserver SET UserName=yourFTPusername SET Password=yourpassword SET RemoteFolder=/www/images/screenshots SET ClipboardURLPrefi…
View FTP Upload and URL in Clipboard
ECHO Upload to FTP
ECHO Written by: Jason Faulkner
ECHO. Improved by ecos
REM Usage:
REM UploadToFTP [/L] FileToUpload
kkirsche / Install Composer to use MAMP's
Last active Jun 10, 2021
How to install Composer globally using MAMP's PHP
View Install Composer to use MAMP's

##Create an alias to MAMP's PHP installation

To do this, we can simply create an alias for our bash profile. We'll be doing this is nano, though you can do it in vim or a number of other editors as well.

Within the terminal, run:

nano ~/.bash_profile

This will open nano with the contents, at the top in a blank line add the following line:

nicolasembleton /
Last active Jun 9, 2021
Restart Bluetooth Daemon on Mac OS X without restarting
sudo kextunload -b
sudo kextload -b

How to get Composer running on SiteGround shared

  1. Download to your account's home directory — /home/username.
  2. Edit .bashrc file in same directory by adding alias composer='/usr/local/php56/bin/php-cli ~/composer.phar' line. Update php56 part to current relevant version, if necessary.
  3. Restart SSH session or run source ~/.bashrc to reload config.
  4. Use composer command!
View gist:4fa3c4228a8bb53cc71d
load wp-config.php
set up default constants
load wp-content/advanced-cache.php if it exists
load wp-content/db.php if it exists
connect to mysql, select db
load object cache (object-cache.php if it exists, or wp-include/cache.php if not)
load wp-content/sunrise.php if it exists (multisite only)
jdevalk / .htaccess
Last active May 18, 2021
These three files together form an affiliate link redirect script.
View .htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^index\.php$ - [L]
RewriteRule (.*) ./index.php?id=$1 [L]
johnbillion /
Last active Apr 21, 2021
WordPress Emails

WordPress Emails

This document lists all the situations where WordPress sends an email, along with how to filter or disable each email.

This documentation has moved here:

wpscholar / functions.php
Last active Mar 1, 2021
Enqueueing IE conditional stylesheets in WordPress the right way
View functions.php
add_action( 'wp_enqueue_scripts', 'enqueue_my_styles' );
* Example callback function that demonstrates how to properly enqueue conditional stylesheets in WordPress for IE.
* IE10 and up does not support conditional comments in standards mode.
* @uses wp_style_add_data() WordPress function to add the conditional data.
* @link