This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE `postmeta` ( | |
`post_id` char(16) NOT NULL, | |
`user_id` bigint(20) unsigned NOT NULL, | |
`postmeta_read` bit(2) NOT NULL DEFAULT b'0', | |
`postmeta_starred` bit(2) NOT NULL DEFAULT b'0', | |
`postmeta_liked` bit(2) NOT NULL DEFAULT b'0', | |
`postmeta_shared` bit(2) NOT NULL DEFAULT b'0', | |
`postmeta_lastupdated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, | |
`postmeta_cache` longtext, | |
`postmeta_annotation` longtext, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DELETE `posts`,`postmeta` FROM `posts` LEFT JOIN `postmeta` USING (`post_id`) | |
WHERE `postmeta_read` IS NULL OR | |
(`postmeta_read`=b'10' | |
AND `postmeta_liked`<1 | |
AND `postmeta_starred`<1 | |
AND `postmeta_shared`<1 | |
AND DATEDIFF(CURDATE(),FROM_UNIXTIME(`posts`.`post_pubdate`)) > 14); | |
OPTIMIZE TABLE `posts`,`postmeta`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Ignore everything in this directory | |
* | |
# Except this file | |
!.gitignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function sanitizeQuerystring (url){ | |
var Url = require('url'); | |
var u = Url.parse(url, true); | |
delete u.search; | |
for (var key in u.query){ | |
/^utm_/.test(key) && delete u.query[key]; | |
} | |
return Url.format(u); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[{"title":"Techmeme","xmlUrl":"http://www.techmeme.com/feed.xml"},{"title":"Sam Ruby","xmlUrl":"http://intertwingly.net/blog/index.atom"},{"title":"Lethal Librarian","xmlUrl":"http://www.lethal-librarian.net/?feed=rss2"},{"title":"inessential.com","xmlUrl":"http://inessential.com/xml/rss.xml"},{"title":"Amyloo","xmlUrl":"http://hosting.opml.org/amyloo/blog/rss.xml"},{"title":"bits & bytes & pixels & sprites","xmlUrl":"http://www.bitsbytespixelssprites.com/blog/feed/"},{"title":"Bad Gods","xmlUrl":"http://badgods.com/rss.xml"},{"title":"Geek's Guide to the Galaxy","xmlUrl":"http://io9.com/podcast.xml"},{"title":"Writing (3)","xmlUrl":"http://www.quicktopic.com/36/H/QaFaSkQcyBG.rss"},{"title":"Ficlets Blog","xmlUrl":"http://ficlets.com/blog/feed"},{"title":"Achewood","xmlUrl":"http://achewood.com/rss.php"},{"title":"Achewood","xmlUrl":"http://www.achewood.com/rss.php"},{"title":"Auralgasms News","xmlUrl":"http://www.auralgasms.com/AuralgasmsNews.xml"},{"title":"100 Word Stories","xmlUrl":"http://100wordstories. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
DATE=`date +'%Y-%m-%d'` | |
HEAD="\nn.n.n / $DATE \n==================\n\n" | |
function gcl () { | |
version=$(git describe --tags --abbrev=0 $(git rev-list --tags --max-count=1)) | |
if test -z "$version"; then | |
git log --no-merges --pretty="format: * %s (%an)" | |
else |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var chain = module.exports = function(x, fns){ | |
for (var i=0, l=fns.length; i < l; i++){ | |
x = fns[i](x); | |
} | |
return x; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var $target = $('div.divExplanation:first'); | |
var $dl = $('<div></div>', { 'class': 'divExplanation' }); | |
$dl.prepend($('<a></a>', { | |
'class': 'saveCopy', // IE 8 bug with the "class" attr requires quotes | |
href: '#', | |
title: 'Click here to save a copy of your Little Outline', | |
download: 'myLittleOutline.opml', | |
text: 'Download Your Litte Outline' | |
})); | |
$dl.insertBefore($target); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env node | |
var feedparser = require( 'feedparser' ); | |
var request = require( 'request' ); | |
var feedTest = function (url){ | |
var object = {}; | |
object.articles =[]; | |
request( url, {timeout: 20000}, function(error, resp, body){ | |
if (error){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fs = require('fs') | |
, feedparser = require('feedparser'); | |
var str = fs.readFileSync('./rss2sample.xml', 'utf-8') | |
, parser = new feedparser(); | |
parser.on('error', console.error) | |
.on('readable', function () { | |
var stream = this, item; | |
while (item = stream.read()) { |