Skip to content

Instantly share code, notes, and snippets.

View dolik-rce's full-sized avatar

Jan Dolinár dolik-rce

View GitHub Profile
@dolik-rce
dolik-rce / bobcat.svg
Created February 15, 2024 20:47
Bobcat flamegraph
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dolik-rce
dolik-rce / optimizer.sh
Created February 19, 2021 11:08
Peg grammar optimizer
#!/bin/bash
# Usage: optimizer.sh [-v] <file.peg>
set -e
dbg() {
if [ "$VERBOSE" ]; then
echo "$1" > /dev/stderr
fi
@dolik-rce
dolik-rce / graph.svg
Created February 17, 2021 06:16
Flame graph for peg-based Kotlin parser in ctags
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dolik-rce
dolik-rce / nginx.conf
Last active May 4, 2020 11:44
Nginx-lua-prometheus benchmark #2
daemon off;
user www-data;
pid /var/run/nginx.pid;
worker_processes 4;
include /etc/nginx/modules-enabled/*.conf;
events {}
http {
sendfile on;
tcp_nodelay on;
@dolik-rce
dolik-rce / nginx.conf
Last active April 22, 2020 18:21
Benchmark for https://github.com/knyar/nginx-lua-prometheus/pull/82, just place both files in benchmark/ directory, then execute run.sh.
daemon off;
user www-data;
pid /var/run/nginx.pid;
worker_processes 4;
include /etc/nginx/modules-enabled/*.conf;
events {}
http {
sendfile on;
tcp_nodelay on;
@dolik-rce
dolik-rce / rc.sh
Last active August 4, 2016 06:04
Pár vychytávek z mého .bashrc
# Malá pythoní kalkulačka,
# stačí napsat výraz a zmáčkount Ctrl+E
bind -x "\"\\C-e\": python <<< \"
from __future__ import print_function
from math import *
from re import match, split
s = '\${READLINE_LINE//\"'\"/\"\\\\'\"}'
for x in split('[;\n]\s*', s):
try: