Skip to content

Instantly share code, notes, and snippets.

@laemmy
laemmy / maidenhead.py
Created January 21, 2018 11:51
Convert latitude and longitude to Maidenhead grid locators.
# -*- coding: utf-8 -*-
import sys
# Convert latitude and longitude to Maidenhead grid locators.
#
# Arguments are in signed decimal latitude and longitude. For example,
# the location of my QTH Palo Alto, CA is: 37.429167, -122.138056 or
# in degrees, minutes, and seconds: 37° 24' 49" N 122° 6' 26" W
#
@laemmy
laemmy / wlan.ps1
Last active March 15, 2018 18:41
WPA2 Key via Powershell auslesen und auflisten
(netsh wlan show profiles) | Select-String "\:(.+)$" | %{$name=$_.Matches.Groups[1].Value.Trim(); $_} | %{(netsh wlan show profile name="$name" key=clear)} | Select-String "Schlüsselinhalt\W+\:(.+)$" | %{$pass=$_.Matches.Groups[1].Value.Trim(); $_} | %{[PSCustomObject]@{ PROFILE_NAME=$name;PASSWORD=$pass }} | Format-Table -AutoSize
@laemmy
laemmy / config.json
Created March 18, 2018 13:34
Exampel configuration file for using pat with ardop and rigctl on a Yaesu FT-817.
{
"mycall": "MYCALL",
"secure_login_password": "xxXXxxXX",
"auxiliary_addresses": [],
"locator": "JO62wn",
"http_addr": "localhost:8080",
"motd": [
"Open source Winlink client - getpat.io"
],
"connect_aliases": {
@laemmy
laemmy / config.h.patch
Last active June 23, 2018 09:29
My diff patch for DWM config.h
2a3,11
> static const char *upvol[] = { "/usr/bin/pactl", "set-sink-volume", "0", "+5%", NULL };
> static const char *downvol[] = { "/usr/bin/pactl", "set-sink-volume", "0", "-5%", NULL };
> static const char *mutevol[] = { "/usr/bin/pactl", "set-sink-mute", "0", "toggle", NULL };
>
>
> /* Add to keys[] array. With 0 as modifier, you are able to use the keys directly. */
>
>
>
@laemmy
laemmy / status.py
Created June 30, 2018 13:54
APRS Send status beacon quic and dirty
#!/usr/bin/env python3
import aprslib
CALL = "yourcall"
AIS = aprslib.IS(CALL, aprslib.passcode(CALL), port=14580)
AIS.connect()
AIS.sendall(CALL+">APRS,TCPIP*:>status text")
@laemmy
laemmy / whitelist_ip
Created January 28, 2019 09:06
Telekom Server Whitelist für postfix Antispam Relay
194.25.134.16 OK
194.25.134.17 OK
194.25.134.18 OK
194.25.134.19 OK
194.25.134.20 OK
194.25.134.21 OK
194.25.134.22 OK
194.25.134.80 OK
194.25.134.81 OK
194.25.134.82 OK
@laemmy
laemmy / CleanupTrashcan.sh
Last active February 8, 2019 09:51
Searching for Traschcan Folders on Samba Fileserver and delete files older than 90 days.
#!/bin/bash
find /srv/samba -type d -name '__Trash'> /tmp/trash
while read line;
do
find $line -mtime +90 -delete
done < /tmp/trash
Contact Name
16777215 All-Call
262 DL
263 MultiMode DL
2620 SA/MV
2621 BE/BB
2622 HH/SH
2623 NS/HB
2624 NW
2625 RP/SL
@laemmy
laemmy / win_update.yml
Created February 14, 2019 18:18 — forked from elordahl/win_update.yml
Ansible playbook to run Windows Update and restart, if required
---
# Ansible playbook to run Windows Update and restart, if required
#
# http://docs.ansible.com/ansible/win_updates_module.html
# https://docs.ansible.com/ansible/win_reboot_module.html
- name: Windows Update
hosts: all
gather_facts: false
tasks:
#! /bin/bash
### BEGIN INIT INFO
# Provides: MMDVM Hotspot
# Required-Start: $local_fs $network
# Required-Stop: $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: MMDVM Hotspot service
# Description: MMDVM Hotspot service