A ZSH theme optimized for people who use:
- Solarized
- Git
- Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)
For Mac users, I highly recommend iTerm 2 + Solarized Dark
| # Tell system when Xcode utilities live: | |
| sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer | |
| # Set "opendiff" as the default mergetool globally: | |
| git config --global merge.tool opendiff |
| function Class() { | |
| if(false === (this instanceof Class)) { | |
| return new Class(); | |
| } | |
| } | |
| Class.prototype.method = function(var) { | |
| var self = this; | |
| console.log(var); | |
| } |
| .ir { | |
| border:0; | |
| font: 0/0 a; | |
| text-shadow: none; | |
| color: transparent; | |
| background-color: transparent; | |
| } |
| var mongoose = require('mongoose'); | |
| var Schema = mongoose.Schema; | |
| var assert = require('assert') | |
| console.log('\n==========='); | |
| console.log(' mongoose version: %s', mongoose.version); | |
| console.log('========\n\n'); | |
| mongoose.connect('localhost', 'testing_1088'); | |
| mongoose.connection.on('error', function () { |
| //------------------------------------------------------------- | |
| // | |
| // Hypothesis: | |
| // | |
| // Promises/A is a Monad | |
| // | |
| // To be a Monad, it must provide at least: | |
| // - A unit (aka return or mreturn) operation that creates a corresponding | |
| // monadic value from a non-monadic value. | |
| // - A bind operation that applies a function to a monadic value |
| { | |
| // -------------------------------------------------------------------- | |
| // JSHint Configuration, Strict Edition | |
| // -------------------------------------------------------------------- | |
| // | |
| // This is a options template for [JSHint][1], using [JSHint example][2] | |
| // and [Ory Band's example][3] as basis and setting config values to | |
| // be most strict: | |
| // | |
| // * set all enforcing options to true |
| // Includes functions for exporting active sheet or all sheets as JSON object (also Python object syntax compatible). | |
| // Tweak the makePrettyJSON_ function to customize what kind of JSON to export. | |
| var FORMAT_ONELINE = 'One-line'; | |
| var FORMAT_MULTILINE = 'Multi-line'; | |
| var FORMAT_PRETTY = 'Pretty'; | |
| var LANGUAGE_JS = 'JavaScript'; | |
| var LANGUAGE_PYTHON = 'Python'; |