The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,854 other subscribers

I am on a Mac that is bound to an AD Domain. The AD Domain has a 90 days pass…

Posted by jpluimers on 2018/08/27

[WayBack] I am on a Mac that is bound to an AD Domain. The AD Domain has a 90 days password expiration policy. When will my password expire? $ cat bin/is-passwor… – Kristian Köhntopp – Google+

For my link archive:


#! /bin/bash —
validFor=$(( 90 * 86400 ))
domainPrefix='/Active Directory/DOMAIN/doma.in/"
lastPW=$(dscl "/$domainPrefix" -read /Users/$USER | awk '/SMBPasswordLastSet/ { print $NF }')
unixPW=$(($lastPW / 10000000 – 11644473600 + $validFor))
expireDate=$(date -r $unixPW)
echo "Password expires $expireDate"

Script copied to [WayBack] Kristian Köhntopp: I am on a Mac that is bound to an AD Domain. The AD Domain has a 90 days password expiration policy. When will my password expire?  · GitHub

–jeroen

Posted in *nix, Apple, bash, Development, Mac, MacBook, MacBook Retina, MacBook-Air, MacBook-Pro, MacMini, Power User, Scripting, Software Development | Leave a Comment »

If your mail auto-responder directs to a new email address, don’t have the new one also auto-respond

Posted by jpluimers on 2018/08/27

Base on the below (Dutch) tweet where an organisation had an auto-responder like this:

Thanks for your message. As of 20150701, we have a new email address: foo@example.org.

Did you use any of our old email addresses, then we forwarded it to the new one.

You will get a response to your e-mail within 5 working days.

Any mail to foo@example.org would get the same auto-response.

They should just leave out the first 2 sentences.

–jeroen

handig @zorgenzekerheid mail naar klantadvies.wlz@zorgenzekerheid.nl geeft reply “een nieuw e-mailadres: klantadvies.wlz@zorgenzekerheid.nl”

 

Posted in LifeHacker, Power User | Leave a Comment »

IRC Private Messages – /msg, /invite, /query, Internet Relay Chat

Posted by jpluimers on 2018/08/27

I’m from the BITNET RELAY era, so every now and then I need to get used to how things are done on IRC:

[WayBack] IRC Private Messages – /msg, /invite, /query, Internet Relay Chat

Summarised in my own words:

  • /msg nick single private message
  • /query nick private channel

–jeroen

Some of my BITNET history: xyzzy, Relay Conferencing before IRC even existed « The Wiert Corner – irregular stream of stuff

Posted in BITNET Relay, Chat, IRC, Power User, SocialMedia | Leave a Comment »

Nice thread starting on the current state of CAs promoting OV/EV instead of doing innovation, with many comments on how to properly use LetsEncrypt

Posted by jpluimers on 2018/08/24

