Mar 28, 2017

Modifying the content of multiple files in different directories with Powershell

I had the problem to have multiple git repositories checked out from one server.
But now the GIT-Server has moved to a different address and the config file in each
git repository points to the wrong server.

The quick solution would have been, to add the old server into the hosts files with the
IP-Address of the new one.

But the "clean" solution is to update the config file in each repository. On a Linux Box,
a find and sed would have done the job for me.

But I'm now on a Windows Box. I could install the cygwin package or something similar to get
the UNIX-Tools, but I have already Powershell 

To get the files, the simple command is:

Get-ChildItem */.git/config 

To modify the content: 

Get-ChildItem */.git/config | foreach { (Get-Content $_).replace('scm.home.com:8080', 'new-scm.home.com:8082') | Set-Content $_ }


The foreach ( ForEach-Object) loop is taken, to have the Object of each config-File available to
store it again with the "Set-Content $_". 



Mar 6, 2017

BLU Life One X2 was not detected as MTP device on Windows 8.1

After connection the Phone BLU Life One X2 on my laptop, Windows 8.1 PRO didn't recognize the device. The DeviceManager showed an error in the INF-Section. After searching for a resolution,
I was installing some other drivers and many other things, but without success.

Today I found a short hint here.

(1) Go to C:\Windows\INF
(2) Type "wpdmtp.inf" in search bar provided to the right of the address bar in Windows 10.
(3) Once you found it, just right click on it and select install. It will take a very few seconds.
(4) Connect your device to the pc.


After following this simple steps, the Phone was recognized by the system and the internal and SD Card storage is accessible.