I hereby claim:
- I am mostr on github.
- I am mostr (https://keybase.io/mostr) on keybase.
- I have a public key ASBmVbAQ_Boa-EMLXQreBsxuGk1Qk2PfXKwL2jL3_1qjzgo
To claim this, I am signing this object:
| package scheduler | |
| import zio.clock.Clock | |
| import zio.duration.durationInt | |
| import zio.logging.Logging | |
| import zio.test.Assertion.equalTo | |
| import zio.test.environment.TestEnvironment | |
| import zio.test.{DefaultRunnableSpec, ZSpec} | |
| import zio.{Has, Ref, ZIO} |
| // allow serialization of akka goodies, e.g. streamrefs that we use | |
| object AkkaRefsSerializationOps { | |
| def toProtoPayload(akkaRefToSerialize: AnyRef)(implicit system: ActorSystem): SerializedAkkaPayload = { | |
| val ext = SerializationExtension(system) | |
| val serializer = ext.findSerializerFor(akkaRefToSerialize) | |
| val manifest = Serializers.manifestFor(serializer, akkaRefToSerialize) | |
| Serialization.withTransportInformation(ext.system) { () => | |
| val sinkSerialized = ByteString.copyFrom(serializer.toBinary(akkaRefToSerialize)) | |
| SerializedAkkaPayload(sinkSerialized, manifest, serializer.identifier) |
| // allow serialization of akka goodies, e.g. streamrefs that we use | |
| object AkkaRefsSerializationOps { | |
| def toProtoPayload(akkaRefToSerialize: AnyRef)(implicit system: ActorSystem): SerializedAkkaPayload = { | |
| val ext = SerializationExtension(system) | |
| val serializer = ext.findSerializerFor(akkaRefToSerialize) | |
| val manifest = Serializers.manifestFor(serializer, akkaRefToSerialize) | |
| val sinkSerialized = ByteString.copyFrom(serializer.toBinary(akkaRefToSerialize)) | |
| SerializedAkkaPayload(sinkSerialized, manifest, serializer.identifier) | |
| } |
| ### Keybase proof | |
| I hereby claim: | |
| * I am mostr on github. | |
| * I am mostr (https://keybase.io/mostr) on keybase. | |
| * I have a public key ASCitYdI7ovaxK2rQQi5aTi7VB5996vLDPEusIU6QF3lUwo | |
| To claim this, I am signing this object: |
I hereby claim:
To claim this, I am signing this object:
| pragma solidity ^0.4.16; | |
| import "github.com/OpenZeppelin/openzeppelin-solidity/contracts/token/ERC20/StandardToken.sol"; | |
| contract TestToken is StandardToken { | |
| constructor(uint256 _initialBalance) public payable { | |
| balances[msg.sender] = _initialBalance; | |
| } | |
| import React from 'react'; | |
| import {connect} from './statemgmt'; | |
| import * as actions from './actions'; | |
| const App = () => <Counter/> | |
| export default App; | |
| function _Counter(props) { | |
| return ( |
| let winston = require('winston'); | |
| // instantiate winston logger | |
| // configure rewriters to add TID and application name to "meta" | |
| // ... | |
| function wrapWinston(logger) { | |
| return ['debug', 'warn', 'info', 'error'].reduce((res, e) => { | |
| res[e] = function(msg, ...extras) { |
| import React from 'react'; | |
| import ReactDOM from 'react-dom'; | |
| import * as mobx from 'mobx-react'; | |
| import {state, actions} from './store'; | |
| // passing function to observer (with implicit inject) is not supported natively, so make up your own one | |
| // pass either function or plain old selector strings array | |
| // WARNING: doesn't work if "observer" used as decorator | |
| let observer = (selector, Component) => { |
| // Lets create some dirs structure (async) | |
| function createDir(name, parent): any { | |
| return new Promise((res, rej) => { | |
| console.log(`Creating ${name} with parent ${parent}`); | |
| res(name); | |
| }); | |
| } | |
| const dirsToCreate = ['foo', 'bar', 'baz', 'boo']; |