Skip to content

Instantly share code, notes, and snippets.

View esemeniuc's full-sized avatar

Eric Semeniuc esemeniuc

View GitHub Profile
@esemeniuc
esemeniuc / duplicate_packets.nft
Created March 17, 2023 01:54
Duplicate packets
#!/usr/sbin/nft -f
# see https://unix.stackexchange.com/questions/740061/how-do-you-duplicate-all-udp-traffic-on-a-port-range-using-nftables/
# sends all duplicated packets to 10.0.0.1
# run this before applying this file
# sudo ip addr add 10.0.0.1/24 dev lo
# clean up with
# sudo ip addr delete 10.0.0.1/24 dev lo
@esemeniuc
esemeniuc / nats.md
Last active January 23, 2023 19:30
Async vs sync nats

System: Ryzen 7 5900X, 64GB ram, linux 5.15, Nats server 2.9.10 in docker All results tested in release mode, rustc 1.66.0

Async

async-nats 0.26, tokio 1.14

total time spent (micro secs): 176134
avg (micro secs): 1761
@esemeniuc
esemeniuc / benchmark_clone.rs
Created January 7, 2023 17:37
Clone vs Channel+Insert invidiual items
/* results on 24 threads, Linux, Ryzen 5900X, 64GB RAM, rust 1.66 release mode
pubkey generation cost 13.703447ms
filling up 8 channels cost 1.299627336s
insert on thread_5 cost 204.928433ms
insert on thread_2 cost 202.868308ms
insert on thread_4 cost 219.480851ms
insert on thread_0 cost 213.074428ms
insert on thread_6 cost 213.296481ms
insert on thread_3 cost 234.825416ms
insert on thread_1 cost 218.522672ms
[{
"address": "16v7w7fKBcw1aJiHae6Ma9rgUQG6MQvgNa",
"balance": 2551004338039
},
{
"address": "16v7w7fKBcw1aJiHae6Ma9rgUQG6MQvgNa",
"balance": "a"
}]

Chat with Maria

Employee at Musicly first Launched tiktok in US + EU with 10-15 person team

Current Startup

Wants to connect with the influence market Idea: livestreaming app. There are struggles for ppl with ~10k follower count. No contact from brand Example: Korean skin care. There are influencers who have small audiences with very high conversion rates, deep knowledge Looking to pay with stickers, coins, targeting the beauty vertical

@esemeniuc
esemeniuc / Dockerfile
Created December 6, 2020 02:26
Ansys Dockerfile
FROM ubuntu:xenial
WORKDIR /root
EXPOSE 1084 1055 2325
#Ports in use:
#panel 1084
#flexlm 1055
#interconnect 2325
RUN apt update && apt install -y wget lsb-core libfreetype6 libxext6 libsm6 libxrender1 libfontconfig1 && rm -rf /var/lib/apt/lists/*;
@esemeniuc
esemeniuc / red5-server.sh
Created March 26, 2014 18:02
Red5-server init script Debian
#!/bin/sh
#
# Copyright (c) 2007 Javier Fernandez-Sanguino <jfs@debian.org>
#
# This is free software; you may redistribute it and/or modify
# it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2,
# or (at your option) any later version.
#
# This is distributed in the hope that it will be useful, but