Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/tarantool
-- vim:ts=4 ss=4 sw=4 expandtab
-- Usage: tarantool relay-1mops.lua [nodes]
-- nodes should be a number from 1 to 31
local popen = require('popen')
local clock = require('clock')
local fiber = require('fiber')
local math = require('math')
local yaml = require('yaml')
#!/usr/bin/env tarantool
local net_box = require('net.box')
local fiber = require('fiber')
local clock = require('clock')
local CONN_STRING = 'localhost:3301' -- SET UP CONECTION STRING TO YOUR ROUTER / PLAIN TARANTOOL
local WORKER_COUNT = 256 -- SET UP NUMBER OF PARALLEL REQUESTS HERE
local conn = assert(net_box.connect(CONN_STRING))
@gwarf
gwarf / MacOSX_ssh_forwarding.md
Last active November 19, 2025 15:09
Using ssh forwarding (Agent and X11) on MacOS X

SSH Forwarding on MacOS X

Forwarding SSH agent

Configure ~/.ssh/config

# Allow Agent forwarding for a specific host (by security)
Host remotehost
  ForwardAgent yes
@msievers
msievers / [Spring, JMH] Howto integrate JMH benchmarks with Spring.md
Last active October 2, 2025 23:52
[Spring, JMH] Howto integrate JMH benchmarks with Spring

Motivation

Integrate JMH (Java Microbenchmarking Harness) with Spring (Boot) and make developing and running benchmarks as easy and convinent as writing tests.

Idea

Wrap the necessary JMH boilerplate code within JUnit to benefit from all the existing test infrastructure Spring (Boot) provides. It should be as easy and convinent to write benchmarks as it is to write tests.

TL;DR;

@Jekins
Jekins / Markdown-docs.md
Last active November 29, 2025 23:25
Руководство по оформлению Markdown файлов

Руководство по оформлению Markdown файлов

Markdown - это облегчённый язык разметки, который преобразует текст в структурированный HTML. Следующее руководство поможет вам разобраться, как использовать Markdown.

Заголовки

# Заголовок первого уровня
## Заголовок второго уровня
### Заголовок третьего уровня
#### Заголовок четвёртого уровня
##### Заголовок пятого уровня
@rozifus
rozifus / Python SimpleHTTPServer with SSL
Last active October 9, 2022 22:40
Python SimpleHTTPServer with SSL
# useful for running ssl server on localhost
# which in turn is useful for working with WebSocket Secure (wss)
# copied from http://www.piware.de/2011/01/creating-an-https-server-in-python/
@okunishinishi
okunishinishi / Remove all git tags
Created March 8, 2014 03:12
Delete all git remote tags
#Delete local tags.
git tag -l | xargs git tag -d
#Fetch remote tags.
git fetch
#Delete remote tags.
git tag -l | xargs -n 1 git push --delete origin
#Delete local tasg.
git tag -l | xargs git tag -d
@kwk
kwk / CMakeLists.txt
Last active July 30, 2025 15:24
Fix for "undefined reference to dlopen" in CMake projects
project(testlink)
add_executable(testlink main.cpp)
target_link_libraries(testlink)
@jboner
jboner / latency.txt
Last active December 12, 2025 04:24
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
@mre
mre / bitonic_sort.cu
Last active October 15, 2025 18:47
Bitonic Sort on CUDA. On a quick benchmark it was 10x faster than the CPU version.
/*
* Parallel bitonic sort using CUDA.
* Compile with
* nvcc -arch=sm_11 bitonic_sort.cu
* Based on http://www.tools-of-computing.com/tc/CS/Sorts/bitonic_sort.htm
* License: BSD 3
*/
#include <stdlib.h>
#include <stdio.h>