View on GitHub

Quorten Blog 1

First blog for all Quorten's blog-like writings

Here is an interesting Twitter post about the engine of a large container ship. Wow, indeed, very complicated! But it’s definitely worth it if you think at massive scale. Think big, think big, think big.

20200107/https://twitter.com/cybergibbons/status/1176182170546835456

Here is an unrolled Twitter thread, a more convenient reading format if only the images displayed properly.

20200107/https://threadreaderapp.com/thread/1176182170546835456.html

Again, I reiterate, because this is important! Remote syslog over UDP is really easy to setup and configure, look over here for receiver-side configuration, if you are primarily interested in receiving log messages from, say, a network switch or access point device that does not have its own persistent storage for log data.

20200106/https://www.rsyslog.com/receiving-messages-from-a-remote-system/
20200106/https://www.rsyslog.com/storing-messages-from-a-remote-system-into-a-specific-file/

Look here fore setup on the OpenWRT/LibreCMC side.

20200106/https://www.rsyslog.com/storing-messages-from-a-remote-system-into-a-specific-file/

Nevertheless, I haven’t got around to setting up my own system until a long delay after initial research and learning.

This is an interesting article about how some simple one-line changes in some Java code resulted in significant memory performance improvements when running with an old version of Java.

The biggest trick for me to note? Initializing Hash empty objects that never get used. Ever. Why? Well, that’s just what sloppy Java programmers do in big enterprise software.

In my own simple C software, I have always assumed no such sloppiness, and matter of fact I can’t due to the need to support initialize-in-place. But alas, this got to the designers of Java and they did modify later versions of Java to never allocate any memory for an empty Hash set until the first element is avctually written.

20200105/http://blog.pitest.org/how-i-once-saved-half-a-million-dollars-with-a-single-character-code-change/

When buying a PoE switch, I decided to make a compromise: I bought a switch without smart managed support features, hence that means no VLANs. Nevertheless, I persist to ask the question. Can you use VLANs with an unmanaged switch? The answer is yes! Sometimes. How does this work? Basically, forwarding and switching Ethernet packets depends only the source and destination addresses. The switch can use broadcast testing followed by storing into a MAC address table to determine this without any VLAN knowledge. Only the end devices need to have VLAN capabilities, and so long as tagging is used for all VLAN packets, it will all work out just like so.

When might this not work? Some ASIC chipsets are unnecessarily strict in checking packet CRCs and will thus fail on any VLAN tagged packet. Suffice it to say, generally speaking newer ASIC chips will be gracefully designed to handle VLAN tagged packets, but older ones will be unnecessarily stringent.

20200105/DuckDuckGo can an unmanaged switch forward vlan tagged packets
20200105/https://community.netgear.com/t5/Unmanaged-Switches/ingress-tagged-traffic-on-unmanaged-switch/td-p/1122243
20200105/https://serverfault.com/questions/333859/what-happens-when-a-consumer-switch-receives-a-vlan-tagged-ethernet-frame

This is an interesting article about the number square on a Barcelona church that is designed to add up ot 33, Jesus’ age. But also, there are many other mathematical properties that also add up to 33.

20200103/https://blog.sagradafamilia.org/en/divulgation/the-magic-square-the-passion-facade-keys-to-understanding-it/

Jenkins quiet restart

2020-01-02

Categories: jenkins  
Tags: jenkins  

Jenkins will by default continue jobs that have been stopped when it restarts. What if you don’t want to do this? There are two ways. One way is to install the Quiet Start plugin. If that is not available or not possible, a second way is to add some code in init.groovy.d. This looks like some pretty good code:

import jenkins.model.Jenkins
import hudson.security.ACL

// Go into quiet mode
Jenkins.instance.doQuietDown()

// Wake up after an async wait
Thread.start {
  // doCancelQuietDown requires admin privileges
  ACL.impersonate(ACL.SYSTEM)

  // Sleep 5 minutes, in milliseconds
  Thread.sleep(5 * 60 * 1000)
  Jenkins.instance.doCancelQuietDown()
}

It sets the “preparing for shutdown” state to prevent jobs from starting, and it also creates a timeout thread to change back to normal after the timeout elapses.

Read on →

So much old software that I once used simply could not jump the gap from Intel x86 to ARM. What about Haiku? I remember playing around with that in an x86 virtual machine, but alas, I cannot bring those x86 virtual machines with me.

But, lo and behold, apparently Haiku os does run in ARM! Now I just need to figure out how to set up a virtual machine of it on a Raspberry Pi. However, please note that they still say that it is extremely unstable and experimental.

20200101/DuckDuckGo haiku os arm
20200101/https://www.haiku-os.org/guides/building/compiling-arm

Okay, I was definitely speaking too soon. Chances are that many of the other libre operating systems also have an ARM port in the works.