brew install mongodb
Set up launchctl to auto start mongod
$ ln -sfv /usr/local/opt/mongodb/*.plist ~/Library/LaunchAgents
/usr/local/opt/mongodb/ is a symlink to /usr/local/Cellar/mongodb/x.y.z (e.g., 2.4.9)
| // For Firefox's Web Console, creates the functions showAsPrint() and undoShowAsPrint() | |
| // to roughly emulate print media and revert | |
| function showAsPrint(){ | |
| var docSS = document.styleSheets, ss, oldMedia, newMedia, rules; | |
| var p2s = function(media){ | |
| if (media.indexOf('all') > -1) return media; //no need to change | |
| if (media == 'print') return 'all, wasprint'; //show on screen, too | |
| if (media.indexOf('print') > -1 && media.indexOf('screen') > -1) return media; //no need to change | |
| if (media == 'screen') return 'wasscreen'; //hide these rules | |
| if (media.indexOf('screen') > -1) return media.replace('screen', 'wasscreen'); //hide these rules |
| var mtemplate = function(template, data){ | |
| function replaceFn(match, prop){ | |
| return (prop in data)? data[prop] : ''; | |
| } | |
| return template.replace(/\{\{(\w+)\}\}/g, replaceFn); | |
| }; | |
| var output = mtemplate('{{foo}} / {{bar}}', {foo : 'prueba foo', bar: 'prueba bar'}); | |
| window.console.info(output); |
| #!/usr/bin/env node | |
| /* | |
| * @Author: internoma | |
| * @Date: 2016-07-29 17:01:55 | |
| * @Last Modified by: internoma | |
| * @Last Modified time: 2016-07-30 19:19:58 | |
| */ | |
| 'use strict'; |
| // config/env/development.js | |
| /** | |
| * Development environment settings | |
| * | |
| * This file can include shared settings for a development team, | |
| * such as API keys or remote database passwords. If you're using | |
| * a version control solution for your Sails app, this file will | |
| * be committed to your repository unless you add it to your .gitignore | |
| * file. If your repository will be publicly viewable, don't add | |
| * any private information to this file! |
| IE6 Only | |
| ================== | |
| _selector {...} | |
| IE6 & IE7 | |
| ================== | |
| *html or { _property: } | |
| IE7 Only | |
| ================== |
| /*! | |
| * from: http://stackoverflow.com/questions/7127600/which-jquery-plugin-design-pattern-should-i-use | |
| */ | |
| (function ($) { | |
| // the constructor | |
| var MyClass = function (node, options) { | |
| // node is the target | |
| this.node = node; |
| /* * **************************************************************** | |
| // * Patrón route - encapsulación por rutas | |
| // * ****************************************************************/ | |
| var route = { | |
| _routes: {}, // Las rutas serán almacenadas en este objeto {ruta : función, ruta : función ...} | |
| add: function(url, action) { | |
| this._routes[url] = action; | |
| }, |
| body { | |
| font-family: -apple-system, BlinkMacSystemFont, | |
| "Segoe UI", "Roboto", "Oxygen", | |
| "Ubuntu", "Cantarell", "Fira Sans", | |
| "Droid Sans", "Helvetica Neue", sans-serif; | |
| } |