Instantly share code, notes, and snippets.

View inline-svg-scale
.img-svg { width:100%; height: auto; }
<img class="img-svg" src="box.svg" />
View .gitignore
# Windows image file caches
# Folder config file
# Recycle Bin used on file shares
View scrollTo.js
// source:
var this_offset = $(this).offset();
var that_id = $(this).attr("href");
var that_offset = $(that_id).offset();
var offset_diff = Math.abs( -;
View matchHeight.js
function getWindowWidth2() {
return window.innerWidth || document.body.clientWidth;
myMatchHeight('.sameHeight1'); // first group of things I want the same height
myMatchHeight('.sameHeight2'); // second group of things I want the same height
View raquo.html
<!doctype html>
<meta charset="utf-8">
<style type="text/css">
a:hover, a:active{text-decoration:underline;}
font-family:Arial, Helvetica, sans-serif;
View index.html
<!DOCTYPE html>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>Bootstrap 101 Template</title>
<link rel="shortcut icon" href=""><!-- removes error in console if you don't have a favicon -->
View calc.html
<!doctype html>
<meta charset="utf-8">
<script src="//"></script>
function loadMyJson() {
return $.getJSON('_config.json');
View youtube embed and link
View onePageAspNet.aspx
<%@ Import Namespace="System.IO" %>
<%@ Import Namespace="System.Data" %>
<%@ Page Language="C#" Debug="true" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<script language="C#" runat="server">
void Page_Error(Object source, EventArgs e)
View gist:952b0385b59c559846ff
issue: padding and margin on the img tag don't work in Outlook 2007
use the old hspace="8" on the image (which will add the spacing that you want on outlook) then add margin-left="0px" to trim off the extra on the side that you don't want. Unfortunately this will still have the extra spacing on the side that you don't want for Outlook 2007 but the other email clients will be ok.