WordPress Child Themes (ignoring template-tags.php)

Creating child themes isn’t that hard after all and makes automatic theme updates possible without too much worry.

0

When I set up this site initially, I introduced some changes to the header and footer in their respective php files. Child themes were always an option, but I never used them because I didn’t want to bother with them. There are only a few changes, so I could easily address them when a theme update comes around.

Alas, this is annoying and so I finally created a child theme for twentysixteen. And as it turns out, it wasn’t very hard after all. I just created a folder twentysixteen-child in my WordPress theme folder and added these files:

Continue reading “WordPress Child Themes (ignoring template-tags.php)”

Splitting PDF files with pdfsam

0

I had some trouble saving MS Word form letters to individual files, since Word lacks this functionality and macros didn’t quite do what I needed.

After some more searching I found pdfsam, which is — in its Basic version — free and open source software.

Now after I create a form letter in Word, I save the merged file as a PDF. Afterwards I just run it through pdfsam to split the file into new ones every n pages.

Creating individual files from MS Word form letters (Update)

0

tl;dr: Use pdfsam

MS Word has a good form letter feature, but it’s limited in a way: when you want to save each form letter individually, you’re out of luck. You can only create a single Word document, which contains all letters. I was searching far and wide for a solution to my problem and stumbled upon some Add-ins, but what helped me the most is a simple macro.

Continue reading “Creating individual files from MS Word form letters (Update)”

Serienbriefe als einzelne MS Word-Dokumente (Update)

0

tl;dr: Benutze pdfsam

MS Word hat eine gute Serienbrieffunktion, aber sie hat eine Einschränkung: es können keine einzelnen Dokumente gespeichert werden. Word erstellt lediglich eine Datei, die alle Dokumente enthält. Ich habe weit und breit nach einer Lösung gesucht und bin auf einige Add-ins gestoßen, aber letztendlich half ein einfaches Makro.

Continue reading “Serienbriefe als einzelne MS Word-Dokumente (Update)”

Running Powershell Scripts with Shortcuts and Administrator Priviliges

0

If you want to elevate a powershell to execute a script with admininstrator priviliges, I found this code snippet useful. Used as the first line in your script, it elevates the powershell and triggers a UAC prompt. The rest of the script then gets passed on to the elevated powershell instance.

if (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) { Start-Process powershell.exe "-NoProfile -ExecutionPolicy Bypass -File "$PSCommandPath"" -Verb RunAs; exit }

To run a powershell script with a double click, like with a .bat file, I created a shortcut with these arguments.

C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -File "C:\Users\USERNAME\Documents\ps_scripts\SCRIPTNAME.ps1

This saves me from right clicking and clicking again on the context menu entry for running the script in powershell.