Skip to content

Instantly share code, notes, and snippets.

cat /dev/urandom > index.html
<!DOCTYPE html >
<html lang="en-au">
<head>
<title>HTML5 Shiv Test</title>
<!-- Which is worse? Inlined script or extra HTTP request? Only the llama knows. -->
<!--[if lte IE 8]><script type="text/javascript">var e=['abbr','article','aside','audio','canvas','details','figcaption','figure','footer','header','hgroup','mark','menu','meter','nav','output','progress','section','summary','time','video'],i=21,d=document;while(i--)d.createElement(e[i])</script><![endif]-->
<style type="text/css">
section { display: block; padding: 0 1em; border: 3px solid #0c0; background: #cfc; color: #0a0; }
</style>
</head>
A couple of examples of lists copied & pasted from Word into a browser-based WYSIWYG editor.
Ordered lists:
<p class="MsoListParagraphCxSpFirst" style="text-indent: -18pt;"><!--[if !supportLists]--><span style="" lang="EN-AU"><span style="">1.<span style="font-family: &quot;Times New Roman&quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal; -x-system-font: none;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><!--[endif]--><span lang="EN-AU">Point 1</span></p>
<p class="MsoListParagraphCxSpMiddle" style="text-indent: -18pt;"><!--[if !supportLists]--><span style="" lang="EN-AU"><span style="">2.<span style="font-family: &quot;Times New Roman&quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal; -x-system-font: none;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><!--[endif]--><span l
# Tweets the currently playing song from iTunes
# Requirements:
# Grackle: http://github.com/hayesdavis/grackle/tree/master
# rb-itunes: http://rubyforge.org/projects/rb-itunes/
require 'rubygems'
require 'rb-itunes'
require 'grackle'
@@delay = 1 # in seconds
<!--
Shows the areas defined by image maps.
Probably only works with poly & rect shapes at the moment.
Click a shape to see attributes.
I may create a bookmarklet from this if I get motivated enough.
-->
<script src="http://jscdn.net/jquery.js" type="text/javascript"></script>
<script src="http://jscdn.net/raphael.js" type="text/javascript"></script>
<script type="text/javascript">
jQuery.noConflict();
<html><head><title/></head><body><style type="text/css">
body {
background:#333;
}
div {
width:100px;
height:100px;
position: absolute;
top: 50px;
left: 300px;
ENV["I_LIKE_METHOD_ALIAS_CHAIN"] = "true"
require 'rubygems'
require 'haml'
# performance optimizations.
load 'paml.rb'
require 'hoe'