Skip to content

Instantly share code, notes, and snippets.

View kareiva's full-sized avatar

Simonas kareiva

  • Red Hat
  • Vilnius
View GitHub Profile
@kareiva
kareiva / gameoflife.c
Last active May 8, 2024 13:35
Quick and dirty implementation of Conway's Game of Life in C
#include <sys/ioctl.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <stdbool.h>
#include <unistd.h>
#include <string.h>
int main (void)
{
@kareiva
kareiva / gameoflife.sh
Last active May 8, 2024 06:58
Primitive implementation of Conway's Game of Life in Bash
#!/bin/bash
#
# Problematic life by Simonas@irc.data.lt
# Studying of bash performance
# v0.2.0
term_width=$(($(tput cols) ))
term_height=$(($(tput lines) * 2 - 2))
full_square='█'
upper_square='▀'
@kareiva
kareiva / moontrack.py
Created February 4, 2024 19:27
Simple Moon tracker for hamlib rotator control (rotctld)
import re
import time
import ephem
import telnetlib
# put your rotctld address and port here
rot_addr = "192.168.1.124"
rot_port = "4533"
home_lat = "54.687157"
@kareiva
kareiva / Dockerfile
Created October 24, 2023 15:39
Dockerfile to build WSJT-Z version 1.22 inside an Ubuntu container
FROM ubuntu:latest
ENV DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC
ENV WSJTZ_VERSION="wsjtz-2.5.4-1.22.zip"
RUN apt update && apt install -y cmake asciidoc g++ gfortran automake libtool libboost-dev \
libboost-log-dev libfftw3-dev libusb-1.0-0 libusb-1.0-0-dev \
qtbase5-dev libqt5serialport5-dev libqt5multimedia5 \
qtmultimedia5-dev qttools5-dev-tools qttools5-dev git
#xxxxxxxxxxxxx IT 2 kursas 1 grupë 2013 m. ruduo
#/bin/bash
hex=16
echo "Pasirinkite veiksma:"
echo "1. Sesioliktainis_sk = Desimtainis_sk"
echo "2. Desimtainis_sk = Sesioliktainis_sk"
echo "3. Baigti darba"
read number
if [ -z $number ]
@kareiva
kareiva / lnk_rescue.ps1
Last active January 16, 2023 09:19
LNK rescue (put icons on desktop)
$programs = @{
"Adobe Acrobat" = "Acrobat.exe"
"Firefox Private Browsing" = "private_browsing.exe"
"Firefox" = "firefox.exe"
"Google Chrome" = "chrome.exe"
"Microsoft Edge" = "msedge.exe"
"Parallels Client" = "APPServerClient.exe"
"Remote Desktop" = "msrdcw.exe"
"TeamViewer" = "TeamViewer.exe"
"Royal TS6" = "royalts.exe"
@kareiva
kareiva / rigctld-debug.log
Created November 5, 2022 14:06
rigctld -vvvv
Opened rig model 3081, 'IC-9700'
Backend version: 20220909.10, Status: Stable
Rig command: f
VFO: Sub
rig_parse_vfo called
rigctl_parse: rig_powerstat is not on = 0
1:rig.c(5848):rig_get_powerstat entered
1:rig.c(5863):rig_get_powerstat returning(-11) Feature not available
/*
* Copyright (C) 2018 - Handiko Gesang - www.github.com/handiko
*
* 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, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
@kareiva
kareiva / tinygs_check.py
Created June 1, 2022 14:41
Check your position on the tinygs.com website
#!/usr/bin/env python
import requests
url = "https://api.tinygs.com/v1/stations"
resp = requests.get(url)
data = resp.json()
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2" xmlns:gx="http://www.google.com/kml/ext/2.2">
<Document id="1">
<Placemark id="3">
<name>LY1BWB path</name>
<LineString id="2">
<coordinates>24.0,53.0,0.0 24.0,52.0,0.0 34.0,39.0,0.0 34.0,38.0,0.0 36.0,38.0,0.0 38.0,38.0,0.0 46.0,39.0,0.0 46.0,40.0,0.0 48.0,40.0,0.0 54.0,41.0,0.0 56.0,41.0,0.0 56.0,42.0,0.0 58.0,42.0,0.0 60.0,42.0,0.0 78.0,43.0,0.0 80.0,43.0,0.0 82.0,42.0,0.0 120.0,38.0,0.0 126.0,39.0,0.0 156.0,43.0,0.0 158.0,43.0,0.0 162.0,44.0,0.0 164.0,44.0,0.0 164.0,45.0,0.0 166.0,45.0,0.0 168.0,45.0,0.0 -172.0,52.0,0.0 -170.0,52.0,0.0 -148.0,49.0,0.0 -146.0,49.0,0.0 -126.0,52.0,0.0 -124.0,52.0,0.0 -122.0,53.0,0.0 -120.0,53.0,0.0 -88.0,47.0,0.0 -86.0,47.0,0.0 -84.0,47.0,0.0 -82.0,46.0,0.0 -60.0,45.0,0.0 -58.0,45.0,0.0 -60.0,44.0,0.0 -56.0,46.0,0.0 -56.0,47.0,0.0 30.0,52.0,0.0 34.0,52.0,0.0 36.0,52.0,0.0 38.0,52.0,0.0 74.0,53.0,0.0 78.0,53.0,0.0 138.0,42.0,0.0 166.0,47.0,0.