Skip to content

Instantly share code, notes, and snippets.

View jglathe's full-sized avatar
☁️
lots of wires 'n chips

Jens Glathe jglathe

☁️
lots of wires 'n chips
  • Oldschool Solutions
  • Falkensee
  • X @ehtalgj
View GitHub Profile
@jglathe
jglathe / README.md
Created November 12, 2023 17:09
Update Windows Server 2016 (activated) to Windows Server 2019 if you can't get hold of installation media

If you have a Windows Server 2016 running, want/need to do an in-place upgrade to Server 2019, and you're not some company, you have a problem: Unless you have a MSDN subscription, you can't really get an installation ISO image. You will only get an evaluation image. Even if the language is the right one, you can't keep your data with this image. There appears to be a working way to do this, though:

Screenshot from 2023-11-12 17-50-07

Screenshotted because Internet, you never know. With this I was able to do an in-place upgrade of my mail rules server (strange construct, but it works for me). To activate it with my purchased OEM key I had to do 2 steps in a powershell admin shell:

DISM.exe /Online /Get-
@jglathe
jglathe / excerpt.iss
Created April 16, 2023 15:08
innosetup import external library for specific call
[Files]
;for the install package: VersionInfo.dll
Source: "VersionInfo.dll"; Flags: dontcopy;
[Code]
function GetWindowsBuildNumber: Integer;
external '_GetWindowsBuildNumber@0@files:VersionInfo.dll stdcall delayload';
//in a function
@jglathe
jglathe / gist:5df678b164ef4e1ba177a56d8a37715a
Last active March 5, 2020 20:07
Cross-compile ubuntu kernel on amd64 (18.04)
install all the cross-compilers that come up from "fakeroot debian/rules editconfigs"
get the architecture name that debian uses (i686 -> i386, aarch-64 -> arm64) - for reference / guesswork look into linux-hwe_5.3.0-42.34~18.04.1.dsc
use "fakeroot dpkg-buildpackage -ai386 -d [-nc] --no-sign"
There can be errors in the module list. Add missing modules in the <debian>/<arch>/.ignore list. For retry, use -nc to avoid a cleanup. There needs to be some manual intervention if a scratch directory is not empty.
@jglathe
jglathe / gist:0f8586f9dff6b00820e028a10d75cba5
Created September 25, 2019 13:33
git: rename all files to lowercase in a directory tree
for k in $(ls); do cd $k && for i in $( ls | grep [A-Z] ); do git mv -f $i `echo $i | tr 'A-Z' 'a-z'`; done && cd ..;done
@jglathe
jglathe / ioSafeN2_to_DS218P.txt
Last active June 30, 2019 16:56
Replace a faulty IOSafe N2 Mainboard (2013) with one from a DS218+
Well, apparrently this works and can be sort of the cheaper option. The ioSafe N2 has a mainboard from the DS 2xx series. I
bought mine somewhere around the end of 2013, and I got one with a DS213 board in it. It showed flakyness after a few years of
flawless operation. I resoldered the RJ45 socket and USB socket, and I got another 18 months out of it. Now, this fix didn't
work the second time. In search for a replacement board the results turned up pretty thin. I bought a used DS213+ and a shrink
wrapped DS218+ and took the chances in the hope that one of these can be fitted without much changes on the casing.
As it turned out, the backside placement of sockets is identical for DS213+ and DS218+, although my N2 has no eSATA connector.
Doesn't matter, the socket is mounted sunk-in, if you don't have the hole stencilled out it won't be usable, but it is
physically possible to mount this PCB into the N2 case.
All other dimensions appear to fit nicely, the holes match, the microswitches and LEDs are nearly at t
@jglathe
jglathe / fsnotifier-linux-aarch64.gist
Last active February 1, 2021 04:05
Modify PyCharm-CE to run with native fsnotifier on aarch64 (nVidia Jetson Nano)
This is my how-to on getting PyCharm-CE or IDEA to run on a Jetson Nano. Tested with PyCharm-CE 2019.1 Build 191.7479
The linux install package runs on a jetson nano, but with some performance impact:
1. There is no native fsnotifier for linux-aarch64 in the package, and it won't be selected by the application if it would
be there.
2. inotify configuration is missing/not sufficient for PyCharm. Install https://gist.github.com/bittner/c7d1d49fe0c9af907f24
To get a native fsnotifier, you need to compile it from source, and you need to convince the application to select and start it.
This is currently implemented in https://github.com/JetBrains/intellij-community/pull/1140. As long as it is not yet integrated
@jglathe
jglathe / gist:a1fdf55c80a1cfc882af31c978507fa6
Last active May 2, 2019 11:26
Service Tier Administration Tool NAV2018+ add service port 7049 for service tier
I use Service Tier Administration Tool for managing my service tiers for development. It's a great tool, but currently it is not
fit to handle NAV2018 and above service tiers. After creation with the tool ("create instance") they fail to come up.
To make a newly created service work, you need to add urlacl rights for an additional port (7049) and the user the service is
running on.
Use a cmd session with administrative rights:
netsh http add urlacl url=http://+:7049/P4TA_2018_W1_RTM/ user="NT AUTHORITY\NETWORKSERVICE" listen=yes delegate=no
P4TA_2018_W1_RTM is the service instance name, replace it with yours. Likewise the username, if you don't use the built-in one.