Skip to content

Instantly share code, notes, and snippets.

View eriwen's full-sized avatar

Eric Wendelin eriwen

View GitHub Profile
(function() {
var CSSCriticalPath = function(w, d, opts) {
var opt = opts || {};
var css = {};
var pushCSS = function(r) {
if(!!css[r.selectorText] === false) css[r.selectorText] = {};
var styles = r.style.cssText.split(/;(?![A-Za-z0-9])/);
for(var i = 0; i < styles.length; i++) {
if(!!styles[i] === false) continue;
var pair = styles[i].split(": ");
{
"id":"tag:search.twitter.com,2005:181865366610382848",
"body":"No one wants to carry laptops any more, but we lose IPads and they are not secure. The Sweden PM ran the country for a week on an ipad.",
"verb":"post",
"link":"http://twitter.com/ProfNikiEllis/statuses/181865366610382848",
"generator":{
"link":"http://twitter.com/#!/download/ipad",
"displayName":"Twitter for iPad"
},
"postedTime":"2012-03-19T22:10:56.000Z",
require "em-http-request"
EM.run {
http = EM::HttpRequest.new("http://localhost:1234/file.gz").get
http.errback { EM.stop }
http.callback { EM.stop }
}
@eriwen
eriwen / gist:1391529
Created November 24, 2011 15:02 — forked from robflaherty/gist:1129904
Stylus conversion of Normalize.css
/*
* Normalize.css converted to Stylus
* http://github.com/necolas/normalize.css
*/
article, aside, details, figcaption, figure, footer, header, hgroup, nav, section
display: block
audio, canvas, video
display: inline-block
@eriwen
eriwen / gist:187610
Created September 15, 2009 20:21 — forked from sanbornm/gist:177420
Pythonic site monitor
#!/usr/bin/env python
# sample usage: checksites.py eriwen.com nixtutor.com yoursite.org
import pickle, os, sys, logging
from httplib import HTTPConnection, socket
from smtplib import SMTP
def email_alert(message, status):
fromaddr = 'you@gmail.com'