Skip to content

Instantly share code, notes, and snippets.

View voidfiles's full-sized avatar

Alex Kessinger voidfiles

View GitHub Profile
@voidfiles
voidfiles / textrank.py
Created January 20, 2012 08:22
An implmentation of TextRank in python
"""
From this paper: http://acl.ldc.upenn.edu/acl2004/emnlp/pdf/Mihalcea.pdf
I used python with nltk, and pygraph to do an implmentation of of textrank.
for questions: http://twitter.com/voidfiles
"""
import nltk
import itertools
@voidfiles
voidfiles / gist:2289046
Created April 3, 2012 03:22
Simplenotes new iOS URL scheme
Hey Alex, there aren't any docs yet. Here's the info:
simplenote://new?content=encodedContent&tag=encodedTag
The parameters are optional. If omitted, Simplenote will open to a new, blank note.
@voidfiles
voidfiles / gist:2859704
Created June 2, 2012 19:38
Instapaper's Bookmarklet as of June 2, 2010
// Bookmarklet portion
javascript: function iprl5() {
var d = document,
z = d.createElement('scr' + 'ipt'),
b = d.body,
l = d.location;
try {
if (!b) throw (0);
@voidfiles
voidfiles / gist:2859725
Created June 2, 2012 19:43
Pinterest's Bookmarklet as of June 2, 2010
// The bookmarklet portion
javascript: void((function() {
var e = document.createElement('script');
e.setAttribute('type', 'text/javascript');
e.setAttribute('charset', 'UTF-8');
e.setAttribute('src', 'http://assets.pinterest.com/js/pinmarklet.js?r=' + Math.random() * 99999999);
document.body.appendChild(e)
})());
// The code that gets loaded in
@voidfiles
voidfiles / gist:2860137
Created June 2, 2012 22:06
Get Pocket Bookmarklet
// The Bookmarklet
javascript: (function() %
7BISRIL_H = '8e7a';
PKT_D = 'getpocket.com';
ISRIL_SCRIPT = document.createElement('SCRIPT');
ISRIL_SCRIPT.type = 'text/javascript';
ISRIL_SCRIPT.src = 'http://' + PKT_D + '/b/r.js';
document.getElementsByTagName('head') % 5B0 % 5D.appendChild(ISRIL_SCRIPT) % 7D)();
@voidfiles
voidfiles / gist:2860165
Created June 2, 2012 22:11
Findings Bookmarklet
javascript: e = document.createElement('script');
e.setAttribute('type', 'text/javascript');
e.setAttribute('src', '//findings.com/bookmarklet/loader');
document.body.appendChild(e);
void(0);
(function(window, undefined) {
var date = new Date();
window.FDGS = window.FDGS || {
@voidfiles
voidfiles / tumblr_bookmarklet
Created June 2, 2012 22:28
Tumblr's Bookmarklet
javascript: var d = document,
w = window,
e = w.getSelection,
k = d.getSelection,
x = d.selection,
s = (e ? e() : (k) ? k() : (x ? x.createRange().text: 0)),
f = 'http://www.tumblr.com/share',
l = d.location,
e = encodeURIComponent,
p = '?v=3&u=' + e(l.href) + '&t=' + e(d.title) + '&s=' + e(s),
@voidfiles
voidfiles / posterouss_bookmarklet.js
Created June 2, 2012 22:31
Posterous's Bookmarklet
// Bookmarklet
javascript: var % 20b = document.body;
var % 20POSTEROUS___bookmarklet_domain = 'http://posterous.com';
var % 20d = new % 20Date();
var % 20e = (new % 20Date(d.getFullYear(), d.getMonth(), d.getDate())).getTime();
if (b && !document.xmlVersion) {
void(z = document.createElement('script'));
void(z.type = 'text/javascript');
void(z.src = 'http://posterous.com/javascripts/bookmarklet2.js?' + e);
void(b.appendChild(z));
@voidfiles
voidfiles / clipboards_bookmarklet.js
Created June 2, 2012 22:39
Clipboard.com's Bookmarklet
// Bookmarklet
javascript: (function(a) {
var b = a.document;
try {
a.CLIPBOARD.client.Clipper.instances["_d09a13b8af38e2f71b4f1626c07e1c42"].activate();
return
} catch(e) {}
var c = b.createElement("script"),
d = b.getElementsByTagName("head")[0],
a = a.location.protocol;
@voidfiles
voidfiles / subscriber.html
Created June 16, 2012 19:59
Simple Javascript Event Delegation
<html>
<head>
<title>Subscriber Test Page</title>
<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.8.0r4/build/reset-fonts-grids/reset-fonts-grids.css">
<style type="text/css" media="screen">
body {
font-family: Myriad Pro, Helvetica, Arial;
font-size:138.5%;
}
h1 {