inakiabt
Re:Underscore and Lodash Merge Thread
on Thursday May 21, 2015 @02:27PM (#9584514)
I'm using https://www.zenhub.io/, it adds a voting mechanism on github.
Re:Portable AWS-style infrastructure service for Docker
on Tuesday November 11, 2014 @11:18AM (#8590575)
Seems like some of the source code of different components are here: https://github.com/rancherio
* Agent: https://github.com/rancherio/rancher-agent
* Cattle: https://github.com/rancherio/cattle
Portable AWS-style infrastructure service for Docker
Re:Show HN: A simple url shortener written in Node
on Wednesday September 21, 2011 @11:14AM (#3022293)
Maybe adding a simple "^" at the begining of the regex should be enough :)
/^https?:\/\/([-\w\.]+)+(:\d+)?(\/([\w/_\.]*(\?\S+)?)?)?/
Otherwise, could be used for XSS. Like this url (http://naurls.me/39696e): javascript:<script>alert('HELLO world');</script>http://naurl.me/
Re:Show HN: A simple url shortener written in Node
on Wednesday September 21, 2011 @10:41AM (#3022164)
I'm new with Node.js, but the "shorten" process shouldn't be an asynchronous process? Maybe something like this?:
app.get('/shorten', function(req, res) {
console.log('Shortening url...');
shortener.shorten(req.param('u'), function(result){
res.send(result);
});
});
It's well known that Redis is pretty fast, but, citing "Node Web Development" (http://www.amazon.com/Node-Web-Development-David-Herron/dp/1...) on it "Architecture: Threads versus asynchronous event-driven" chapter, "(...)Depending on the query that pause can be quite long. This is bad because while the entire thread is idling another request might come in, and if all the threads are busy it will be dropped. Looks like quite a waste. Context switching is not free either, the more threads we use the more time the CPU spends in storing and restoring the state. Furthermore, the execution stack for each thread takes up memory. Simply by using asynchronous, event-driven I/O, Node removes most of this overhead while introducing very little on its own."It is not a criticism but a question.