Jumlins TechBlog

The coding hell and the daily IT of Niklas Jumlin

September 12th, 2018

I found a need to convert ImmutableID (An Azure AD/Office 365 attribute) back and forth to a Hexadecimal-, GUID- and DN value, this in order to match the value to an on-premise Active Directory user.

So I wrote a little script that does all the conversions back and forth to all kinds of formats that I could think of.

Read the rest of this entry »

May 13th, 2015

I recently wrote this script to schedule Memory and vCPU up/downgrades on virtual machines from a VMware PowerCLI enabled vCenter server running Windows.
The script is built upon many useful parts from a script that I found here:

I mainly had to make changes in order for the script to be able to run from Task Scheduler. First of, the script needed to be executed as a different account, one that has permissions in your VMware Cluster to reboot and change configuration of virtual machines. So I created the user svc_sched_script in VMware vCenter and gave it enough permission.

I then needed to save the password (not in clear text) and pass it to the script somehow.

Read the rest of this entry »

February 24th, 2011

I couldn’t find any unpacker that would extract and delete archives for a torrent after a certain period of time or after a certain seed ratio had been reached. I’ve noticed quite alot of people complain about this on, for example, uTorrent’s official forums.

So I wrote this script that will wait for a set amount of hours when a torrent finishes before extracting, deleting archives, moving files into its right location, scraping with EMM or EMM-R (command-line) AND notify XBMC of your new download and update its library.

This script will NOT stop your torrents.
Read the rest of this entry »

October 26th, 2010

A colleague asked me if I could write a script that would move files within a folder or its subfolders that were older than one year into a new location but still keep the directory structure.
I figured it would be quite a challenge so I decided to do it for him; kind as I am =)

As I haven’t been providing this blog with something new in a long time I figured I could make it useful to more people if I added a few things, like different date formats and other various settings.

So here it goes:
Read the rest of this entry »

March 7th, 2010

So in my desperate need to make some application shortcut look pretty in linux, i needed to extract the icon from a windows exe.

The icoutils package provides some very nice tools, one of them being wrestool which i used.
Read the rest of this entry »

June 7th, 2009

So while i was optimizing the graphics for a current project, i fell over this amazing tool… PngOptimizer

It really do what it promises, and so far i have found no problems with the results it produces..

June 7th, 2009

Finally, after been talking about starting a blog for a few years…

This blog is mainly gonna cover what i run into while developing code in PHP, TCL, JavaScript aswell as playing with MySQL, HTML/CSS and what else i need to use.

The blog is mainly targetted at myself, as a archiving tool for different snippets and such.