Skip to content

Instantly share code, notes, and snippets.

View mrLSD's full-sized avatar
🇺🇦
Ethereum Aurora EVM & Swift EVM implementation

Evgeny Ukhanov mrLSD

🇺🇦
Ethereum Aurora EVM & Swift EVM implementation
View GitHub Profile
@mrLSD
mrLSD / Makefile
Created September 30, 2024 21:59
Makefile for Swift: tests coverage to HTML file and print failed tests
cov:
@swift test --enable-code-coverage
@xcrun llvm-cov show .build/debug/evm-swiftPackageTests.xctest/Contents/MacOS/evm-swiftPackageTests \
-instr-profile=.build/debug/codecov/default.profdata \
--ignore-filename-regex="Tests/.*|\.build/.*" \
-format=html \
-output-dir=coverage/html
test-fails:
@swift test 2>&1 | grep -E "Test Case .* failed|error:"
@mrLSD
mrLSD / cli-test-runner.sh
Created September 30, 2024 21:55
Run swift tests with pretty error printing
#!/bin/bash
swift test 2>&1 | awk '
/error:/ {
# Use regular expression to capture required parts
# Regex Breakdown:
# ^(.+\/)?([^:]+\.swift):([0-9]+): error: -\[(.*?)\] : expected to equal <([^>]+)>, got <([^>]+)>
regex = "^(.+\\/)?([^:]+\\.swift):([0-9]+): error: -\\[(.*?)\\] : expected to equal <([^>]+)>, got <([^>]+)>"
if (match($0, regex, m)) {
# m[2]: Filename (e.g., MyTests.swift)
@mrLSD
mrLSD / keypad.json
Last active May 15, 2020 19:46
NumPad for Karabiner (MacOS) - NumPad as PC Style keyboard
{
"title": "# Numeric Keypad",
"rules": [
{
"description": "Numeric Keypad Arrows",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "keypad_2"
@mrLSD
mrLSD / wat2wasmStdIn.go
Created January 21, 2020 14:40
wat2wasm StdIn CLI
package main
import (
"bytes"
"fmt"
"log"
"os/exec"
)
func main() {
# Make sure you grab the latest version
curl -OL https://github.com/google/protobuf/releases/download/v3.2.0/protoc-3.2.0-linux-x86_64.zip
# Unzip
unzip protoc-3.2.0-linux-x86_64.zip -d protoc3
# Move protoc to /usr/local/bin/
sudo mv protoc3/bin/* /usr/local/bin/
# Move protoc3/include to /usr/local/include/
@mrLSD
mrLSD / main.go
Created February 16, 2018 11:12
concurent map copy
package main
import (
"fmt"
"sync"
"time"
)
var m = make(map[string]int32)
var wg = sync.WaitGroup{}
@mrLSD
mrLSD / go_race
Last active February 7, 2018 12:13
WARNING: DATA RACE
Write at 0x0000008f5418 by goroutine 38:
git.assembla.com/dragonsuite/dragonsuite/Libs/REQREP.TestSendEvent.func1.3()
/home/evgeny/go/src/git.assembla.com/dragonsuite/dragonsuite/Libs/REQREP/sender_test.go:245 +0x257
github.com/smartystreets/goconvey/convey.parseAction.func1()
/home/evgeny/go/src/github.com/smartystreets/goconvey/convey/discovery.go:80 +0x3d
github.com/smartystreets/goconvey/convey.(*context).conveyInner()
/home/evgeny/go/src/github.com/smartystreets/goconvey/convey/context.go:261 +0x1a9
github.com/smartystreets/goconvey/convey.(*context).Convey.func1()
/home/evgeny/go/src/github.com/smartystreets/goconvey/convey/context.go:163 +0x92
version: '3'
services:
broker:
image: 292964376226.dkr.ecr.us-east-1.amazonaws.com/ddpool/broker:v0.2
environment:
- MONGO_URL=mongodb://mongo:27017
links:
- mongo
depends_on:
- mongo
<!DOCTYPE html>
<html lang="en">
<head>
<title>Proxy tester</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
<script type="text/javascript">
$(function() {
var conn;
var msg = $("#msg");
@mrLSD
mrLSD / broker-jsons.md
Last active October 23, 2017 17:25 — forked from lempiy/jsons.md

EVENTS FROM BID TO BROKER

Event type outcomming event(from bid to broker to all carriers in array)

Event name: offerBid

bid request:

{
  "eventName": "offerBid",