Skip to content

Instantly share code, notes, and snippets.

View ericek111's full-sized avatar

Erik Bročko ericek111

View GitHub Profile
@ericek111
ericek111 / n1mm_linux.md
Last active March 23, 2024 13:35
Contesting with N1MM on Linux: a tutorial for the adventurous

Contesting with N1MM on Linux

N1MM+ has been the go-to contest logger for many hams and, thanks to its networking features, also clubs. Sadly, it's only for Windows, it's closed-source and the omnipresent bugs don't make it any more fun.

Setting up Wine

  1. Install any decently recent flavour of Wine. Usually the one provided by your distro's package manager is fine.
  2. Install winetricks.
  3. Set the required environment variables. You only need to specify $WINEARCH once, when creating the wineprefix (which is, in short, a self-contained "fake" "Windows" "installation"). When you'll want to work inside this prefix, you'll need to run the first command inside every newly opened terminal window.
@ericek111
ericek111 / compton.conf
Created March 22, 2024 09:55
My picom config file
# https://gist.github.com/gaurav712/42549678b778db12fda5764f7c0757ad
backend = "glx";
# backend = "xr_glx_hybrid"; # Better performance on my 6200U ThinkPad T470s.
glx-no-stencil = true;
glx-no-rebind-pixmap = true;
glx-copy-from-front = false;
glx-use-copysubbuffermesa = true;
vsync = false;
@ericek111
ericek111 / tetra_tmux.sh
Created March 3, 2024 11:10
Launch a tmux session for tetra-kit
#!/bin/sh
ROOT=/home/erik/opt/sdrpp-tetra-kit
export DISPLAY=:0
tmux new-session -d -s sdrpptetra -n phy -c "/home/erik/Documents/foss/sdrpp-orig/build" 'bash -i'
# center freq: 424604000.0
tmux send-keys -t '=sdrpptetra:=phy' './sdrpp -r ../root_tetra --autostart' Enter
mkdir "/tmp/tetra"
for i in {0..16}; do
@ericek111
ericek111 / sdr_schedule.sh
Last active February 10, 2024 15:49
Schedule SDR recordings with a simple script.
#!/bin/bash
set -e
# This is made for libmirisdr-5, but could be adapted easily to any IQ-spewing client.
# Depends on csdr (jketterl's fork) for decimation.
if [ -z "$1" ]; then
echo "Usage: $0 (start date and time, e. g. 2024-02-10 00:10:15)"
exit 1
fi
@ericek111
ericek111 / manticore_parser.php
Last active March 27, 2023 01:14
Manticore Search query log parser in PHP
<?php
class ManticoreLogLine {
public function __construct(
public *\DateTimeImmutable* $date,
public int $conn,
public float $realTime,
public float $wallTime,
public int $foundRows,
public string $sql,
@ericek111
ericek111 / csgo.c
Created November 20, 2020 02:30
CS:GO voice demo parser
#include <unistd.h>
#include <stdlib.h>
#include <math.h>
#include <stdio.h>
#include <stdint.h>
#include <sys/time.h>
#include <celt.h>
// gcc -o csgo csgo.c -I./celt-0.11.1/libcelt -L"$HOME/.steam/steam/steamapps/common/Counter-Strike Global Offensive/bin/linux64" -l:vaudio_celt_client.so && ./csgo && play -t raw -r 22050 -e signed -b 16 -c 1 out.raw
@ericek111
ericek111 / turboflash.sh
Created October 4, 2022 11:54
Script for Galaxy S10e to overclock the flashlight LED
mytmpfolder="/dev/myowntmp" # it seems there is no /tmp, so let's make our own -- /dev is on a tmpfs, it is purged on reboot
mkdir -p "$mytmpfolder"
flashfile="/sys/class/camera/flash/rear_flash"
curval="$(cat "$mytmpfolder/turboflashval")"
curval="${curval:-0}"
HIGH_VAL=200
LOW_VAL=2003
@ericek111
ericek111 / inotifycompressor.cpp
Created September 16, 2022 22:23
use inotify to watch a directory and process content written to a file from another process
#include <iostream>
#include <filesystem>
#include <chrono>
#include <thread>
#include <vector>
#include <map>
#include <condition_variable>
#include <cerrno>
#include <cstring>
@ericek111
ericek111 / miri_source_c.cc
Created April 14, 2022 17:38
gr-osmosdr libmirisdr-4 fixed (+ DC offset removal by vladisslav2011)
/* -*- c++ -*- */
/*
* Copyright 2012 Dimitri Stolnikov <horiz0n@gmx.net>
* Copyright 2012 Steve Markgraf <steve@steve-m.de>
*
* GNU Radio is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3, or (at your option)
* any later version.
*
@ericek111
ericek111 / xoverlay.cpp
Last active April 12, 2022 19:32
X11 overlay
/*
* Copyright (c) 2020 ericek111 <erik.brocko@letemsvetemapplem.eu>.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, version 3.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU