Letzen winlogon mit win32evtlog auslesen

Motivation Unserer Zeiterfassungssoftware startet normalerweise beim Hochfahren des Rechners. Im Homeoffice kann es aber passieren, dass der VPN-Client nicht automatisch startet und die Zeiterfassung nicht funktioniert. Dann muss man die Arbeitszeit per Hand eintragen. Dazu schaue ich mir im Event Viewer das letzten winlogon-Event an. Um nicht mehr in der Ereignisanzeige suchen zu müssen, habe…

Pillow how to convert images to webp

Motivation WebP is a modern image format that provides superior lossless and lossy compression for images on the web. It was developed by Google, and is designed to be smaller in size than other image formats, while still maintaining high image quality. One reason WebP is often considered better than JPEG is that it can…

Advent of Code 2022 Day 3

Challenge – Part 1 https://adventofcode.com/2022/day/3 Problem vJrwpWtwJgWrhcsFMMfFFhFp jqHRNqRjqzjGDLGLrsFMfFZSrLrFZsSL PmmdzqPrVvPwwTWBwg wMqvLMZHhHMvwLHjbvcjnnSBnvTQFn ttgJtRGJQctTZtZT CrZsJsPPZsGzwwsLwLmpwMDw The first rucksack contains the items vJrwpWtwJgWrhcsFMMfFFhFp, which means its first compartment contains the items vJrwpWtwJgWr, while the second compartment contains the items hcsFMMfFFhFp. The only item type that appears in both compartments is lowercase p. The second rucksack’s compartments contain jqHRNqRjqzjGDLGL and…

Advent of Code 2022 Day 2

Challenge – Part 1 https://adventofcode.com/2022/day/2 Example For example, suppose you were given the following strategy guide: A Y B X C Z This strategy guide predicts and recommends the following: In the first round, your opponent will choose Rock (A), and you should choose Paper (Y). This ends in a win for you with a…

Advent of Code 2022

Motivation Advent of Code is an Advent calendar of small programming puzzles for a variety of skill sets and skill levels that can be solved in any programming language you like. As I already tried some of the puzzles last year I wanted to see how far I could get this year. Registration To be…

How to deal with date and time in SQLite

Motivation When dealing with databases you will need the ability to store certain dates and/or timestamps in your tables. Let’s find out how you can do that in an SQLite database. SQL table creation SQLite has the data type TIMESTAMP for storing date-times CREATE TABLE social_media ( social_media_id INTEGER, insertion_date TIMESTAMP, yt_subs INTEGER fb_pg INTEGER…