Skip to content

Instantly share code, notes, and snippets.

View mkoura's full-sized avatar

Martin Kourim mkoura

View GitHub Profile
@mkoura
mkoura / dbsync_snapshots_testing.md
Created August 31, 2021 12:59
db-sync snapshots testing using docker-compose

Setup for testing db-sync snapshots:

  • start all services
cd cardano-db-sync
docker-compose up -d
docker-compose log -f
@mkoura
mkoura / cardano_node_tests_pool_metadata.json
Created September 7, 2020 13:10
cardano-node-tests pool metadata
{
"name":"cardano-node-tests",
"description":"cardano-node-tests E2E tests",
"ticker":"IOGQA1",
"homepage":"https://github.com/input-output-hk/cardano-node-tests"
}
@mkoura
mkoura / max_no_titlebar.sh
Last active September 3, 2016 12:23
no titlebar for maximized windows - map this script to Alt+F10 (and Super+Up in Gnome 3) and use it for window maximization
#!/bin/sh
missing_command=0
hash xprop 2>/dev/null || { echo "${0##*/}: please install xprop" >&2; missing_command=1; }
hash wmctrl 2>/dev/null || { echo "${0##*/}: please install wmctrl" >&2; missing_command=1; }
[ "$missing_command" -eq 1 ] && exit 1
case "$1" in
res*)
wmctrl -r :ACTIVE: -b remove,maximized_vert,maximized_horz
@mkoura
mkoura / nonsense.sh
Last active April 2, 2016 09:33
shell interview problems
# from a file print 10 lines that are directly before the last ten lines without using tail or head
{ tac | while read l; do [ "${i:=0}" -lt 20 -a "$i" -ge 10 ] && echo "$l"; i=$(($i + 1)); done | tac; } < file
# monitor changes to a file without using tail -f
while : ; do read line && echo "$line" || sleep 1; done < file
@mkoura
mkoura / vpn-toggle
Last active February 8, 2018 08:21
script for starting/stopping vpn using Network Manager on Linux - can be used via keyboard shortcut
#!/bin/sh
# list of configured VPNs:
# nmcli con show |grep vpn
# PIA London PPTP
uuid="07067b81-d1d8-46cb-8b92-59341c69fe73"
# PIA NL PPTP
#uuid="f8ac9237-4865-4757-a78d-8d525dc846e5"