Category: Tech

Tech related posts.

Windows 10, NVidia, and Paint Shop Pro

I’m a luddite – I love Paint Shop Pro 9. Yeah, I use Illustrator and Photoshop and Inkscape and Gimp and all that goodness but, in a pinch, PSP9’s been my go-to quick and dirty image manipulator forever.

Then I got a fancy new laptop with a fancy new video card… and PSP9 wouldn’t work. It wouldn’t produce a window on launch, even though I could see it there in the task manager, running. And when I uninstalled and tried to reinstall, it hung for infinity on “registering modules.”

Continue reading

RW Elephant Inventory WordPress Plugin and Divi

This is an obscure one. I have a client that uses this combination for their business. RW Elephant put out their new plugin v2x rather than update their old v1x plugin, and it’s basically like starting over. Honestly, configuration worked pretty well, but there were some problems. Firstly, it defaulted to full browser width on its primary inventory screens, which looked like poop. This was fixed by heading to their rw-elephant.min.css in wp-content\plugins\rw-elephant-retail-inventory\lib\assets\css and changing the .rwe-inventory margin setting to auto and width to 80% in order to shrink and align the inventory content.

Continue reading

VisualCron – Powershell Network Path Truncation

I set up a VisualCron job to kick off a Powershell script to reach out to certain directories – built dynamically from an array – to check for content. The script ran perfectly when invoked manually, but through VisualCron it would error out with a truncated path:

The above path should have been \\atldireng03\e$\download\. I just could not get the path to resolve. The script that builds the path looks similar to this:

Ultimately the issue was one of rights. The account VisualCron was utilizing to invoke the script did not have rights to the administrative share path being built by the script. Change the account to an administrator on the remote server and the script ran like a charm. Now, that it would error out with this weird truncated path problem rather than something referring to a lack of sufficient rights is frustrating. I suppose it’s because it could not ‘see’ the path (hence “it does not exist”), but were you to manually attempt to map to a path you hadn’t rights to pretty much all OSes would return you some kind of informative error about insufficient rights. Not here. And for the record, I haven’t tried running the script manually through a Powershell prompt without rights to the paths to see what happens. It’s entirely probable this uninformative error is on Powershell’s side and not VisualCron.

TTRSS – Call to undefined function mcrypt_decrypt()

I upgraded my TTRSS installation to PHP 7.2, and suddenly I started seeing this pop up when it would attempt to update certain feeds:

When I’d click on those feeds to try and edit them, I’d get this:

Basically something akin to this:

Fatal error: Uncaught Error: Call to undefined function mcrypt_decrypt() in …/include/crypt.php:12 Stack trace: #0 …/classes/pref/feeds.php(633): decrypt_string(‘+rn7weUKbTMS3Ks…’) #1 …/backend.php(130): Pref_Feeds->editfeed() #2 {main} thrown in …/include/crypt.php on line 12

I did a little digging and discovered that mcrypt is defunct in PHP 7.2. Threads on the TTRSS forum spoke of hitting update.php with an argument via command line, but I don’t have command line access to my installation. I dared not ask on the forum as while I love TTRSS, those on the forum are notoriously self-important and assholey, happier to lambast you for being an idiot than actually help. Instead, I started doing some poking and discovered that all the feeds causing this problem had one thing in common – a populated auth_pass field in the ttrss_feeds table in the database. I ran a simple:

update ttrss_feeds set auth_pass=”

(After doing some testing, of course) and the problems disappeared. The communications warning went away, feeds started updating, and I could successfully open the edit dialogs on all my feeds.

Powershell and MP3’s

I’ve been trying in vain to organize my substantial MP3 collection.  I know that in the age of streaming MP3’s are passe, but I just can’t quit ’em.  I listen to a lot of music that isn’t readily available for streaming.

One of the things I’m nitpicky about is Genre tagging.  I like that stuff to be correct.  Thing is, sometimes I get lazy.  So, I dug in to see if I could hack out a quick script to scan subdirectories in my collection and root out MP3’s with incorrect or missing Genre tags. This is a very raw little script with zero error handling.  It examines the first file in every subdir, and writes to an output file every directory where that first file’s genre tag doesn’t match what it should.  It requires taglib-sharp.dll.

# uses taglib-sharp.dll

$outfile = "outfile.csv"
$basedir = "I:\SORTED\Classic Rock"
$subdirs = Get-ChildItem $basedir -attributes D

foreach ($subdir in $subdirs) {
$file = Get-ChildItem $subdir.fullname -Filter *.mp3 | Select-Object -First 1
$f = [TagLib.File]::Create("$ff")
$genre = $f.Tag.Genres
$outt = "$subdir `t $genre"
if ($outt -NotMatch 'Classic Rock') {
$outt | out-file $outfile -append
$f = ""

SQL Powershell tools

I’m not sure why MS makes it so convoluted to install these tools on a server that isn’t running SQL.  Regardless, head here:

And don’t click download.  All that gets you is a text file.  Instead, head down the page and expand Install Instructions.  From there, search for and download the following modules:

  • Microsoft® System CLR Types for Microsoft® SQL Server® 2012 (SQLSysClrTypes.msi)
  • Microsoft® SQL Server® 2012 Shared Management Objects (SharedManagementObjects.msi)
  • Microsoft® Windows PowerShell Extensions for Microsoft® SQL Server® 2012 (PowerShellTools.msi)

If you get a 2503 or 2502 error while trying to install, as I did, you may not have sufficient rights.  Try either killing explorer.exe and restarting it with admin privs or invoking the msi from within an elevated command prompt.

Then just install modules a la:

Import-Module sqlps -DisableNameChecking

Add Bookmark – Google Bookmarks, um, bookmark

In Chrome, create a new bookmark. Name it what you like and set its URL to:

javascript:(function(){var a=window,b=document,c=encodeURIComponent,""+c(b.location)+"&title="+c(b.title),"bkmk_popup","left="+((a.screenX||a.screenLeft)+10)+",top="+((a.screenY||a.screenTop)+10)+",height=510px,width=550px,resizable=1,alwaysRaised=1");a.setTimeout(function(){d.focus()},300)})();

Click it when you’re on a page you’d like to bookmark (and make sure you’re logged into the Googlez).