Short articles, references and checklists to keep control of application quality.
Custom recipe to get full Node.js Cloud Environment in DigitalOcean Dokku droplet running from scratch. Yes. Your own Heroku for $5 per month.
I use this gist to keep track of the important configuration steps required to have a functioning system after fresh install.
When you have executed that's all step by step you will get a new working and stable system which is ready to host & serve your Node.js application and databases.
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 offset(count, offset, limit) { | |
const finalOffset = Math.max(Math.min(count, offset), 0); | |
const remainedCount = Math.min(count, count - finalOffset); | |
const finalCount = (typeof limit === 'number') ? Math.min(limit, remainedCount) : remainedCount; | |
return { offset: finalOffset, finalCount: finalCount }; | |
} | |
console.log(offset(10, 0)); // {"offset":0,"finalCount":10} | |
console.log(offset(10, 4)); // {"offset":4,"finalCount":6} | |
console.log(offset(10, 10)); // {"offset":10,"finalCount":0} |
Custom recipe to get OS X 10.11 El Capitan running from scratch with useful applications and Node.js Developer environment. I use this gist to keep track of the important software and steps required to have a functioning system after fresh install.
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 Router = require('director').Router; | |
var Dispatcher = require('flux2/dispatcher'); | |
var React = require('react'); | |
var Content = require('./components/content'); | |
var routes = require('./routes'); | |
React.render( | |
React.createElement(Content, null), | |
document.getElementById('content') | |
); |
NewerOlder