Simple but my own. I was looking for such extension to prevent my computer to go to sleep when I step away for a bit, but was not happy with others I found so I decided to write it. Very simple, yet fulfils my needs. Check it out – Keep Awake. It’s already published on Google Web Store.
It uses Chrome power API display setting, so not so powerful, but suitable for me. I already have some ideas for enhancements, so definitely there will be next version/s but not much to upgrade in such a simple tool.
I had a requirement to test Yubikey 5 with PIV for Windows smartcard authentication. There’s four slots for certificates 9a, 9c, 9d and 9e and by default a, d and e work for user authentication, while 9c requires minidriver to work. I wanted to deploy 4 certificates, with iterated names to confirm if slots work and if in fact 9c doesn’t work without minidriver. I used PowerShell to generate certificates:
1.3.6.1.4.1.311.20.2.2 is an OID for smart card logon, which was something I wanted to test, but you can replace or add EKUs using below common OIDs to test against other purposes:
It took me a while but it’s the biggest update so far, at least code wise. Version 1.4.0 allows to set notifications of upcoming Eurojackpot draws. You can mark default values of 24h, 6h and 2h or specify custom value. It can be number of hours to draw, for example 4h, or exact time on the day of the draw, for example 16:35. Extension is using system notifications and on Windows it looks like that:
This is first version that requires permissions. Check Eurojackpot Generator for version control.
Version 1.3.0 of Eurojackpot Generator web browser extension is now published on Chrome Store. I added date of the next draw and countdown towards it. Popup box is also now wider and fonts are slightly changed.
And yet another update to my fancy Eurojackpot Generator. With version 1.2.0 I have added option to copy generated numbers to clipboard. I was thinking if I should add popup confirming it’s copied but it didn’t seem to be user friendly, so numbers are copied just-like-that. That’s it for end users, but I also did some code optimization and cleanup.
I had a need to automate the process of merging PDF files and sending them over to remote computer. It started with just few lines, but it grew in time to cover different scenarios. I also added comments and colors. I thought I will share it. I am using Ghostscript to merge PDFs. Access to remote computer granted through windows share to local account ‘wojtek’. Script goes like this:
Write-Host"SCRIPT STARTED" -ForegroundColor Green# Define pathsWrite-Host"Configuring variables"$localpath = "C:\Temp\SCAN"$remotepath = "\\192.168.0.248\share"$outputFile = "$localpath\scan.pdf"$gs = 'C:\Program Files\gs\gs10.04.0\bin\gswin64c.exe'# Check for file existence$agrEXIST = Test-Path"$localpath\agreements.pdf"$part1EXIST = Test-Path"$localpath\part1.pdf"$anyPDFExist = Test-Path"$localpath\*.pdf"Write-Host"Configuring variables DONE" -ForegroundColor DarkGreen# Exit if there is nothing to processIf (-not ($agrEXIST -or $part1EXIST -or $anyPDFExist)) {Write-Host"Nothing to process... Exiting..."exit}# Warn if only non-standard PDFs existIf (-not ($agrEXIST -or $part1EXIST) -and $anyPDFExist) {Write-Host"Nothing to process... But I found PDF files in the folder. Check if their names are correct - agreements.pdf and part1.pdf, part2.pdf etc."exit}# Map network driveWrite-Host"Mapping kitchen computer as drive Z"net use z: $remotepath /user:wojtek PASSWORD | Out-NullWrite-Host"Mapping kitchen computer as drive Z DONE" -ForegroundColor DarkGreen# Process PDF files if part1.pdf existsIf ($part1EXIST) {Write-Host"Defining settings for PDF merge"$pdfFiles = Get-ChildItem -Path $localpath -Filter "part*.pdf" | ForEach-Object { "`"$($_.FullName)`"" }$args = @("-dBATCH", "-dNOPAUSE", "-q", "-sDEVICE=pdfwrite", "-sOutputFile=$outputFile") + $pdfFilesWrite-Host"Defining settings for PDF merge DONE" -ForegroundColor DarkGreen# Run Ghostscript to merge PDFsWrite-Host"Merging PDFs" & $gs@argsWrite-Host"Merging PDFs DONE" -ForegroundColor DarkGreen# Copy files based on existenceWrite-Host"Copying Scan"Copy-Item$outputFile -Destination z:\Write-Host"Copying Scan DONE" -ForegroundColor DarkGreenIf ($agrEXIST) {Write-Host"Copying Agreements"Copy-Item"$localpath\agreements.pdf" -Destination z:\Write-Host"Copying Agreements DONE" -ForegroundColor DarkGreen }} Else {# Copy only agreements.pdf if part1.pdf does not existWrite-Host"Copying Agreements"Copy-Item"$localpath\agreements.pdf" -Destination z:\Write-Host"Copying Agreements DONE" -ForegroundColor DarkGreen}# Unmap network driveWrite-Host"Removing kitchen computer as drive Z"net use z: /DELETE | Out-NullWrite-Host"Removing kitchen computer as drive Z DONE" -ForegroundColor DarkGreenWrite-Host"SCRIPT COMPLETED" -ForegroundColor Green
Simple, but pretty unusual. Perhaps you’ll find it useful.
Hey folks! My First Web Browser extension – Eurojackpot generator was just submitted to be published on Google Store with latest upgrade. It will now allow to generate between 1-4 sets of Eurojackpot numbers. Maximum of 4 is how much bets you can place on one ticket. Upgraded extension, version 1.1.0 should be published soon on Google Store!