This file contains hidden or 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 slug = require('slug'); | |
| console.log(slug('Ȁ ȁ Ȃ ȃ Ȅ ȅ Ȇ ȇ Ȉ ȉ Ȋ ȋ Ȍ ȍ Ȏ ȏ Ȑ ȑ Ȓ ȓ Ȕ ȕ Ȗ')); | |
| // '' |
This file contains hidden or 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
| this.on('change', function () { | |
| changes.push(this.previousAttributes()); | |
| }); | |
| undo: function () { | |
| undone.push(this.toJSON()); | |
| this.set(changes.pop()); | |
| }; | |
| redo: function () { |
This file contains hidden or 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
| # Disable gesture navigation only in Chrome | |
| # http://apple.stackexchange.com/a/80163/53921 | |
| defaults write com.google.Chrome.plist AppleEnableSwipeNavigateWithScrolls -bool FALSE | |
| # Make Finder display "hidden" files and folders | |
| # like ~/.ssh | |
| defaults write com.apple.finder AppleShowAllFiles TRUE | |
| # Apache in Mountain Lion | |
| # http://reviews.cnet.com/8301-13727_7-57481978-263/how-to-enable-web-sharing-in-os-x-mountain-lion/ |
This file contains hidden or 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()) { |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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); | |
| } |