Skip to content

Instantly share code, notes, and snippets.

View samuelcotterall's full-sized avatar

Samuel Cotterall samuelcotterall

View GitHub Profile
.clear {clear:both;display:block;height:0pt !important;overflow:hidden;position:relative;width:auto;}
<!--
If the week view relies only on the user entering an H2...
-->
<td class="content">
<h3 class="weekdates">25 September - 1 October</h3>
<div class="summary">
<h2>Intro to Web Site Design</h2>
@samuelcotterall
samuelcotterall / gist:1156443
Created August 19, 2011 09:30
For Gemma…
To fix the width; find "width:47%;" and change it to "width:auto;" -- it is in this line:
#header{margin:0;border:0 solid $bordercolor;color:$pagetitlecolor;float:left;width:47%;overflow:hidden;}
I don’t know if this is intentional or not, but to fix the overlap hidden thing; change "padding:30px 0px;" to "padding:0 0 100px 0;" -- it is in this line:
@samuelcotterall
samuelcotterall / loop-increments-decremenet
Created September 9, 2011 14:27
Loop: Increment & Decrement
for (vari=0, j=len=items.length; i<len || j===0; i++, j--) {
console.log(i,j);
}
@samuelcotterall
samuelcotterall / bbedit-jsl
Created September 14, 2011 07:35
BBEdit JavaScript Lint
-- Based on John Gruber's PHP Syntax Checking script
-- from Daring Fireball
-- http://daringfireball.net/2003/12/php_syntax_checking_in_bbedit
-- Requires JavaScript Lint
-- http://www.javascriptlint.com/
-- Assumes it is installed at /usr/local/bin/jsl
-- requires OS >=10.4
-- Dual-licensed under the BSD or MIT licenses.
ORIGINAL:
<!--[if IEMobile 7]><html class="no-js iem7 oldie"><![endif]-->
<!--[if lt IE 7]><html class="no-js ie6 oldie" lang="en"><![endif]-->
<!--[if (IE 7)&!(IEMobile)]><html class="no-js ie7 oldie" lang="en"><![endif]-->
<!--[if (IE 8)&!(IEMobile)]><html class="no-js ie8 oldie" lang="en"><![endif]-->
<!--[if gt IE 8]><!--><html class="no-js" lang="en"><!--<![endif]-->
<!--[if (gte IE 9)|(gt IEMobile 7)]><!--><html class="no-js" lang="en"><!--<![endif]-->
XSLT:
/*
Learn to code with Kelis' Milkshake
http://en.wikipedia.org/wiki/Milkshake_(song)
Created by Brendan Dawes brendandawes.com
Modified by Samuel Cotterall samuelcotterall.com
*/
// "my milkshake brings all the boys to the yard"
var milkShake,
@samuelcotterall
samuelcotterall / Textmate2 Compatible.tmPreferences
Created January 20, 2012 15:16
JavaScript JSLintMate.tmbundle workaround
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>changed</key>
<dict>
<key>name</key>
<string>Textmate2 Compatible</string>
<key>settings.shellVariables</key>
<array>
@samuelcotterall
samuelcotterall / Textmate2 Compatible.tmPreferences
Created January 20, 2012 15:16
JavaScript JSLintMate.tmbundle workaround
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>changed</key>
<dict>
<key>name</key>
<string>Textmate2 Compatible</string>
<key>settings.shellVariables</key>
<array>
@samuelcotterall
samuelcotterall / gist:1717571
Created February 1, 2012 15:37
Preload example
<div style="display: none;">
<img src=”image1.png” />
<img src=”image2.png” />
<img src=”image3.png” />
</div>