Skip to content

Instantly share code, notes, and snippets.

@dpk
dpk / gist:646570
Created October 26, 2010 09:05
View Generated Source in BBEdit
-- based on John Gruber's original Safari Source in BBEdit script
-- http://daringfireball.net/2003/01/safari_source_in_bbedit
-- and duct tape
tell application "Safari" to set theSource to do JavaScript "window.document.documentElement.outerHTML" in document 1
tell application "BBEdit"
activate
make new text window with properties ¬
{contents:theSource, source language:"HTML"}
@gruber
gruber / gist:647224
Created October 26, 2010 16:26 — forked from dpk/gist:646570
Slight tweaks to dpkendal's script. Gives the BBEdit document a name (rather than "untitled <integer>", and skips the \n to \r stuff, which I don't think is necessary in recent versions of BBEdit.
tell application "Safari"
set _source to do JavaScript "window.document.documentElement.outerHTML" in document 1
set _name to name of document 1
end tell
tell application "BBEdit"
make new text window with properties ¬
{contents:_source, source language:"HTML", name:"Generated source: " & _name}
select insertion point before character 1 of text window 1
<!doctype html>
<!-- http://taylor.fausak.me/2015/01/27/ios-8-web-apps/ -->
<html>
<head>
<title>iOS 8 web app</title>
<!-- CONFIGURATION -->
@sippey
sippey / Louis-ck-email.md
Created November 3, 2012 22:40
Louis CK email

Hello. Its louis here. I'm clacking this to you on my phone in my dressing room here at studio 8H, right in 30 rockefeller center, in Manhattan, new york city, new york, america, world, current snapshot of all existence everywhere.

Tonight I'm hosting Saturday Night Live, something I zero ever in my life saw happening to me. And yet here it is completely most probably happening (I mean, ANYTHING could NOT happen. So we'll see).

I've been working here all week with the cast, crew, producers and writers of SNL, and with Lorne Michaels. Such a great and talented group of people.

And here we are in the middle of New York City, which was just slammed by a hurricane, leaving behind so much trouble, so much difficulty and trauma, which everyone here is still dealing with every day.

Last night we shot some pre-tape segments in greenwich Village, which was pitch black dark for blocks and blocks, as it has been for a week now.

import json
import urllib
import urllib2
import time
""" Nike plus activity log
https://developer.nike.com
Output:
-- May --
@nickcernis
nickcernis / mailchimp-popup-for-wordpress.md
Last active July 28, 2022 14:49
MailChimp Popup Script that works with WordPress sites

MailChimp's default popup scripts can break on WordPress sites that use jQuery/jQuery UI unless you include their embed code as the final elements before the closing body tag.

Including them in this way isn't always possible or easy with WordPress.

The code below is an alternative implementation of the loader that forces MailChimp's popup scripts to appear below all other scripts upon page load.

To use it, modify the baseUrl, uuid, and lid attributes with the ones from the original popup script that MailChimp supplies.