Skip to content

Instantly share code, notes, and snippets.

@WideSolution
WideSolution / gist:2145735
Created March 21, 2012 09:12 — forked from danilowm/gist:1070332
CSS: CSS Reset
/* http://meyerweb.com/eric/tools/css/reset/
v2.0 | 20110126
License: none (public domain)
*/
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,
@WideSolution
WideSolution / gist:2042954
Created March 15, 2012 08:35
JavaScript: jQuery Pubsub
(function($) {
var o = $( {} );
$.each({
on: 'subscribe',
trigger: 'publish',
off: 'unsubscribe'
}, function( key, api ) {
$[api] = function() {
o[key].apply( o, arguments );
@WideSolution
WideSolution / gist:2042951
Created March 15, 2012 08:35
CSS: Image Replacement
.ir {
border:0;
font: 0/0 a;
text-shadow: none;
color: transparent;
background-color: transparent;
}
@WideSolution
WideSolution / gist:2042924
Created March 15, 2012 08:26
CSS: box-sizing
/*
apply a natural box layout model to all elements
source: http://paulirish.com/2012/box-sizing-border-box-ftw/
*/
* {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
@WideSolution
WideSolution / chromeframe.html
Created March 13, 2012 09:41 — forked from JeffreyWay/chromeframe.html
HTML: Chrome Frame Prompt
<!-- 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]-->
@WideSolution
WideSolution / gist:2027859
Created March 13, 2012 09:40 — forked from JeffreyWay/gist:1544440
BASH: Local XHR in Chrome
# Add to ~/.bash_profile
function chrome() {
open $@ --args --allow-file-access-from-files
}
# Usage - chrome index.html
# now you don't have to worry about those pesky local XHR issues in Chrome.
@WideSolution
WideSolution / Backup of CSS-Tricks .htaccess
Created March 13, 2012 09:34 — forked from chriscoyier/Backup of CSS-Tricks .htaccess
HtAccess: WordPress General HtAccess
# BEGIN W3 Total Cache
<IfModule mod_rewrite.c>
SetEnvIfNoCase Accept-Encoding (gzip) APPEND_EXT=.$1
RewriteEngine On
RewriteCond %{REQUEST_URI} !\/wp-admin\/|\/xmlrpc.php|\/wp-(app|cron|login|register).php|/video-feed/|/video-feed-iphone/ [OR]
RewriteCond %{REQUEST_URI} wp-comments-popup\.php|wp-links-opml\.php|wp-locations\.php [NC]
RewriteCond %{REQUEST_METHOD} !=POST
RewriteCond %{QUERY_STRING} =""
RewriteCond %{HTTP_COOKIE} !comment_author|wp-postpass|wordpress_\[a-f0-9\]\+|wordpress_logged_in [NC]
RewriteCond %{HTTP_USER_AGENT} !bot|ia_archive|slurp|crawl|spider [NC]