Andreas Longo
  • Blog
  • Contact
  • Training

Things I learned

Some notes that might be valuable.

all | by date | by topic | search

Active Directory: Managed service accounts

Traditionally, system administrators use Active Directory (AD) basic user accounts with limited permissions to run a service (Service Account). Managed Service Accounts (MSA) are special accounts to eliminate the need for administrators to manually manage the credentials, passwords, and SPNs of traditional service accounts. Also, with MSAs these tasks no longer disrupt a service (no downtime). Pro Administration Automatic password changes. No manual password management. Availability No service downtime for password changes....

February 22, 2021

Getting the uptime from Windows

I was looking for a uptime like command for Windows. The uptime command on Linux: $ uptime 12:53:36 up 5:03, 1 user, load average: 0.83, 0.61, 0.36 $ uptime --pretty up 5 hours, 3 minutes $ uptime --since 2021-02-17 07:50:35 On Windows, there is the cmdlet Get-Uptime which is available for PowerShell version 6+. $ Get-Uptime -Since Monday, January 18, 2021 7:56:57 AM If Get-Uptime is not available, you can query the WMI with a CIM cmdlet....

February 17, 2021

Searching for files and sort them by date

Recursively search for files by name with find. Then, sort the result by time, newest first with ls -lt. $ find . -type f -name "Makefile*" -exec ls -lt {} + -rw------- 1 al al 1916 Feb 17 12:44 ./cc-python/{{cookiecutter.project_repository}}/Makefile -rw------- 1 al al 1862 Feb 17 12:41 ./data-api/Makefile -rw------- 1 al al 963 Feb 16 15:45 ./personal-website/Makefile -rw------- 1 al al 254 Feb 15 17:07 ./cc-python/Makefile

February 17, 2021

Python: Converting `datetime` and `string` types

Converting from datetime to string Use the datetime.strftime() method to convert a Python datetime object to a string of any format. >>> from datetime import datetime >>> dt = datetime(2009, 10, 1, 20, 36, 41) >>> dt.strftime('%d.%m.%Y %H:%M:%S') '01.10.2009 20:36:41' The argument to datetime.strftime() is a format string build with format codes. See strftime() and strptime() Format Codes for a list of available format codes. Converting from string to datetime Use the datetime....

February 16, 2021

Vim: Undo branches

You can retrieve the state of your text as it was some time ago. This concept is called undo tree or undo branches. Moving through the undo tree Go to newer/older text state. g+ g- Go to older text state, 10 minutes before. :earlier 10m Go to newer text state, 5 minutes later. :later 5m Using g- and g+ will get you to all possible text states while repeating u and CTRL-R does not....

February 14, 2021

Editor plugins for working with web APIs

These two plugins might come in handy if you are a developer or consumer of web APIs (e.g. REST). They allow you to send requests to your API and receive responses without leaving your editor. You can quickly explore APIs while saving your calls along the way as simple text file for documentation and sharing. They might supplement or replace tools like curl or Postman in your workflow. This plugin is for Vim....

February 11, 2021

Using PKCS #12 certigicate files with Tomcat for TLS

How to use PKCS #12 archives with Apache Tomcat for Transport Layer Security (TLS). TLS superseded the Secure Sockets Layer (SSL) protocol. In the following example, we create a Tomcat TLS connector and use a PKCS #12 file as keystore. Directory layout ../Tomcat/ ../Tomcat/ | certificates/ | | file.p12 | conf/ | | server.xml The file file.p12 contains the private key and the file server.xml contains the password for the certificate....

January 28, 2021
Blank box in office workspace

Vagrant: Importing a box manually

To download or upgrade a Vagrant box, you can use the command vagrant box add and vagrant box update. Most of the time, you should be fine using these automated processes. But sometimes you need more control. Imagine you are working from home and you need to download several huge boxes. You also have video calls with your customers throughout the day, so your priority is to maintain high call quality....

January 19, 2021

Things I learned

all | by date | by topic | search

Things I learned

all | by date | by topic | search

« Prev 
© 2023 Andreas Longo