Skip to content

Instantly share code, notes, and snippets.

Rocking this project.

Mike Garrett MikeNGarrett

Rocking this project.
View GitHub Profile
MikeNGarrett / mysql(wp)-commands.txt
Created Oct 31, 2022 — forked from vishalkakadiya/mysql(wp)-commands.txt
WordPress(or any mysql database) - Convert special characters(eg. Latin-1) to UTF-8 in mysql database
View mysql(wp)-commands.txt
The actual step-by-step WordPress / MySQL fix…
1. Back up all your stuff first (likely using phpMyAdmin / CPANEL)
Before doing any of the following it strongly encouraged to back up all your data and files. Just to be safe. At the very least, your full database and the WordPress config file: wp-config.php
2. Note the settings that your WordPress is currently using (from wp-config.php)
Specifically, your MySQL database configuration, including DB_NAME, DB_USER, DB_PASSWORD, and also DB_CHARSET and DB_COLLATE
// ** MySQL settings - You can get this info from your web host ** //
View add_fields_to_bundle_programatically.php
* This file will demonstrate a method to export fields to code.
* You can use this to easily create fields using the UI, export to code
* and then use in a custom module. Upon installation of the module
* your fields and instances will already be set up.
// Create the fields you want using the Drupal UI.
// On the same site, go to
MikeNGarrett / Contract Killer
Last active Sep 19, 2016 — forked from malarkey/Contract Killer
The latest version of my ‘killer contract’ for web designers and developers
View Contract Killer

Contract Killer

The popular open-source contract for web professionals by Stuff & Nonsense

  • Originally published: 23rd December 2008
  • Revised date: March 15th 2016
  • Original post

View mobileNav.js
mobileNav.js by Matt Jordan.
(function($) {
$.fn.mobileNav = function(mobileWidth) {
// Create the <select> element
var selectHTML = '<select name="mobileNav" class="mobileNav" style="display:none">',
currentHref = window.location.href,
checkSize = function() {
MikeNGarrett / event-category-list.php
Created Aug 5, 2012 — forked from jo-snips/event-category-list.php
The Events Calendar: List Event Categories
View event-category-list.php
<?php // If you'd rather have category drop downs ?>
<form action="#" method="get" id="event-change">
$current = get_query_var('tribe_events_cat');
$terms = get_terms($tribe_ecp->get_event_taxonomy());
$count = count($terms);
if ( $count > 0 ){
echo '<select class="events-cat-menu"><option value="-1">All Events</option>';
// print_r($terms);
$selected = '';