Skip to content

Instantly share code, notes, and snippets.

View tylor's full-sized avatar

Tylor Sherman tylor

View GitHub Profile
@tinabeans
tinabeans / template.html
Last active February 13, 2024 09:18
A super-barebones single-column responsive email template, assuming a max-width of 540px. Read about it on the Fog Creek blog.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Single-Column Responsive Email Template</title>
<style>
@media only screen and (min-device-width: 541px) {
.content {
@murtaugh
murtaugh / 1. single-line.html
Last active April 21, 2021 16:23
Blockquote patterns for ALA
<figure class="quote">
<blockquote>It is the unofficial force—the Baker Street irregulars.</blockquote>
</figure>
@springmeyer
springmeyer / tileseed.js
Created March 12, 2011 02:08
test seed script for tilelive
#!/usr/bin/env node
// To test run from tilelive.js master checkout:
// ./bin/node ./bin/carto files/project/k12_county_stats/k12_county_stats.mml > k12_county_stats.xml
// time ./bin/node ./seedtest/tileseed.js k12_county_stats.xml 1 CNTY_FIPS k12_z12_test.mbtiles
var sys = require('sys'),
Step = require('step'),
TileBatch = require('tilelive').TileBatch;
#!/bin/bash
set -e -u
# 1. render each layer of each zoom level
# 2. combine each layer of each zoom level to one image in a specified manner
# 3. cut each layer into
#### CONFIGURATION ####
ZMIN=0
@igrigorik
igrigorik / webapp.rb
Created November 13, 2010 21:28
Inspired by @JEG2's talk at Rubyconf... Any ruby object, as a webapp! 'Cause we can. :-)
require 'rubygems'
require 'rack'
class Object
def webapp
class << self
define_method :call do |env|
func, *attrs = env['PATH_INFO'].split('/').reject(&:empty?)
[200, {}, send(func, *attrs)]
end
// BlackBerry Geolocation. Tested w/ 4.6.0.297.
// http://docs.blackberry.com/en/developers/deliverables/1143/browser_devguide.pdf
if (window.blackberry && blackberry.location && blackberry.location.GPSSupported) {
var AUTONOMOUS_AID_MODE = 2;
function win() {
clearTimeout(failTimeoutId);
blackberry.location.removeLocationUpdate(win);
alert(blackberry.location.latitude + " : " + blackberry.location.longitude);
}
.mouse, #preview{
position: absolute;
background-repeat: no-repeat;
height: 22px;
min-width: 15px;
z-index: 100;
}
.mouse{
background-image: url('../images/cursor.png');