JQuery RedditLoader 2.1.0 Download
Load images, Imgur Albuns, Youtube videos, and Articles (beta) of Reddit links, loading only when the previous content was loaded
###Livedemo http://redditmobile.blogspot.com.br
###Dependencies
- JQuery
| xpc: Sent data to checkout.restxpc.slave.handle | |
| xpc: Sent data to checkout.restxpc.master.handle | |
| xpc: Attempting to establish channel | |
| Thu Nov 17 15:18:48 GMT-600 2011 CrossDomainLogger | |
| WARNING: {"duration":{"name":"total", "start":134685, "end":136258, "childSegments":[{"name":"ServerCall", "start":134685, "end":135365, "childSegments":[]}]}, "name":"PurchaseFlowCreate"} | |
| Page Loaded! | |
| INFO: Injected script get command 'fvd_get_videos' | |
| INFO: Injected script get command 'fvd_get_videos' | |
| INFO: Injected script get command 'fvd_get_videos' | |
| INFO: Injected script get command 'fvd_get_videos' |
| // $r = redis client | |
| // $f = util.format | |
| function createUser(username, email, password, cb) { | |
| $r.incr('users.count', function(err, id) { | |
| if (err) return cb(err) | |
| $r.set($f('username.to.id:%s', username.toLowerCase()), id, function(err) { | |
| if (err) return cb(err) | |
| var user = {id: id, username: username, email: email} | |
| getRandom(function(err, salt) { |
| (function(CollectionPrototype, ModelPrototype, slice) { | |
| var monkeyPatch = function(prototype, name) { | |
| var method = prototype[name]; | |
| prototype[name] = function() { | |
| var | |
| args = slice.call(arguments) | |
| ,length = args.length | |
| ,options = length && length >= method.length && args[args.length - 1] | |
| ; |
| #!/bin/bash | |
| # Settings | |
| url=http://dl.dropbox.com/u/2400/scrot | |
| dir=~/Dropbox/Public/scrot | |
| filename=selection_$(date +%Y-%m-%d_%H%M%S).png | |
| # End Settings | |
| scrot -s "$dir/$filename" |
| var ViewFactory = (function() { | |
| function ViewFactory(pubSub) { | |
| this.pubSub = pubSub; | |
| this.registry = {}; | |
| this.registry['factory'] = this; | |
| } | |
| ViewFactory.prototype.register = function(key, value) { | |
| return this.registry[key] = value; |
| { | |
| "settings": { | |
| "foo": "low" | |
| ,"bar": "high" | |
| ,"baz": "low" | |
| } | |
| } |
Load images, Imgur Albuns, Youtube videos, and Articles (beta) of Reddit links, loading only when the previous content was loaded
###Livedemo http://redditmobile.blogspot.com.br
###Dependencies
The goal is to add N new elements to the DOM as quickly and as painlessly as possible.
I have access to jQuery and found the code below to be faster than the following:
$(parentElement)
.append(Array(1001).join(template))
;| var fs = require('fs'); | |
| var lame = require('lame'); | |
| var Speaker = require('speaker'); | |
| fs.createReadStream(process.argv[2]) | |
| .pipe(new lame.Decoder()) | |
| .on('format', function (format) { | |
| this.pipe(new Speaker(format)); | |
| }); |