VPN Count Dashboard Example

Before all hell broke loose I built a dashboard for management to give a near real-time view of health, errors, etc. Once we got sent home to work and we popped most of the work force on VPN, I was tasked with adding a widget to show connected users. Of course this is an example […]

Python and Gtk code to reduce file size and resize images for web usage.

I needed a tool for my wife to resize images for her blog and I found one called Trimage. I wasn’t much fond of it so I wrote my own, it’s fast and stable for only a days worth of coding. To run the code directly you’ll need GObject and PIL, you might want Pillow […]

Simple Python 3 threaded timer in Gtk3.

A quick and dirty timer example. If you need to execute after a period of time use Thread.Timer(). This example uses simple thread and event to start and stop a clock in a Gtk 3 window counting up time in a label. #!/usr/bin/python3 import gi gi.require_version('Gtk', '3.0') from gi.repository import Gtk,Pango,GObject import threading import datetime […]

Python 3 ThreadPoolExecutor in Gtk 3

So I wanted to collect all the theme icons on my Linux machine so I wrote a little app. It is really fast using the ThreadPoolExecutor from futures. I’ve used this at work but never in a Gtk app. Here’s the result from the straight Python 3 code without a GUI. That’s a lot of […]

Get Dynatrace json dumps from threaded Python 3.

Today was a boring day so I was doing anything to make it go faster. I ended up redoing some Python code. It didn’t need to be threaded but I was bored! It’s cold, windy, and dark here. Blah! Maybe someone will find this useful? #!/usr/bin/python3 from concurrent.futures import ThreadPoolExecutor import requests # https://pypi.org/project/requests/ import […]

Collect user logons from Windows 10 with Python 3.

This is basically how I collect physical user logons along with reboots, etc. I dump this shit into a database and deliver via a web-page so folks can do dated searches by workstation or user ID. Works beautifully. You will need the Win32api libraries. I am running this on a Win 2019 server from Python3.7, […]

Get all installed software on Windows 10 with Python 3 and WMI.

This is very basic and I’d lie if I said I hadn’t tried looping through the registry for 64/32 bit, but this works great and isn’t missing entries. I deliver this in a web page making it easy to do look ups on most machines in my org. Tweak as you need, add some error […]

Execute PowerShell from Python

I originally wrote this to execute PowerShell scripts from a Flask web interface. You can now install Powershell on Linux. Crazy, ain’t it?

List or search all installed apps on Ubuntu 18.04 with Python.

I was bored… Of course this can be done easily in the terminal, but what’s the fun in that? This should work on any flavor of Debian/Ubuntu. import os import subprocess as sp ”’ Pipe to file in terminal: $ flatpak list –app –show-details > ~/Documents/installed-flatpack.log $ dpkg –get-selections > ~/Documents/installed-software.log Not using Debian? Here’s […]