Categories
Blog

You plan, and God laughs Part 1

As so often in IT, Murphy’s law has struck again.

It was a regular Mgmt CAB (Management Change Advisory Board) when one of the Changes regarding one of my platforms was challenged. In situations like that, I have to decide between a fight or flight response. I chose the second option as I didn’t want to risk a bad surprise and a second look into the Change may be worth it. Later in the same Mgmt CAB another Change was discussed. The project leader told us how much experience he has and how well they tested everything. Nobody questioned it and I was already busy reviewing the Change which was challenged.

“My” Change

It’s important to be convinced about the planing of a Change, as I have to prepare my peers for the sneaky questions of an Mgmt CAB. Roughly what I do is to build my own opinion about:

  • The mitigation of Risks
  • The Quality of the Fallback/Rollback plan
  • The timing of Change (Maintenance windows, Business peaks,…)
  • …tbc

After my analysis, I discuss my findings with the technical teams and they do adjustments if required.

In the end, everyone was convinced in the second Mgmt CAB and the Change went smoothly.

The “low-risk” Change

Unfortunately went the other Change not as smooth. The maintenance work took longer than planned and the tests didn’t cover all affected services. In addition to that, not all stakeholders were considered in the Fallback plan and due to the approved long Maintenance window, the events were not handled as usual and, and, and… Murphy’s law

Categories
Blog Data Science Python

Python random numbers

When I experiment in Python I often need a list of random integers. When I was looking for code to generate that I couldn’t believe how complicated people are doing that and present it after in their blog. Anyway here are two very easy ways to generate random lists.

import random
[random.randint(1,100) for i in range(10)]
#
import numpy as np
np.random.randint(1,100,10)
 

Categories
Blog Data Science Python

Python Tuples

Tuples are immutable sequences typically used to store heterogeneous data. They are similar to Lists but aren’t the same. In this post, I wanna give you a quick intro in Tuples by explaining the differences to Lists.

myList = [1,2,3]

myTuple = (1,2,3)
 

As you can see instead of square brackets [ ] we use parentheses ( ) to create a Tuple.

myList == myTuple # = False

Out[3]: False

myList[2] = 4

myTuple [2] = 4

Traceback (most recent call last):

File "", line 1, in 

    myTuple [2] = 4

TypeError: 'tuple' object does not support item assignment

myTuple = (1,4,3)
 

Although our List and Tuple have the same content, we can’t compare these two objects. Another insight is that values in a List are mutable whereas the values of a Tuple are immutable. To replace a value you have to redefine the Tuple.

Pack and unpack a Tuple

From edX.org Using Python for Research

x = 12.23

y = 23.34

coordinate = (x,y)

coordinate

Out[8]: (12.23, 23.34)

(c1, c2) = coordinate

c1

Out[10]: 12.23

c2

Out[11]: 23.34

As you can see, Tuples can be useful if you save something meaningful and consistent which you want to protect like coordinates. Another benefit is that Tuples are faster than Lists. Especially when you want to iterate through it, use a Tuple instead of a List. (Sorry WordPress Gutenberg is not a big friend of programmers).

Categories
Blog Other IT Stuff Software Packaging

Kill the shortcuts

I’m a big fan of the RuckZuck tool  http://ruckzuck.tools/default.aspx which makes it very easy to download, install or update software.

How does it work

RuckZuck knows the links to the latest versions of Software and the parameters how the software can be installed silently. So if you update or install a software, the tool does download the file(s) from the vendor’s web-site, verifies that the file is valid (based on Hash values) and just triggers a silent install.

ruckzuck.tools (08.09.2018)

My problem

Because the installation is only silent a shortcut will be created. What is something I don’t need for sure. Especially when I set up a computer or I update a long list of applications.

How I fix that

The following code can remove these shortcuts. Just add in the array the name of the shortcut (You don’t have to write the full name but write enough to prevent deleting the wrong shortcut).

$programs =  @("360 Total Sec", "Lenovo", "SHAREit", "PDF24","VLC","Google C","CCleaner") 

foreach($shortcut in $programs){

    $shortcut = "$env:public\Desktop\$shortcut*.lnk" 

     if(Test-Path $shortcut){ 
        rm $shortcut
    } 
}

I run the code after I update my computer. This saves me time because I don’t have to check which links I still need and which I want to delete. I know it sounds super lazy but because of this laziness I learned programing very quickly ;-).

Categories
Blog Software Packaging

TeamViewer Package

If you know how TeamViewer is not that hard to package. Here is a short summary of how you can do that.

  1. Don’t use the exe-file. With a commercial license you can download the MSI-file here 
    https://www.teamviewer.com/en/download/windows/msi/
  2. In addition to the MSI-File(s) you will get a manual which shows you how to export the settings to a reg-file
  3. Unfortunately, you can’t disable the creation of the desktop shortcut. Instead, you have to use a script to remove it.

To export your settings… 
Go to Extras > Options

Options

Do you settings in this part of the menu and continue to Advanced > Show advanced options

Advanced options

Under the advanced options I usually disable the autoupdate. And on the bottom you will see the Export.

Export

Name the generated file TeamViewer_Settings.reg. The only thing you have to do now is to keep it in the same folder as the MSI.

To remove the desktop shortcut you can use powershell

rm “$env:public\Desktop\TeamViewer*.lnk

To sum up, TeamViewer helps packagers a lot with this export options. To bad they don’t give you the option to disable the desktop shortcut. Please consider that this is just a small help. There are still many other settings which you have to do according to the packaging guidelines of your company.

Categories
Blog IT Sec Other IT Stuff

EMail safety check

Are my account data safe?

The most people don’t worry about IT Security. They hear in the news about stolen account data but assume this will never affect them.

I was young and stupid

During Christmas 20… whatever I got a free license for a security suite. Everything was great. The German developer had a good reputation and the download and everything was safe. One year later I got an email that my account data probably got stolen. Whaaaat? Yes the IT Sec. developer got hacked. I never expected that and yep I used the same password for my email account as for the registration of the security suite. I blindly trusted them and thought there is no point to create a new password in my password safe. After my email address was used for spam, luckily the email provider blocked it, I finally got a safe password for the account and… deleted the account.

Again?

Almost 12 years after this incident, a classmate told me about the homepage https://haveibeenpwned.com/ to do a security check of my email address(es). I checked them and… damn. Luckily this time I was prepared and nothing happen, but it is still kind of annoying that somebody could steal my registration data.

What saved my ass the last time?

This is just a short list of things I did and I do now:

  • Use a different password for every page and registration
  • Enable 2-factor authentication
  • Check the internet for breaches
  • Use temporary email addresses if possible https://10minutemail.com/10MinuteMail
  • Use several email accounts and have one you can delete
  • Use fake data e.g. fake name, address,…
  • Check the url and addresses of the emails you reply to
  • Be suspicious, don’t blindly trust

You really have to be aware that the internet isn’t a save place. Protect yourself and always be prepared for the worst case.