MySQL who: See who is connected to your MySQL server with this script

February 29, 2016

Need to determine who is connected to your MySQL server and how many connections they have open? I tossed together this little script to display the information. [bash] #!/usr/bin/perl use DBI; use 5.010; use Getopt::Long; # Set defaults my $host = ‘localhost’; my $db = ‘information_schema’; my $user = ”; my $pass = ”; #

Autocomplete git branches and commands in bash

February 10, 2016

The tab completion for commands in bash is awesome, but it does not work for bash out of the box. Lucky for us it is relatively easy to get bash completion working. You will need two things, a copy of the completion script and an update to your bash profile. The completion script is available

Prevent WordPress plugins from requesting updates

January 4, 2016

Ever need to “lock” a plugin into a specific version and do not want it showing in the updates list and getting accidentally updated? This quick snippet allows you to specify a plugin(s) that should not appear in the update list. This will effectively block them from updating through WordPress itself. Manual updates/changes to the

Fix “frozen” Evernote app when fullscreen on OS X

October 20, 2015

The Problem: When you start Evernote it goes into fullscreen mode. You are not able to use any features of Evernote and hear the “Do not click me” error sound. The Cause: There is some sort of message box that has popped up. You need to close this before using Evernote, however it has popped

Getting social media shares with php

October 9, 2015

Quick snippets to help me (and maybe you!) remember how to quickly and easily get share counts from social networks. What other networks would you like to see? Facebook [php] function facebook_share_count( $post_id ) { $api = "https://graph.facebook.com/"; $url = $api . urlencode( get_permalink( $post_id ) ); $response = wp_remote_get( $url ); if( is_wp_error( $response