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 / 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.
@kareiva
kareiva / trip.py
Last active November 30, 2021 22:25
Calculate rough distance of high altitude balloon trip from WSPR data + generate KML
#!/usr/bin/env python
# Calculate rough distance of the balloon trip from WSPR data
#
# Run `pip install maidenhead psycopg2-binary pyproj simplekml` for prereqs
#
# Simonas Kareiva <ly2en@qrz.lt>
import maidenhead as mh
import simplekml
@kareiva
kareiva / updike.bashrc
Last active August 6, 2021 18:44
Updike - print system uptime in wiener length.
alias updike='/usr/bin/uptime | perl -ne "/(\d+) d/;print 8,q(=)x\$1,\"D\n\""'
@kareiva
kareiva / pingpong.pas
Last active December 1, 2021 17:35
This code is 20yrs old, but it somewhat works with ptcgraph unit
{
��������������������������ͻ
�Simonas Kareiva �
� 2000 12 22 6:30 AM �
� PinGPonG v0.01 �
� questions:molotov@mp3.lt �
��������������������������ͼ
}
program pingpong;
uses Crt, ptcgraph;
#!/usr/bin/env python
# Connect to APRS-IS to scan for a specific callsign
from datetime import date
import aprslib
import smtplib
import logging
callsign_filter = 'LY1BWB-12'
import meshtastic
from pubsub import pub
def onReceive(packet):
print(f"Received: {packet}")
if ( packet['hopLimit'] > 0 and "decoded" in packet and
packet['decoded']['data']['typ'] == 'CLEAR_TEXT' ):
interface.sendText(
'SNR ' + str(packet['rxSnr']) + ': ' + packet['decoded']['data']['text'])