Skip to content

Instantly share code, notes, and snippets.

@mpetrunic
mpetrunic / index.ts
Created August 29, 2022 14:17
Sample code to install firefox extension using playwright
import { firefox } from '@playwright/test';
import { Buffer } from 'buffer';
import net from 'net';
describe("demo", function() {
it('homepage has Playwright in title and get started link linking to the intro page', async () => {
const browser = await firefox.launch({
headless: false,
slowMo: 300,
args: [ '-start-debugger-server', String(12345) ],
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.3;
contract ToDo {
event TaskCreated(uint256 id, uint256 date, string content, bool done);
event TaskCompleted(uint256 id, uint256 dateComplete);
event TaskDeleted(uint256 id);
@mpetrunic
mpetrunic / bug.log
Last active October 14, 2020 06:43
Libp2p dial protocol bug
2020-10-13 14:11:57 [] verbose: sending goodbye request to 16Uiu2HAkuRuvgU84nRHqCmMNKQUB2Axmn4be8AxgLbtP1LTdzyN7 requestId=86b199fe2bcd9be9, encoding=ssz_snappy
dialing
dialing protocol true
new stream
libp2p:upgrader outbound: starting new stream on [ '/eth2/beacon_chain/req/goodbye/1/ssz_snappy' ] +12ms
new mplex stream
libp2p:mplex new initiator stream 4 4 +1ms
libp2p:mplex initiator stream 4 4 send { id: 4, type: 'NEW_STREAM', data: '4' } +1ms
new connection stream Promise { <pending> }
libp2p:mplex initiator stream 4 4 send {
syntax = "proto3";
package beaconnodeapi;
import "google/api/annotations.proto";
import "google/protobuf/empty.proto";
message GetValidatorAggregateAndProofRequest {
// SSZ serialized AttestationData that validator want's aggregated
string attestation_data = 1;
syntax = "proto3";
package bn_openapi_bundle;
import "google/api/annotations.proto";
import "google/protobuf/descriptor.proto";
import "google/protobuf/empty.proto";
level:INFO code:"DOCUMENTFIELDS" text:"Field: 'servers' is not supported for the OpenAPI document with title: Beacon Node API" keys:"servers"
level:INFO code:"DOCUMENTFIELDS" text:"Field: 'tags' is not supported for the OpenAPI document with title: Beacon Node API" keys:"tags"
level:INFO code:"SCHEMAFIELDS" text:"Field: 'allOf' is not supported for the schema: BeaconBlock" keys:"components" keys:"schemas" keys:"BeaconBlock" keys:"allOf"
level:INFO code:"SCHEMAFIELDS" text:"Field: 'allOf' is not supported for the schema: BeaconBlockHeader" keys:"components" keys:"schemas" keys:"BeaconBlockHeader" keys:"allOf"
level:INFO code:"SCHEMAFIELDS" text:"Field: 'allOf' is not supported for the schema: message" keys:"components" keys:"schemas" keys:"SignedBeaconBlock" keys:"properties" keys:"message" keys:"allOf"
level:INFO code:"SCHEMAFIELDS" text:"Field: 'example' is not supported for the schema: signature" keys:"components" keys:"schemas" keys:"SignedBeaconBlock" keys:"properties" keys:"signature" keys:"example"
leve
@mpetrunic
mpetrunic / cla.md
Last active September 16, 2019 18:33

NodeFactory Individual Contributor License Agreement

Thank you for your interest in contributing to open source software projects (“Projects”) made available by Node Factory d.o.o, Oreškovićeva 6v, 10000 Zagreb ("NodeFactory"). This Individual Contributor License Agreement (“Agreement”) sets out the terms governing any source code, object code, bug fixes, configuration changes, tools, specifications, documentation, data, materials, feedback, information or other works of authorship that you submit or have submitted, in any form and in any manner, to NodeFactory in respect of any of the Projects (collectively “Contributions”). If you have any questions respecting this Agreement, please contact info@nodefactory.io.

You agree that the following terms apply to all of your past, present and future Contributions. Except for the licenses granted in this Agreement, you retain all of your right, title and interest in and to your Contributions.

Copyright License. You hereby grant, and agree to grant, to No

import winston from 'winston';
import morgan from 'morgan';
const env = process.env;
const loggerConfig = Object.freeze({
level: env.LOG_LEVEL || 'debug',
serviceInfo: {
service: env.service || 'unknown',
env: env.NODE_ENV || 'dev',
deploy:
working_directory: ~/app
machine:
image: circleci/classic:latest
steps:
- checkout
- attach_workspace:
at: ./
- run:
name: Load Docker images
@mpetrunic
mpetrunic / mocha-reporter-config.json
Created June 24, 2018 18:00
mocha-reporter-config.json
{
"reporterEnabled": "spec, mocha-junit-reporter",
"mochaJunitReporterReporterOptions": {
"mochaFile": "./test-results/test-contract-results.xml"
}
}