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
""" | |
This program is free software: you can redistribute it and/or modify | |
it under the terms of the GNU General Public License as published by | |
the Free Software Foundation, either version 3 of the License, or | |
(at your option) any later version. | |
This program is distributed in the hope that it will be useful, | |
but WITHOUT ANY WARRANTY; without even the implied warranty of | |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
GNU General Public License for more details. |
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 mubsub = require('mubsub'); | |
const uuid = require('uuid'); | |
let url = 'mongodb://bellawe.com:27017/renderProtocol'; | |
var clientA = mubsub(url); | |
var clientB = mubsub(url); | |
var inbound = clientA.channel('inbound', {recreate: true }); | |
var outbound = clientB.channel('outbound', {recreate: true }); |
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
# Helper functions | |
def h(elm_type, props='', *args): | |
return React.createElement(elm_type, props, *args) | |
def render(react_element, destination_id, callback=lambda: None): | |
container = document.getElementById(destination_id) | |
ReactDOM.render(react_element, container, callback) |
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
sudo docker run -it -v /renders:/service/renderServer/RenderServer/renders valerysntx/render-server:ci bash -c 'NODE_ENV=production cd / && node /service/renderServer/RenderServer/client/app.js' |
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
docker-machine create -d virtualbox --virtualbox-boot2docker-url https://github.com/StefanScherer/boot2docker/releases/download/v1.10.1-386/boot2docker.iso dev32 |
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
// Copyright (c) .NET Foundation. All rights reserved. | |
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. | |
using System; | |
using System.Collections.Concurrent; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Linq.Expressions; | |
using System.Reflection; |
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
class Observer { | |
public action: (T) => any; | |
constructor(action: (T) => any) { | |
this.action = action; | |
} | |
public Set(value: any) { |
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
interface IObserver<T> { | |
Notify(observer:Observer<T>, value:T) | |
} | |
class Observer<T> { | |
action: (T) => any; | |
public Set(value: (T) => T) { | |
this.action = value; |
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
async static Task Main() | |
{ | |
(await GetCachedContentAsync (new Uri ("http://foo"))).Dump(); | |
//(await GetCachedContentAsync (new Uri ("http://foo"))).Dump(); | |
} | |
static Task<string> GetContent (Uri uri) { | |
return Task.Delay (1000).ContinueWith (_ => "slow"); | |
} |
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
wget https://get.docker.com/builds/Linux/x86_64/docker-1.12.2.tgz | |
tar -xzvf docker-1.12.2.tgz | |
cd docker | |
env DOCKER_HOST=tcp://0.0.0.0:2375 | |
mkdir ~/bin | |
mv docker ~/bin | |
cat "export DOCKER_HOST=tcp://0.0.0.0:2375" > ~/.bashrc | |
cat "export PATH=$PATH:~/bin" > ~/.bashrc |