Skip to content

Instantly share code, notes, and snippets.

@kevinkatzke
kevinkatzke / gist:3124541
Created July 16, 2012 19:32 — forked from lucasfais/gist:1207002
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
@kevinkatzke
kevinkatzke / style.css
Created March 25, 2012 19:06
CSS: Starting Template
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
@kevinkatzke
kevinkatzke / style.css
Created March 23, 2012 14:37
CSS: Reset CSS
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
@kevinkatzke
kevinkatzke / gist:2137972
Created March 20, 2012 16:33
CSS: Helfer Klassen "clearfix"
/*****Helfer Klassen*****/
.clear {clear: both;margin: -1px 0 0 0;height: 0;font-size: 0;line-height: 0;width: 100%;}
.ahem {position: absolute;overflow: hidden;height: 0;width: 0;left: -1000px;top: -1000px;}
.clearfix:after {content: ".";display: block;height: 0;line-height: 0;font-size: 0; clear: both;visibility: hidden;}
.clearfix {display: block;}
* + html .clearfix {display: inline-block;}
* html .clearfix {height: 1%;}
@kevinkatzke
kevinkatzke / gist:2044678
Created March 15, 2012 15:03
WP: New Theme Template
/*
Theme Name:
Theme URI:
Description:
Version:1.0
Author:
Tags:
*/
@kevinkatzke
kevinkatzke / gist:2030112
Created March 13, 2012 17:38
HTML5: IE Support
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
@kevinkatzke
kevinkatzke / gist:1989582
Created March 6, 2012 22:55
JavaScript: Sexy PubSub
// Works in modern browsers + IE9, but Modernizr has a polyfill baked in for function.bind.
// Hat tip Paul Irish
var o = $( {} );
$.subscribe = o.on.bind(o);
$.unsubscribe = o.off.bind(o);
$.publish = o.trigger.bind(o);
@kevinkatzke
kevinkatzke / gist:1989581
Created March 6, 2012 22:54
CSS: Image Replacement
.ir {
border:0;
font: 0/0 a;
text-shadow: none;
color: transparent;
background-color: transparent;
}
@kevinkatzke
kevinkatzke / gist:1989580
Created March 6, 2012 22:54
JavaScript: jQuery Pubsub
(function($) {
var o = $( {} );
$.each({
on: 'subscribe',
trigger: 'publish',
off: 'unsubscribe'
}, function( key, api ) {
$[api] = function() {
o[key].apply( o, arguments );
@kevinkatzke
kevinkatzke / gist:1989578
Created March 6, 2012 22:54
HTML: Prompt Chrome Frame
<!-- Prompt IE6 users to install Chrome Frame -->
<!--[if lt IE 7 ]>
<script src="//ajax.googleapis.com/ajax/libs/chrome-frame/1.0.3/CFInstall.min.js"></script>
<script>window.attachEvent('onload',function(){CFInstall.check({mode:'overlay'})})</script>
<![endif]-->