[Archive.isThread by @sleevi_: “It’s a real shame that CAs have gotten so high off their own supply, that they’ve become blind to the real problems they cause by p… – Kristian Köhntopp – Google+

On CAs: [Archive.is] Thread by @sleevi_: “It’s a real shame that CAs have gotten so high off their own supply, that they’ve become blind to the real problems they cause by promoting OV/EV. It’s almost as if they believe that 1988 had all the solutions, and we’ve been declining since then. Example: Let’s say we accept that organizational identity is a valuable component. Coupling it to TLS is terrible, because it encourages all the bad practices we see – such as making it hard to obtain or automate certificates, discouraging key rotation, extending cert lifetime […]”

–jeroen

Twitter thread:

https://twitter.com/sleevi_/status/1012321195562237952

 

Posted in Encryption, Let's Encrypt (letsencrypt/certbot), Power User, Security | Leave a Comment »

Linux: See Bandwidth Usage Per Process With Nethogs Tool – nixCraft

Posted by jpluimers on 2018/08/24

This tutorial explains how to find out network bandwidth usage per process in real time using nethogs tool under Linux operating systems.

Cool tool!

Source: [WayBackLinux: See Bandwidth Usage Per Process With Nethogs Tool – nixCraft

An alternative is iftop – Wikipedia.

via:

–jeroen

Posted in *nix, *nix-tools, Linux, openSuSE, Power User, RedHat, SuSE Linux, Tumbleweed | Leave a Comment »

MS Excel 2011 for Mac: How to Change Data Source for a Pivot Table

Posted by jpluimers on 2018/08/24

Based on [WayBackMS Excel 2011 for Mac: How to Change Data Source for a Pivot Table:

  • Refreshing the data is in the “PivotTable” toolbar under “Data”: either
    • “Refresh” for the current PivotTable or
    • “Refresh All” for all PivotTables in the spreadsheet
  • Setting the range of source data is “Change Source” in the “PivotTable” toolbar under “Data”
    • If your data is on a sheet by itself, it’s better to select the range using column only notation than using column:row notation, compare these:
      • ‘FRITZ!Box_CallList.csv’!$A:$S
      • ‘FRITZ!Box_CallList.csv’!$A$1:$S$401

The last trick makes it way easier to add newer data from an external CSV file into an existing workbook with various PivotTable analysis worksheets:

  1. Append the CSV data to the source
  2. Copy over any formulas needed to make pivot life easier
  3. “Refresh All”

On a 1920×1200 screen, the PivotTable toolbar looks like this:

Excel 2011 for Mac PivotTable toolbar

Excel 2011 for Mac PivotTable toolbar

–jeroen

Posted in Office, Office 2011 for Mac, Power User | Leave a Comment »

Delphi: create or append to a TFileStream

Posted by jpluimers on 2018/08/23

It looks like the Delphi [WayBackTFileStream.Create does not have an overload that allows you to create or append. Luckily, [Archive.is] TFile.Open allows you to do this when passing the correct [Archive.isTFileMode enumeration value:

TempStream := TFile.Open(TempPath, TFileMode.fmOpenOrCreate, TFileAccess.faReadWrite, TFileShare.fsRead);

I still wonder why that never made it into a TFileStream.Create overload, or why these overloads fail to use enumerations or sets of modes.

–jeroen

Posted in Delphi, Development, Software Development | 6 Comments »

How To Make A Good Code Review — Geek&Poke

Posted by jpluimers on 2018/08/23

Source: [WayBackHow To Make A Good Code Review — Geek&Poke

At least we don’t ened to obfuscaste it before shipping.

Rule 1: try to find at least something postive.

–jeroen

via:

Read the rest of this entry »

Posted in Agile, Conference Topics, Conferences, Development, Event, Fun, Software Development | Leave a Comment »

Is there a reason why third party component vendors still ship dfm in binary files …

Posted by jpluimers on 2018/08/23

I knew it was backward compatibility, but TeeChart author David Berneda knew exactly what version:

One old issue with the XE5 osx compiler, some forms in text format raised a “Bad file format” exception, fix was leave them binary

–jeroen

Source: [WayBackIs there a reason why third party component vendors still ship dfm in binary files? – Google+, Stefan Glienke

Posted in Delphi, Development, Software Development | Leave a Comment »

Property/event differences between Delphi forms and frames

Posted by jpluimers on 2018/08/22

From a while back, but still interesting especially because there some differences similar to base/inherited designer objects: [WayBackvcl – How to do bulk -transformation of form to frame- in Delphi? – Stack Overflow:

Observe the differences of a Form and a Frame in your project.

First the project.dpr source:

program Project1;

uses
  Forms,
  Unit1 in 'Unit1.pas' {Form1},
  Unit3 in 'Unit3.pas' {Frame3: TFrame};

{$R *.res}

begin
  Application.Initialize;
  Application.MainFormOnTaskbar := True;
  Application.CreateForm(TForm1, Form1);
  Application.Run;
end.

Differences:

  1. Frame as a more elaborated comment to tell the IDE which designer it should use
  2. Form can be autocreate

Dfm files:

object Form1: TForm1
  Left = 0
  Top = 0
  Caption = 'Form1'
  ClientHeight = 348
  ClientWidth = 643
  Color = clBtnFace
  Font.Charset = DEFAULT_CHARSET
  Font.Color = clWindowText
  Font.Height = -11
  Font.Name = 'Tahoma'
  Font.Style = []
  OldCreateOrder = False
  PixelsPerInch = 96
  TextHeight = 13
end

and

object Frame3: TFrame3
  Left = 0
  Top = 0
  Width = 320
  Height = 240
  TabOrder = 0
end

Frame does not have these properties:

  • Caption
  • ClientHeight
  • ClientWidth
  • Color
  • Font.Charset
  • Font.Color
  • Font.Height
  • Font.Name
  • Font.Style
  • OldCreateOrder
  • PixelsPerInch
  • TextHeight

Sidenote: Frame does not have these events:

  • OnCreate
  • OnDestroy

A Frame has not global variable like this:

var
  Form1: TForm1;

And a Frame descends from TFrame, whereas a form descends from TForm.

Note: with Frame/Form inheritence, your steps become a bit longer.

–jeroen

Some of these are similar to the differences you see here:

–jeroen

PS: Idea: make a wizard or conversion tool for this.

Posted in Conference Topics, Conferences, Delphi, Development, Event, Software Development | Leave a Comment »