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 2,089 other followers

Archive for October 9th, 2018

tcp – How can I trigger a script when a certain port becomes available for requests? – Unix & Linux Stack Exchange

Posted by jpluimers on 2018/10/09

Netcat to the rescue waiting for a Windows 10 upgrade to finish (which can take hours):

while ! nc -z 172.22.0.67 3389; do echo "sleeping"; sleep 10; done; echo 'The server is up!'

Via: [WayBacktcp – How can I trigger a script when a certain port becomes available for requests? – Unix & Linux Stack Exchange, quoting from the answer:

  • nc is Netcat, “the Swiss-army knife for TCP/IP”,
  • -z means: do not send any data, just check if the port is open,
  • while ! nc -z …; do sleep 0.1; done: keep checking and sleeping for one tenth of a second until the port opens up, i.e. Netcat returns with a zero (success) status.

–jeroen

Posted in *nix, *nix-tools, Communications Development, Development, Internet protocol suite, Power User, TCP, Windows | Leave a Comment »

Giving up on the official Ubuntu for Odroid C1 image

Posted by jpluimers on 2018/10/09

After the trouble in Ubuntu: Fixing the myserious “Failed to stop apt-daily.timer: Connection timed out” I got into more trouble:
apt-get update && apt-get upgrade hung the device.

It booted fine, but a new update showed it was in a hosed state.

I don’t expect vendor supported distributions to fail this way, so I gave up on the ubuntu-16.04-minimal-odroid-c1-20160817.img.xz .

–jeroen

root@odroidC1:~# apt-get update && apt-get upgrade
Hit:1 http://ports.ubuntu.com/ubuntu-ports xenial InRelease
Hit:2 http://ports.ubuntu.com/ubuntu-ports xenial-updates InRelease
Hit:3 http://ports.ubuntu.com/ubuntu-ports xenial-backports InRelease
Hit:4 http://ports.ubuntu.com/ubuntu-ports xenial-security InRelease
Hit:5 http://deb.odroid.in/c1 xenial InRelease
Reading package lists… Done
E: dpkg was interrupted, you must manually run 'dpkg –configure -a' to correct the problem.
root@odroidC1:~# dpkg –configure -a
Processing triggers for ureadahead (0.100.0-19) …
Setting up initramfs-tools (0.122ubuntu8.8) …
update-initramfs: deferring update (trigger activated)
Processing triggers for systemd (229-4ubuntu17) …
Processing triggers for initramfs-tools (0.122ubuntu8.8) …
update-initramfs: Generating /boot/initrd.img-4.4.0-28-generic
WARNING: missing /lib/modules/4.4.0-28-generic
Ensure all necessary drivers are built into the linux image!
depmod: ERROR: could not open directory /lib/modules/4.4.0-28-generic: No such file or directory
depmod: FATAL: could not search modules: No such file or directory
depmod: WARNING: could not open /var/tmp/mkinitramfs_FQEGW2/lib/modules/4.4.0-28-generic/modules.order: No such file or directory
depmod: WARNING: could not open /var/tmp/mkinitramfs_FQEGW2/lib/modules/4.4.0-28-generic/modules.builtin: No such file or directory
root@odroidC1:~# df -h
Filesystem Size Used Avail Use% Mounted on
udev 396M 0 396M 0% /dev
tmpfs 81M 3.3M 78M 5% /run
/dev/mmcblk0p2 59G 1.1G 55G 2% /
tmpfs 403M 0 403M 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 403M 0 403M 0% /sys/fs/cgroup
/dev/mmcblk0p1 128M 11M 118M 9% /media/boot

Posted in Development, Hardware Development, Odroid | 3 Comments »

A Key’s Odyssey – the path of a keystroke message through the VCL

Posted by jpluimers on 2018/10/09

Blast from the past, but still relevant, this article by Peter Below:

This article follows the path of a keystroke message through the VCL. You will learn how the key processing is implemented, how the OnKey events work and what intervention points for the programmer can be found in the whole process. In addition, things like message processing are explained, and you will learn how to trace messages in the debugger from the message loop to their eventual destination.

Source: [WayBackA Key’s Odyssey

Via: [WayBack] Vcl.Controls.pasprocedure TWinControl.CNKeyDown(var Message: TWMKeyDown);..if IsMenuKey(Message) then Exit; … – Attila Kovacs – Google+

-jeroen

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

 
%d bloggers like this: