Skip to content

Instantly share code, notes, and snippets.

View rhinkle's full-sized avatar

Ryan rhinkle

  • Inspire11
  • Grand Rapids, Mi
View GitHub Profile
@rhinkle
rhinkle / gist:e180520553876d42a9d2
Created August 26, 2014 19:41
Hover intent work-errrr round.
if($('html').hasClass('touch') && $('#menu-main-menu').not().hasClass('open')){
$('ul#menu-main-menu li.dropdown > a').bind('touchstart ', function(e) {
if($(this).hasClass('touch_active')){
//go to link
$(this).toggleClass('active touch_active').parent('li').find('ul.sub-menu').toggleClass('drop');
}else{
e.preventDefault();
$(this).toggleClass('active touch_active').parent('li').find('ul.sub-menu').toggleClass('drop');
}
@rhinkle
rhinkle / adv_text.widget.php
Created August 26, 2014 14:50
Adv Text Widget
<?php
/*
Plugin Name: Mindutopia Advanced Text Widget
Plugin URI: http://mindutopia.com
Description: Custom Widget(s)
Author: Mindutopia
Version: 1.0
Author URI: http://mindutopia.com
*/
@rhinkle
rhinkle / Wordpress Setup Script
Last active August 29, 2015 14:04
Wordpress install setup
#!/bin/bash
wp plugin install 'Contact form 7';
wp plugin install 'Regenerate Thumbnails';
wp plugin install 'Bulk Creator';
wp plugin activate 'contact-form-7' 'regenerate-thumbnails' 'bulk-creator';
wp post create /vagrant/html_ipsum.txt --post_type=page --menu_order=1 --post_status=publish --post_title='Home';
wp post create /vagrant/html_ipsum.txt --post_type=page --menu_order=2 --post_status=publish --post_title='About us';
@rhinkle
rhinkle / Update Sever Names
Last active August 29, 2015 14:01
Update Sever Names for Wordpress tables
UPDATE wp_posts_table SET post_content = REPLACE( post_content, 'oldurlhere', 'newurlhere' );
UPDATE wp_posts_table SET guid = REPLACE( guid, 'oldurlhere', 'newurlhere' );
UPDATE wp_posts_table SET post_excerpt = REPLACE( post_excerpt, 'oldurlhere', 'newurlhere' );
@rhinkle
rhinkle / Media Temple Site live
Last active August 29, 2015 14:01
Media Temple Site live .httaccess
<IfModule mod_expires.c>
# Enable expirations
ExpiresActive On
# Default directive
ExpiresDefault "access plus 1 month"
# My favicon
ExpiresByType image/x-icon "access plus 1 year"
# Images
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/png "access plus 1 month"