Skip to content

Instantly share code, notes, and snippets.

View mstyne's full-sized avatar
🐍
Improving my Python skills

Michael Styne mstyne

🐍
Improving my Python skills
View GitHub Profile
[Theme music and QVC logo fade out]
Announcer: "Prepare yourselves for this week's special edition of the QVC shopping channel, featuring the fierce Klingon warrior, Lieutenant Worf from Star Trek: The Next Generation!"
[Camera zooms in on Worf, who is standing behind a display table showcasing the featured items, with an intense glare]
Worf: "Hear me, Earthlings! I am Lieutenant Worf, son of Mogh, and I am here to command your attention today on the QVC shopping channel. We bring you a selection of items that are not just unique and practical, but also worthy of a true warrior."
[Camera pans over the items on the table]
@mstyne
mstyne / eme_wsjtx.py
Last active October 16, 2022 00:55
Python Script for EME control via WSJT-X and Rotctld, courtesy ON4KHG and ON4KDV
#!/usr/bin/python3
# coding: utf-8
# This script allows to rotate an antenna system either by manually typing in a heading (azimuth and/or elevation)
# you want the antenna to rotate to or by automatically tracking the moon azimuth and elevation.
# The Moon azimuth and elevation are extracted out of the file azel.dat provided by the WSJT-X suite.
# Beside WSJT-X, this script also makes use of the rotator controller daemon embedded in the Hamlib
# libraries. So, the prerequisites for this script to run are WSJT-X opened and running, and the
# Hamlib librairies installed on your Raspberry Pi.
# This script has been written in Python 3 by Didier, ON4KDV and Gaëtan, ON4KHG.
top - 12:57:58 up 13 min, 1 user, load average: 1.11, 0.87, 0.56
Tasks: 129 total, 1 running, 76 sleeping, 0 stopped, 1 zombie
%Cpu0 : 42.6 us, 0.0 sy, 0.0 ni, 53.7 id, 0.0 wa, 0.0 hi, 3.7 si, 0.0 st
%Cpu1 : 45.6 us, 3.5 sy, 0.0 ni, 50.9 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
%Cpu2 : 18.6 us, 1.7 sy, 0.0 ni, 79.7 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
%Cpu3 : 23.2 us, 10.7 sy, 0.0 ni, 66.1 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
KiB Mem : 948308 total, 362800 free, 202160 used, 383348 buff/cache
KiB Swap: 102396 total, 102396 free, 0 used. 665564 avail Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
#%PAM-1.0
auth required pam_sepermit.so
#auth substack password-auth
auth sufficient /lib64/security/pam_duo.so
auth required pam_deny.so
auth include postlogin
# Used with polkit to reauthorize users in remote sessions
-auth optional pam_reauthorize.so prepare
account required pam_nologin.so
account include password-auth
Dear Hudson Division Member,
Most of you have already seen the campaign material mailed to you by my opponent Ms. Jairam. It is the latest round of mudslinging coming from her and her clique. I have made a concerted effort to stay above the fray. I have intentionally not engaged her as I believe to do so would only embolden her.
It seems to me that she is frustrated by her lack of success in getting me to join her in the mud-pile. In desperation, she has taken on some of my supporters and myself in a most rude and abusive way, either directly or through her handful of supporters as intermediaries.
Her letter, an inappropriate use of thousands of dollars, is full of statements not based on fact but on less than half-truths, misinformation, and falsehoods.
Dirty politics is how my opponent and her supporters want to play, and it speaks volumes about her and how desperately she wants to win at any price. I will not lower myself to her level, ever! I’d rather lose than sell my soul to the devil
@mstyne
mstyne / k2mts_vucc_satellite_heroes.txt
Last active January 15, 2019 21:10
K2MTS VUCC Satellite Chase
Last updated 2019-01-15.
16 KE4AL
10 KB2YSI
9 N6UA
7 KE0PBR
4 KE8FZT
3 WY7AA
3 KD8RTT
3 K7TAB
62.146.70.225 - - [04/Apr/2018:08:38:55 -0400] "GET / HTTP/1.0" 301 301 "-" "-"
62.146.70.225 - - [04/Apr/2018:08:38:56 -0400] "GET / HTTP/1.0" 200 120805 "-" "-"
62.146.70.225 - - [05/Apr/2018:03:19:59 -0400] "GET / HTTP/1.0" 301 301 "-" "-"
62.146.70.225 - - [05/Apr/2018:03:19:59 -0400] "GET / HTTP/1.0" 301 301 "-" "-"
62.146.70.225 - - [05/Apr/2018:03:19:59 -0400] "GET / HTTP/1.0" 301 301 "-" "-"
62.146.70.225 - - [05/Apr/2018:03:19:59 -0400] "GET / HTTP/1.0" 301 301 "-" "-"
62.146.70.225 - - [05/Apr/2018:03:19:59 -0400] "GET / HTTP/1.0" 301 301 "-" "-"
62.146.70.225 - - [05/Apr/2018:03:19:59 -0400] "GET / HTTP/1.0" 301 301 "-" "-"
62.146.70.225 - - [05/Apr/2018:03:19:59 -0400] "GET / HTTP/1.0" 301 301 "-" "-"
62.146.70.225 - - [05/Apr/2018:03:20:00 -0400] "GET / HTTP/1.0" 301 301 "-" "-"
@mstyne
mstyne / cockfordollie.yml
Last active September 18, 2017 20:37
Ansible + NS1 + Let's Encrypt
---
- name: create let's encrypt account key
command: "openssl genrsa -out le_account.key 4096"
args:
chdir: "{{ key_path }}"
creates: "{{ key_path }}/le_account.key"
tags:
- letsencrypt
@mstyne
mstyne / gist:4c5310b433c8ca69a9bf1ab7b9331c1e
Last active February 25, 2019 15:49
mstyne's sysadmin pro-tip series
tweet format
[...]
mstyne’s sysadmin pro-tip series, #X:
thing
[...]
#1 disk space is finite
#2 hire one
@mstyne
mstyne / gist:89e8d8e663b0bddbf432da4b6e282d58
Last active October 24, 2022 22:43
Encrypt a file / pipe using OpenSSL
Encrypt:
openssl aes-256-cbc -a -salt -in secrets.txt -out secrets.txt.enc
command | openssl aes-256-cbc -a -salt > secrets.txt.enc
php ex.php ubersmith | openssl aes-256-cbc -a -salt > data.csv.enc
Decrypt:
openssl aes-256-cbc -d -a -in data.csv.enc -out data.csv