I hereby claim:
- I am nnarhinen on github.
- I am nnarhinen (https://keybase.io/nnarhinen) on keybase.
- I have a public key whose fingerprint is 5587 FD3D 1EAE E010 5C54 5676 123E FEEF 96F1 689E
To claim this, I am signing this object:
| 'use strict'; | |
| var validator = require('shared/schemas/validator'), | |
| _ = require('underscore'); | |
| module.exports = { | |
| onPropertyChanged: function(property, newValue) { | |
| var newObject = _.extend({}, this.props[this.objectPropertyPath], this.state[this.objectPropertyPath], _.isObject(property) ? property : _.object([[property, newValue]])); | |
| newObject = this.transformObject(newObject); | |
| var prms = {validationErrors: {}}; | |
| prms[this.objectPropertyPath] = newObject; |
I hereby claim:
To claim this, I am signing this object:
Install node-repl-promised:
npm install -g repl-promised
Use the repl to list all users
$ node-promised
> var app = require('./app');
undefined
> var Bookshelf = app.get('bookshelf');
undefined
| var JSZip = require('jszip'), | |
| Q = require('q'); | |
| var downloadFile = function(url) { | |
| var defer = Q.defer(); | |
| var xhr = new XMLHttpRequest(); | |
| xhr.open('GET', url, true); | |
| xhr.responseType = 'arraybuffer'; | |
| xhr.onreadystatechange = function() { | |
| if (xhr.readyState === 4) { |
| class BaseVideoListView extends Backbone.View | |
| initialize: (opts) -> | |
| @collection.selectedCount.assign @subNav.find('.selected_count'), 'text' | |
| @collection.selectedCount.onValue (val) => | |
| @subNav.find('.library-nav').toggleClass 'singular-selection', val == 1 | |
| this.$el.toggleClass 'multiple-selection', val > 1 | |
| @collection.hasSelected.assign @subNav.find('.visible-selected'), 'toggle' | |
| @collection.hasSelected.not().assign @subNav.find('.hidden-selected'), 'toggle' |
| function calculate (objects) { | |
| return _.chain(objects) | |
| .map(function(p) { return [p.vat, p.price]; }) | |
| .reduce(function(memo, pair) { | |
| var o = {}; | |
| o[pair[0]] = (memo[pair[0]] || 0) + pair[1]; | |
| return _.extend({}, memo, o); | |
| }, {}).value(); | |
| }; |
| id=$(docker ps | grep myimage:latest | awk '{ print $1 }') | |
| docker pull quay.io/nnarhinen/myimage | |
| new_id=$(docker run -d -p 3000 \ | |
| -e ENVIRONMENT=PRODUCTION quay.io/nnarhinen/myimage) | |
| id=$new_id ./update-nginx-port.bash | |
| docker stop $id |