Skip to content

Instantly share code, notes, and snippets.

View kareiva's full-sized avatar

Simonas kareiva

  • Red Hat
  • Vilnius
View GitHub Profile
#!/bin/bash
myenv=""
if [ ! -z $container ]; then
myenv="${myenv}In a $container container. "
else
myenv="${myenv}On a $(uname) server. "
fi
@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 [email protected]
# 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()