Skip to content

Instantly share code, notes, and snippets.

View poctek's full-sized avatar
🏄‍♂️
Most likely writing code

Rostislav Katin poctek

🏄‍♂️
Most likely writing code
View GitHub Profile
# frozen_string_literal: true
Dry::Validation.load_extensions(:monads)
module BaseTransaction
def self.included(base)
base.include Dry::Transaction
base.extend ClassMethods
end
# frozen_string_literal: true
module StatsApi
module Operations
module UpdateRealtimeStatsViews
class UpdateLastShareTimestamps < Operations::BaseOperation
include Dry::Monads::Try::Mixin
include Import[
:application_config,
# frozen_string_literal: true
module Payouts
module Operations
module Unlocker
class CalculateRewards
include Dry::Monads::Result::Mixin
include Dry::Monads::List::Mixin
include Dry::Monads::Do.for(:call)
@poctek
poctek / cassandra-compose.yml
Created October 27, 2018 08:09
Cassandra compose
version: '3'
services:
seed-node:
image: cassandra
volumes:
- ./tmp/seed-node:/var/lib/cassandra
ports:
- "9042:9042"
- "7199:7199"
- "9160:9160"
@poctek
poctek / docker-compose.yml
Last active September 22, 2018 07:22
cluster docker compose
version: '3'
services:
master:
image: poctek5/postgres_base:latest
volumes:
- ./tmp/db:/var/lib/postgresql/data
ports:
- "5432:5432"
slave_eu:
image: poctek5/postgres_base:latest
# Build Geth in a stock Go builder container
FROM golang:1.9-alpine as builder
##FROM ubuntu
RUN apk add --update bash && rm -rf /var/cache/apk/*
RUN apk add --no-cache make gcc musl-dev linux-headers git bash
RUN go get -v github.com/ethereumproject/go-ethereum/...
WORKDIR $GOPATH/src/github.com/ethereumproject/go-ethereum
RUN ls -la
RUN ls -la cmd
# Build Geth in a stock Go builder container
FROM golang:1.9-alpine as builder
##FROM ubuntu
RUN apk add --update bash && rm -rf /var/cache/apk/*
RUN apk add --no-cache make gcc musl-dev linux-headers git bash
RUN go get -v github.com/ethereumproject/go-ethereum/...
WORKDIR $GOPATH/src/github.com/ethereumproject/go-ethereum
RUN ls -la
RUN ls -la cmd
{
"logging": {
"level": "debug",
"enableConsoleLog": true,
"enableConsoleColors": true,
"logFile": "",
"logBaseDirectory": "",
"perPoolLogFile": false
},
"banning": {
[open-ethereum-pool-miner-1]2018-01-12T11:22:31.445991203Z 2018/01/12 11:22:31 Jobs broadcast finished 9.981µs
[open-ethereum-pool-miner-1]2018-01-12T11:23:16.906615626Z 2018/01/12 11:23:16 New block to mine on main at height 640745 / 0x6ef32c3d
[open-ethereum-pool-miner-1]2018-01-12T11:23:16.906648228Z 2018/01/12 11:23:16 Broadcasting new job to 0 stratum miners
[open-ethereum-pool-miner-1]2018-01-12T11:23:16.906659458Z 2018/01/12 11:23:16 Jobs broadcast finished 9.278µs
[open-ethereum-pool-miner-1]2018-01-12T11:23:20.740102372Z 2018/01/12 11:23:20 Policy state refresh complete
[pirl-1]2018-01-12T11:22:11.229648627Z INFO [01-12|11:22:11] Imported new chain segment blocks=1 txs=2 mgas=0.042 elapsed=8.249ms mgasps=5.091 number=640741 hash=525103…77e544
[pirl-1]2018-01-12T11:22:11.233820086Z INFO [01-12|11:22:11] Commit new mining work number=640742 txs=4 uncles=1 elapsed=4.039ms
[pirl-1]2018-01-12T11:22:19.010089563Z INFO [01-12|11:22:19] Imported new chain segment blocks=1 txs=0 mgas=0.000 elapsed=10.151ms mgasps=0.000 number=640742 hash=ed6a3e…cc6473
[pirl-1]2018-01-12T11:22:19.013383460Z INFO [01-12|11:22:19] Commit new mining work number=640743 txs=6 uncles=0 elapsed=3.306ms
[pirl-1]2018-01-12T11:22:31.434117340Z INFO [01-12|11:22:31] Imported new chain segment blocks=1 txs=5 mgas=0.105 elapsed=11.459ms mgasps=9.162 number=640743 hash=958184…e0773c