Skip to content

Instantly share code, notes, and snippets.

@edelabar
edelabar / bourbon-neat-bitters-and-gist-widgets.css
Created Sep 4, 2014
CSS to Fix Gist Embed with Bourbon, Neat, and Bitters
View bourbon-neat-bitters-and-gist-widgets.css
// Fix gist widget displays
.gist table {
table-layout: auto;
margin: 0;
}
View gist:2028195
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.com
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query
* Source: http://core.trac.wordpress.org/browser/tags/3.3.1/wp-includes/query.php
*/
$args = array(
@edelabar
edelabar / CreateIndexedDB.js
Created Sep 30, 2011
Example JavaScript for working with HTML5 IndexedDB
View CreateIndexedDB.js
var v = "1.0."+(new Date()).getTime();
var iDB = window.webkitIndexedDB || window.mozIndexedDB;
var oReq = iDB.open("myDB");
oReq.onsuccess = function(event) {
db = event.result || event.target.result;
var vReq = db.setVersion(v);
console.log(vReq);
vReq.onsuccess = function(e) {
View in-beginning-there-was-doctype.fifth.html
<link rel="stylesheet" type="text/css" href="/style/screen.css" media="screen"/>
<!-- [if lte IE 6]>
<link rel="stylesheet" type="text/css" href="/style/iefix_screen.css" media="screen"/>
<![endif]-->
View weird-borders-ie.before.css
.container {
width: 420px;
}
.content {
border: solid 10px #3570d6;
background: white url( background_invert.gif ) left center no-repeat;
}
.left {
float: left;
width: 200px;
View large-forms-performance.after.js
var PhotoSelector = Class.create();
PhotoSelector.prototype = {
initialize: function( name ) {
var init = new Benchmark();
init.start();
console.debug( "Beginning Initialization!" );
this.old = 0;
var totals = {
fourby: $("fourby"),
View metaprogramming-javascript.js
var Aspect = Class.create();
Aspect.prototype = {
initialize: function( clazz, before, after ) {
var members = Object.keys( clazz.prototype );
members.each(
function( name ) {
if( Object.isFunction( clazz.prototype[name] ) ) {
var oldName = "old_" + name;
clazz.prototype[oldName] = clazz.prototype[name];
clazz.prototype[name] = function() {
View progressive-enhancement-lightwindow.js
Event.observe( window, "load",
function(e) {
$$('.lightwindow').each(
function( elem ) {
if( elem.href ) {
if( elem.href.indexOf('?') == -1 ) {
elem.href += '?';
}
elem.href += "lightwindow=true";
}
View more-on-identity.html
<meta name="microid" content="mailto+http:sha1:53410a9d6d408f3a92288a6543f16f4a9703ceea"/>
View javascript-getelementbyid-performance.after.js
var myId = document.getElementById("myId");
if( myId.style.display.toLowerCase() == 'none' ) {
myId.style.color = 'red';
myId.style.height = '10px';
myId.style.width = '100px';
myId.style.display = 'block';
}