Skip to content

Instantly share code, notes, and snippets.

View MikeNGarrett's full-sized avatar
🤘
Rocking this project.

Mike Garrett MikeNGarrett

🤘
Rocking this project.
View GitHub Profile
/*
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
MikeNGarrett / Contract Killer 3.md
Last active September 19, 2016 15:16 — forked from malarkey/Contract Killer 3.md
The latest version of my ‘killer contract’ for web designers and developers

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

<?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 example.com/devel/php
@MikeNGarrett
MikeNGarrett / event-category-list.php
Created August 5, 2012 23:45 — forked from jo-snips/event-category-list.php
The Events Calendar: List Event Categories
<?php // If you'd rather have category drop downs ?>
<form action="#" method="get" id="event-change">
<?php
$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 = '';
@MikeNGarrett
MikeNGarrett / mysql(wp)-commands.txt
Created October 31, 2022 16:48 — forked from vishalkakadiya/mysql(wp)-commands.txt
WordPress(or any mysql database) - Convert special characters(eg. Latin-1) to UTF-8 in mysql database
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 ** //