Skip to content

Instantly share code, notes, and snippets.

View aliesbelik's full-sized avatar

Aliaksandr Belik aliesbelik

View GitHub Profile
@aliesbelik
aliesbelik / loadtesting-with-tsung-and-multiple-ips.md
Created January 7, 2024 14:15
Building a test setup for load testing with Tsung

Building a test setup for load testing with Tsung

Originally published by Emre Bastuz at https://hml.io/2015/08/04/loadtesting-with-tsung-and-multiple-ips/.

Overview

From time to time it is necessary to create multiple network sessions in a testing environment, to see how a component handles those sessions.

The following description will show a testing setup to create multiple TCP sessions by using a combination of techniques:

@aliesbelik
aliesbelik / ripme.json
Last active December 12, 2023 01:38
scoop
{
"version": "2.1.7",
"description": "Downloads image albums from various websites in bulk.",
"homepage": "https://github.com/ripmeapp2/ripme",
"license": "MIT",
"suggest": {
"JRE": "java/temurin17-jre"
},
"url": [
"https://github.com/ripmeapp2/ripme/releases/download/2.1.7/ripme-2.1.7-29-b080faae.jar#/ripme.jar",
@aliesbelik
aliesbelik / palette.md
Last active October 13, 2023 21:50
A tiny python script 🐍 to extract color palettes 🎨 from any image.

Palette

A tiny python script to extract color palettes from any image.

Original script available in rebelot/kanagawa.nvim.

Usage

$ python palette.py --help
@aliesbelik
aliesbelik / gen-certs.sh
Created August 17, 2023 23:18 — forked from notmedia/gen-certs.sh
Creating Self-Signed certificates
rm *.pem
rm *.srl
rm *.cnf
# 1. Generate CA's private key and self-signed certificate
openssl req -x509 -newkey rsa:4096 -days 365 -nodes -keyout ca-key.pem -out ca-cert.pem -subj "/C=FR/ST=Occitanie/L=Toulouse/O=Test Org/OU=Test/CN=*.test/[email protected]"
echo "CA's self-signed certificate"
openssl x509 -in ca-cert.pem -noout -text
@aliesbelik
aliesbelik / multiple-repository-and-identities-git-configuration.md
Created December 26, 2022 18:16 — forked from bgauduch/multiple-repository-and-identities-git-configuration.md
Git config with multiple identities and multiple repositories

Setup multiple git identities & git user informations

/!\ Be very carrefull in your setup : any misconfiguration make all the git config to fail silently ! Go trought this guide step by step and it should be fine 😉

Setup multiple git ssh identities for git

  • Generate your SSH keys as per your git provider documentation.
  • Add each public SSH keys to your git providers acounts.
  • In your ~/.ssh/config, set each ssh key for each repository as in this exemple:
@aliesbelik
aliesbelik / web-servers.md
Created November 21, 2022 16:22 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@aliesbelik
aliesbelik / publish-go-app-on-github.md
Last active August 30, 2021 19:50 — forked from lesovsky/publicating-go-application-on-github.md
Publicating Golang application on GitHub.
@aliesbelik
aliesbelik / performance-reading.md
Last active December 5, 2021 19:12
Performance Reading
@aliesbelik
aliesbelik / keybase.md
Created October 26, 2020 18:28
keybase.md

Keybase proof

I hereby claim:

  • I am aliesbelik on github.
  • I am veslefrik (https://keybase.io/veslefrik) on keybase.
  • I have a public key ASAPPXhZTP5qs5wwaZJ4xYEoGMNZ8Rt0YvMAewQ0MaT3wwo

To claim this, I am signing this object:

@aliesbelik
aliesbelik / latency.md
Last active May 31, 2021 17:49 — forked from hellerbarde/latency.markdown
Latency numbers every programmer should know

Latency numbers every programmer should know

L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns             
Compress 1K bytes with Zippy ............. 3,000 ns  =   3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns  =  20 µs
SSD random read ........................ 150,000 ns  = 150 µs

Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs