Skip to content

Instantly share code, notes, and snippets.

View seanwash's full-sized avatar
🏠
Working from home

Sean Washington seanwash

🏠
Working from home
View GitHub Profile
@seanwash
seanwash / sgFixThatIsh.js
Created January 20, 2012 17:33 — forked from seangaffney/sgFixThatIsh.js
jQuery: Fix That Ish - A plugin for fixing things (one thing in particular) in the browser window. No support for IE8 and below.
/*
* jQuery sgFixThatIsh v0.1 :)
* http://seangaffney.cc
* Copyright 2012, Sean Gaffney
*/
(function( $ ){
var opts = { bottomPadding: 8 };
var $header, $content, $win;
var contWidth, currentContWidth, headHeight, headWidth,
@seanwash
seanwash / Wordpress Register Custom Post Type
Created July 19, 2012 14:58
Wordpress: Wordpress Register Custom Post Type
add_action( 'init', 'create_events' );
function create_events() {
$labels = array(
'name' => _x('Events', 'post type general name'),
'singular_name' => _x('Event', 'post type singular name'),
'add_new' => _x('Add New', 'Event'),
'add_new_item' => __('Add New Event'),
'edit_item' => __('Edit Event'),
'new_item' => __('New Event'),
'view_item' => __('View Event'),
@seanwash
seanwash / Retina Image Media Query.css
Created July 29, 2012 00:48
CSS: Retina Image Media Query
/* Retina
----------------------------------------------- */
@media only screen and (-webkit-min-device-pixel-ratio: 2),
only screen and (moz--min-device-pixel-ratio: 2),
only screen and (-o-min-device-pixel-ratio: 2/1),
only screen and (min-device-pixel-ratio: 2) {
@seanwash
seanwash / HTML Maintenance.html
Created August 3, 2012 15:29
HTML: Quick and dirty HTML Maintenance Page
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Maintenance</title>
<style>
::-moz-selection {
background: #b3d4fc;
text-shadow: none;
}
@seanwash
seanwash / gist:3606591
Created September 3, 2012 03:39
Wordpress: Remove Wordpress auto image height / width
// Removes the height & width that's automatically added
add_filter( 'post_thumbnail_html', 'remove_thumbnail_dimensions', 10 );
add_filter( 'image_send_to_editor', 'remove_thumbnail_dimensions', 10 );
function remove_thumbnail_dimensions( $html ) {
$html = preg_replace( '/(width|height)=\"\d*\"\s/', "", $html );
return $html;
}
@seanwash
seanwash / mediaqueries.css
Created December 12, 2012 00:44
Basic list of media queries. They inherit from Desktop -> Mobile
/* -- Media Queries ----------------------------------------------------- */
/* ---------------------------------------------------------------------- */
/* Large screens ----------- */
@media only screen
and (min-width : 1824px) {
/* Styles */
}
/* Desktops and laptops ----------- */
@seanwash
seanwash / Octopus King Crown Enchant
Last active December 27, 2015 19:39
Candybox 2 Current Progress
bool candiesThrownGotChocolateBar=true, bool candyBoxBoxOpened=false, bool castleBigRoomHovenHappy=false, bool castleRoom2LitFire=false, bool castleRoom2TookObject=false, bool castleTowerFirstVisitDone=false, bool castleTowerPStoneDone=false, bool castleTowerLStoneDone=false, bool castleTowerAStoneDone=false, bool castleTowerYStoneDone=false, bool castleTowerTookTalkingCandy=false, bool castleKilledNougatMonster=false, bool cellarDone=true, bool dragonDone=false, bool dragonUnlockedCyclops=false, bool forgeFoundLollipop=true, bool forgeBoughtWoodenSword=true, bool forgeBoughtIronAxe=true, bool forgeBoughtPolishedSilverSword=true, bool forgeBoughtLightweightBodyArmour=true, bool forgeBoughtScythe=false, bool fortressRoom1ChestFound=false, bool fortressRoom3ChestFound=false, bool fourthHouseFoundLollipopOnCupboard=true, bool gameDebug=false, bool gameInvertedColors=false, bool lighthousePuzzleDone=false, bool lollipopFarmPlant1LollipopButtonUnlocked=true, bool lollipopFarmPlant10LollipopsButtonUnlocked=true, bo
@seanwash
seanwash / setAllToMaxHeight.js
Created January 9, 2014 18:24
Set all items to a max height base on the elements.
$.fn.setAllToMaxHeight = function(){
return this.height( Math.max.apply(this, $.map( this , function(e){ return $(e).height() }) ) );
}
// usage: $(‘div.unevenheights’).setAllToMaxHeight()
@seanwash
seanwash / sliderCheckbox.coffee
Last active January 2, 2016 17:58
Sliding Checkbox plugin
# Usage
# $('element').sliderCheckbox()
# $('element').sliderCheckbox
# offLeft: int
$.fn.sliderCheckbox = (options) ->
settings = $.extend({
offLeft: -64
}, options)
date New York San Francisco
20111001 63.4 62.7
20111002 58.0 59.9
20111003 53.3 59.1
20111004 55.7 58.8
20111005 64.2 58.7
20111006 58.8 57.0
20111007 57.9 56.7
20111008 61.8 56.8
20111009 69.3 56.7