Skip to content

Instantly share code, notes, and snippets.

View toolness's full-sized avatar

Atul Varma toolness

View GitHub Profile
@toolness
toolness / addon-sdk-eventlistener-bug.js
Created June 28, 2011 17:22
Add-on SDK bug whereby EventListener interfaces passed to addEventListener() don't get properly wrapped/proxied events
var myListener = {
handleEvent: function(event) {
// This produces e.g. [object XrayWrapper [object HTMLHtmlElement]],
// instead of [object HTMLHtmlElement].
console.log(event.target);
}
};
document.addEventListener("mouseover", myListener, true);
@toolness
toolness / popcorn-101-with-cornish.html
Created October 15, 2011 18:11
The Popcorn 101 demo with Cornish (no JS skills required).
<!doctype html>
<html>
<head>
<script src="http://popcornjs.org/code/dist/popcorn-complete.min.js"></script>
<script src="http://toolness.github.com/mas-bebe-itvs-sprint/cornish.js"></script>
</head>
<style>
.footnote { visibility: hidden; }
.footnote.active { visibility: visible; }
</style>
@toolness
toolness / popcorn-101-with-instapoppin.html
Created October 15, 2011 22:34
The Popcorn 101 demo with Instapoppin' (no JS skills required).
<!DOCTYPE html>
<html>
<head>
<script src="http://popcornjs.org/code/dist/popcorn-complete.min.js"></script>
<script src="http://toolness.github.com/instapoppin/instapoppin.js"></script>
</head>
<style>
.footnote { visibility: hidden; }
.footnote.active { visibility: visible; }
</style>
@toolness
toolness / lovebomb-tiny.html
Created December 21, 2011 17:20
lovebomb tiny
<header>A Love Bomb From Atul</header>
<section>
<img src="http://lovebomb.me/templates/atul-files/lovebomb.svg" alt="Love Bomb">
<p>This massive love bomb goes out to <a href="http://en.wikipedia.org/wiki/Tim_berners-lee">Tim Berners-Lee</a> for creating the world's largest <a href="http://en.wikipedia.org/wiki/World_Wide_Web">public resource</a> and working with others to make it as splendid as possible.</p>
<aside>
</section>
@toolness
toolness / gist:2344431
Created April 9, 2012 16:01
slowparse testing spec, take 1
<!DOCTYPE html>
<meta charset="utf-8">
<title>Test Suite</title>
<link rel="stylesheet" href="qunit.css">
<h1 id="qunit-header">QUnit example</h1>
<h2 id="qunit-banner"></h2>
<div id="qunit-testrunner-toolbar"></div>
<h2 id="qunit-userAgent"></h2>
<ol id="qunit-tests"></ol>
<div id="qunit-fixture"></div>
@toolness
toolness / gist:2353374
Created April 10, 2012 18:14
Inanimate Alice Mission
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<meta name="description" content="A mission that invites youth to creative a narrative based on characters and a storyline they create, while learning how to remix the web.">
<title>Inanimate Alice meets Hackasaurus</title>
</head>
<body>
<h1>Inanimate Alice meets Hackasaurus</h1>
<p>A user generated digital novel and Hackasaurus X-ray Goggles, what better tools to engage the future generation of webmakers! The mission is to teach the basics of coding through the lens of youth interest in storytelling. This challenge invites youth to creative a narrative based on characters and a storyline they create, while learning how to remix the web.</p>
<h2>How it's done</h2>

This is the content for the website at hackasaurus.org.

Prerequisites

You need Python version 2.6 or higher. All other dependencies are self-contained within the project's code repository.

Setup

<p>I am syntax-highlighted HTML!</p>
@toolness
toolness / server.py
Created April 27, 2012 15:57
A simple python server that busts it out from the current dir
#! /usr/bin/python
import os
import BaseHTTPServer
import SimpleHTTPServer
PORT = 8001
types = {
'.manifest': 'text/cache-manifest',
@toolness
toolness / livepreview.html
Created May 24, 2012 19:42
live preview test
<!DOCTYPE html>
<meta charset="utf-8">
<title>live preview test thing</title>
<style>
textarea {
display: block;
width: 100%;
min-height: 200px;
}