Skip to content

Instantly share code, notes, and snippets.

View aliesbelik's full-sized avatar

Aliaksandr Belik aliesbelik

View GitHub Profile
@aliesbelik
aliesbelik / benchmarking-tools.md
Last active April 17, 2024 04:47
Benchmarking & load testing tools
@aliesbelik
aliesbelik / writing-a-tsung-plugin.md
Last active January 7, 2024 15:15 — forked from mremond/writing-a-tsung-plugin.md
Writing a Tsung Plugin

Writing a Tsung plugin

This is a simple tutorial on writing a tsung plugin and a repost of our ProcessOne tutorial.

Since tsung is used to test servers lets define a simple server for testing. myserver.erl provides 3 operations: echo, add and subtract.

myserver.erl assumes the first byte to be a control instruction followed by 2 or more byte data. The echo operation merely returns the byte data while add and subtract performs these operations on the 2 byte data before returning the results. See the code of myserver.erl for details.

We assume the source files for tsung-1.2.1 are available. This example was compiled using Erlang OTP R11B-3.

@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 / tmux-cheatsheet.md
Last active September 14, 2023 02:42 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@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/emailAddress=test@gmail.com"
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
import java.util.*;
import java.text.*;
import org.json.*;
import io.jsonwebtoken.*
import org.apache.commons.codec.binary.Base64;
// get JWT secret key and response value (to check response against it) from params
String [] params = Parameters.split(",");
String secret_key = params[0];
String status = params[1];