This file contains hidden or 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 ws = new WebSocket("ws://localhost:6437/"); | |
| ws.onmessage = function(event) { | |
| console.log(event.data); | |
| }; |
This file contains hidden or 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
| //clear some cached objects in Pixi.js | |
| PIXI._batchs.length = 0; | |
| PIXI.TextureCache = {}; | |
| PIXI.BaseTextureCache = {}; |
This file contains hidden or 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
| it('should ....', function(done) { | |
| doAsync().then(function() { | |
| done(); | |
| }, function(err) { | |
| //как правильно писать чтобы тест падал в любом случае? | |
| //done(err || 'error') - не работает, т.к. done не обробатывает аргументы; | |
| }); | |
| }); |
This file contains hidden or 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
| it('should ....', function(done) { | |
| doAsync().then(function() { | |
| done(); | |
| }, function(err) { | |
| //How to fail jasmine 2.0 async spec on fail promise | |
| //done(err || 'error') - doesn't work because 'done' doesn't handle arguments | |
| }); | |
| }); |
This file contains hidden or 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
| /** | |
| * Setup multiple winston logger: | |
| * https://github.com/flatiron/winston#working-with-multiple-loggers-in-winston | |
| * | |
| * by nconf: | |
| * https://github.com/flatiron/nconf | |
| */ | |
| var winston = require('winston'), | |
| nconf = require('nconf'); |
This file contains hidden or 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
| # Use phusion/baseimage as base image. To make your builds | |
| # reproducible, make sure you lock down to a specific version, not | |
| # to `latest`! See | |
| # https://github.com/phusion/baseimage-docker/blob/master/Changelog.md | |
| # for a list of version numbers. | |
| FROM phusion/baseimage:0.9.15 | |
| MAINTAINER hyzhaka@gmail.com | |
| # Set correct environment variables. | |
| ENV HOME /root |
This file contains hidden or 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
| // de-normalized | |
| { | |
| "_id": <ObjectId1>, | |
| "name": { | |
| "en": "Eugene", | |
| "uk": "Євген" | |
| } | |
| } | |
| //or normalized |
This file contains hidden or 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
| receipt: Oz-Ware Purchase Invoice | |
| date: 2012-08-06 | |
| customer: | |
| given: Dorothy | |
| family: Gale |
This file contains hidden or 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
| #!/bin/bash | |
| sudo apt-get update && sudo apt-get upgrade | |
| sudo apt-get install rtmpdump python-pip | |
| sudo pip install livestreamer | |
| # to get best resolution | |
| sudo apt-get install python-dev | |
| sudo apt-get install libffi-dev | |
| sudo apt-get install librtmp-dev |
This file contains hidden or 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
| #!/bin/bash | |
| livestreamer --stream-segment-timeout 100000 --stream-timeout 100000 --http-timeout 100000 ustream.tv/channel/iss-hdev-payload best -np 'omxplayer -o hdmi -live --timeout 100000' |