Skip to content

Instantly share code, notes, and snippets.

View twinsinsnippet's full-sized avatar

twinsinsnippet

View GitHub Profile
@twinsinsnippet
twinsinsnippet / jquery.ba-tinypubsub.js
Created April 28, 2012 04:53 — forked from cowboy/HEY-YOU.md
Javascript: Tiny PubSub
/* jQuery Tiny Pub/Sub - v0.7 - 10/27/2011
* http://benalman.com/
* Copyright (c) 2011 "Cowboy" Ben Alman; Licensed MIT, GPL */
(function($) {
var o = $({});
$.subscribe = function() {
o.on.apply(o, arguments);
@twinsinsnippet
twinsinsnippet / gist:2516095
Created April 28, 2012 04:51
HTML: Sticky Footer
/*
Sticky Footer Solution
by Steve Hatcher
http://stever.ca
http://www.cssstickyfooter.com
*/
@twinsinsnippet
twinsinsnippet / gist:2516092
Created April 28, 2012 04:50
CSS: Absolute Center (Vertical & Horizontal) an Image
/*CSS background-image Technique*/
html {
width:100%;
height:100%;
background:url(logo.png) center center no-repeat;
}
/*CSS + Inline Image Technique*/
img {
position: absolute;
top: 50%;
@twinsinsnippet
twinsinsnippet / gist:2515870
Created April 28, 2012 04:26 — forked from padolsey/gist:527683
Javascript: Detect IE
// ----------------------------------------------------------
// A short snippet for detecting versions of IE in JavaScript
// without resorting to user-agent sniffing
// ----------------------------------------------------------
// If you're not in IE (or IE version is less than 5) then:
// ie === undefined
// If you're in IE (>=5) then you can determine which version:
// ie === 7; // IE7
// Thus, to detect IE:
// if (ie) {}
@twinsinsnippet
twinsinsnippet / gist:2515796
Created April 28, 2012 04:23
HTML: Flash Object
<object type="application/x-shockwave-flash"
data="your-flash-file.swf"
width="0" height="0">
<param name="movie" value="your-flash-file.swf" />
<param name="quality" value="high"/>
</object>