Windows

List installed Windows Updates using WMIC

I have recently been trying to find a way to export a list of some, but not all installed Windows Updates and patches on a Windows 2008 server. WMIC is a Windows command that has been available in Windows for a long time and has become a tool that can perform many kinds of actions […]

Read More
Scripting

Copy EXIF information from one file to another

This is a short post about how to duplicate or copy the EXIF information from one file to another using exiftool. The command comes handy when you have one image with EXIF information and you would like another image to have the exact EXIF information. exiftool -TagsFromFile CopyFromFile.NEF ToFile.JPG This works in both Windows and […]

Read More
Web

PHP script to recreate empty WordPress post slugs

This post describes how I managed to recreate empty WordPress 3.0 permalink post slugs with the post title of the blog posts using a slightly modified version of the script found on another blog post named Bulk update post slugs in a wordpress blog. This script became handy since some of my post slugs was […]

Read More
Linux

Randomize filenames

This is a simple bash script to create random filenames of all jpg-files (*.jpg) in a folder using the linux commands mv, sha1sum and cut. #!/bin/bash # Randomize filenames for fname in *.jpg; do mv “$fname” $(echo “$fname” | \ sha1sum | \ cut -f1 -d ‘ ‘ | \ cut -b 1-5).jpg done The […]

Read More