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 […]
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 […]
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 […]
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 […]
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, […]
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 […]
My wife was wanting to see the meta tags embedded in YouTube videos so I whipped up this quick Python script.
I originally wrote this to execute PowerShell scripts from a Flask web interface. You can now install Powershell on Linux. Crazy, ain’t it?
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 […]
My music and photos were getting out of hand. Thought I would share.