Skip to content

Instantly share code, notes, and snippets.

View dvsqz's full-sized avatar

David Vasquez dvsqz

  • Los Angeles, CA
View GitHub Profile
@daniellmb
daniellmb / onerror.js
Last active July 12, 2020 13:30
Automagically look up JavaScript errors on Stack Overflow ;-)
window.onerror = function(message) {
top.location.href = 'http://stackoverflow.com/search?q=' +
encodeURIComponent(message + ' [js]');
};
@justincarroll
justincarroll / bootstrap-masonry-template.htm
Last active August 15, 2020 16:48
This is my template for using Masonry 3 with Bootstrap 3. For those of you who follow this gist a lot has changed since Bootstrap 2.
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Bootstrap Masonry Template</title>
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=PT+Sans+Caption:400,700">
@joeldbirch
joeldbirch / supposition.js
Created April 12, 2013 12:22
Updated version of Supposition. This version is compatible with Superfish 1.6+. See this ancient page for description, example and caveats: http://users.tpg.com.au/j_birch/plugins/superfish/supposition-test/
/*
* Supposition v0.3a - an optional enhancer for Superfish jQuery menu widget
*
* Copyright (c) 2013 Joel Birch - based on work by Jesse Klaasse - credit goes largely to him.
* Special thanks to Karl Swedberg for valuable input.
*
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*/
@joelclermont
joelclermont / gist:3735026
Created September 17, 2012 00:56
using yepnope for twitter js and css with local fallback
function cssLoaded(href) {
var cssFound = false;
for (var i = 0; i < document.styleSheets.length; i++) {
sheet = document.styleSheets[i];
if (sheet['href'].indexOf(href) >= 0 && sheet['cssRules'].length > 0) {
cssFound = true;
}
};