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,860 other subscribers

Archive for May, 2020

Show openSUSE:Factory / bootchart – openSUSE Build Service

Posted by jpluimers on 2020/05/15

On my research list: [WayBack] Show openSUSE:Factory / bootchart – openSUSE Build Service.

I bumped here when researching on how to list services: [WayBack] init.d – Command to list services that start on startup? – Ask Ubuntu

It seems few people use it on opensuse, but it is interesting for analysing the boot process nonetheless.

I already found out this is in fact bootchart2: [WayBack] GitHub – xrmx/bootchart: merge of bootchart-collector and pybootchartgui

Some links that should help me further are these:

From the last link, this translation:

A. systemd-analyze

You will see the total computer startup time after:

systemd-analyze

A complete list of how much each individual service has taken is when you complete:

systemd-analyze blame

You will see the most problematic processes after you complete:

systemd-analyze critical-chain

You can create a picture:

systemd-analyze plot> /tmp/systemd-analyze.svg

Suitable for: openSUSE 11.4, 12.x, 13.1, Leap 42.x

Not suitable: openSUSE 13.2

B. bootchart

First, install the bootchart package (bootchart 2 version of the program). If you are using openSUSE Leap 42.x or later, enable bootchart2 (and optional bootchart2-done) service:

systemctl enable bootchart2

systemctl enable bootchart2-done

If you are using openSUSE version 13.1 or earlier, go to YaST → (System) → Startup and enter kernel startup parameters:

initcall_debug printk.time = y quiet init = / sbin / bootchartd rdinitrd = / sbin / bootchartd

The next time you start your computer, the /var/log/bootchart.png image will be created to help you further optimize your system startup. For example, if you do not need an AppArmor who cares about security, you can disable the boot.apparmor service through the YaST Service Configuration Module.

Suitable for: openSUSE 11.4, 12.x, 13.1, 13.2, Leap 42.x

–jeroen

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

Listing services on OpenSuSE Linux

Posted by jpluimers on 2020/05/15

Nowadays, most OpenSuSE Linux services are systemd based. Listing those is simple with systemctl list-units --all (configured ones) and systemctl list-unit-files (nonconfigured ones as well), though their states can be many as the command-completion for the --state parameter:

# systemctl list-unit-files --state
abandoned deactivating failed masked not-found remounting-sigterm start-pre stop-sigkill waiting
activating deactivating-sigkill final-sigkill merged plugged running stop stop-sigterm
activating-done deactivating-sigterm final-sigterm mounted registered sigkill stop-post stub
activating-sigkill dead inactive mounting reload sigterm stop-pre tentative
activating-sigterm elapsed listening mounting-done reloading start stop-pre-sigkill unmounting
active error loaded mounting-sigkill remounting start-chown stop-pre-sigterm unmounting-sigkill
auto-restart exited making mounting-sigterm remounting-sigkill start-post stop-sigabrt unmounting-sigterm

The odd thing: not all states from the service list are in the completion. These are missing from the list-unit-files:

generated
static
transient

In the past, most services were System V based, where you can use service --status-all. Contrary to the documentation (which indicates “The –status-all option displays the status of all loaded service units.”), it lists all services.

On OpenSuSE though, it now lists both System V based and systemd based services in one go. Since usually there are no more System V services (virtually all have been migrated to systemd a few years ago), the netto result is systemd services.

Based on [WayBack] init.d – Command to list services that start on startup? – Ask Ubuntu

–jeroen

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

html frames and iframes from other sites that won’t load: some links

Posted by jpluimers on 2020/05/14

Back in the days, framing stuff from other sites would just work. Nowadays, often they don’t because of a variety of reasons, often the site not wanting to be embedded, which is OK with me.

But it pays knowing what they do and how they do it, to ensure it is not an accidental setting of the address bar URL to the wrong value like in

  if(top != window) {
    top.location = window.location
  }

So here are some links for me to dig deeper when I encounter framing issues again:

My basic idea for a workaround is to go through a proxy.

It looks like others had this idea too, so some links future reading via cors proxy – Google Search:

–jeroen

Read the rest of this entry »

Posted in Development, JavaScript/ECMAScript, JSFiddle, Scripting, Software Development, Web Development | Leave a Comment »

Delphi 2007 – move from signature in interface to signature in implementation section

Posted by jpluimers on 2020/05/14

I always thought this was the Ctrl+Shift+Up / Ctrl+Shift+Down in ModelMaker Code Explorer, but it is not: the CnPack navigation is the one that comes most close:

[WayBack] Is there a way in the editor to move from the interface section declaration of a method to its implementation (signature)?… – Bill Meyer – Google+

–jeroen

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

appletv – How can I show a read-only version of Google Calendar on Apple TV 4th generation? – Ask Different

Posted by jpluimers on 2020/05/14

Two calendars and three weather frames.Based on [WayBack] appletv – How can I show a read-only version of Google Calendar on Apple TV 4th generation? – Ask Different there is one choice that might work on Apple TV 3rd generation and 4th generation:

This is the only practical solution I dissected from [WayBackHow to surf the web and use Safari on Apple TV – Macworld UK: Here is how to browse the internet and watch web services on your Apple TV.

Installing requires a few steps as described at

Limiting to only Apple TV 4, another solution is also possible:

However the last solution is not a real web browser, so it does not allow a layout I’m using for the calendar, or actually two calendars:

  • weekly calendar on the left so my brother sees his detailed activities for the upcoming days
  • monthly calendar on the top right for an overview of the past and upcoming weeks
  • three weather frames on the bottom right with two weather radars from different sources and a weather overview for the upcoming days

The reason I need this is because my brother is mentally retarded having problems with abstract concepts like relative time and scheduling. Like me he is also easily distracted and not good at repeating tasks. So looking at a schedule at least once a day is tough for him.

He is very good at concrete topics, especially ones he can put to practice right away like “will it rain on my way to work”. That makes him look at this web page in the first place.

Currently this calendar is shown on a monitor by a Raspberry Pi attached to it.

But I might go for the Apple TV 3 route later on.

–jeroen

Posted in Apple, Apple TV, Development, iOS, iOS Development, Mobile Development, Power User | Leave a Comment »

Posted by jpluimers on 2020/05/14

Patch Windows now. Attackers can exploit CVE-2020-1048 with a single PowerShell command:
Add-PrinterPort -Name c:\windows\system32\ualapi.dll

Attackers can exploit CVE-2020-1048 with a single PowerShell command:
Add-PrinterPort -Name c:\windows\system32\ualapi.dll
On an unpatched system, this will install a persistent backdoor, that won’t go away even after you patch.
See https://windows-internals.com/printdemon-cve-2020-1048/ for more details.

https://twitter.com/aionescu/status/1260466215299973121

Posted in Uncategorized | Leave a Comment »

108 byte CSS Layout Debugger · GitHub

Posted by jpluimers on 2020/05/13

A cool [WayBack] 108 byte CSS Layout Debugger · GitHub (and sligtly different versions) that makes your page look like this:

[].forEach.call($$("*"),function(a){a.style.outline="1px solid #"+(~~(Math.random()*(1<<24))).toString(16)})

 

–jeroen

Posted in CSS, Development, JavaScript/ECMAScript, Scripting, Software Development, Web Development | Leave a Comment »

Men’s Java is not JavaScript Annoyed Programmer/Developer T-Shirt

Posted by jpluimers on 2020/05/13

Though the shirt is not available on Amazon [WayBack] any more, still – after 25 years – so many recruiters still get it wrong.

Not just recruiters, so: [WayBack] Why is JavaScript called JavaScript, since it has nothing to do with Java? – Stack Overflow, thanks to CMS [WayBack]:

From an interview made to its creator Brendan Eich:

InfoWorld: As I understand it, JavaScript started out as Mocha, then became LiveScript and then became JavaScript when Netscape and Sun got together. But it actually has nothing to do with Java or not much to do with it, correct?

Eich: That’s right. It was all within six months from May till December (1995) that it was Mocha and then LiveScript. And then in early December, Netscape and Sun did a license agreement and it became JavaScript. And the idea was to make it a complementary scripting language to go with Java, with the compiled language.

he continues on the relation of ECMAScript based languages:

JavaScript, was originally named Mocha, later it was renamed to LiveScript, and then to JavaScript.

The LiveScript to JavaScript name change came because Netscape and Sun did a license agreement.

The language was then submitted for standarization to the ECMA International Organization. By that time, Netscape didn’t allow the use of the “JavaScript” name, so the standarized language is named ECMAScript.

JavaScript isn’t actually an open name. Now it’s a trademark of Sun (now Oracle).

There still a lot of confusion, some people still think that JavaScript, JScript, and ECMAScript are three different languages.

ECMAScript is the “standards” name for the language.

JavaScript is technically a “dialect” of ECMAScript, the Mozilla Foundation can use “JavaScript” as the name of their implementations (currently present on the Rhino and SpiderMonkey engines).

In the early days, Microsoft decided also to do what Netscape was doing on their own browser, and they developed JScript, which is also an ECMAScript dialect, but was named in this way to avoid trademark issues.

–jeroen

via: [WayBack] Does it bug you when people say Java when they actually mean JavaScript? https://www.amazon.com/dp/B06Y3XK69B – Jeroen Wiert Pluimers – Google+

 

Posted in Development, History, Java, Java Platform, JavaScript/ECMAScript, Scripting, Software Development | Leave a Comment »

Updating Actions (Don’t Do This) – Dave’s Development Blog

Posted by jpluimers on 2020/05/13

I remember fixing a high CPU toggling the Enabled property in an OnUpdate even handler on a TCustomAction descendant quite some time ago, but wasn’t completely sure of the exact cause.

My fix was to only set it once every clock tick (about every 20 milliseconds).

The best fix would have been not to toggle at all: just calculate the right result, then only set the Enabled property once: [WayBack] Updating Actions (Don’t Do This) – Dave’s Development Blog

–jeroen

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

25 Scrum Magnetische Karten Wiederbeschreibbar 7,5 x 7,5 cm. Beschreibbare Magnete für Agile, Kanban oder Lean Board. Haftnotizen leicht abnehmbar und wiederverwendbar (Mix 5 Farben): AmazonSmile: Bürobedarf & Schreibwaren

Posted by jpluimers on 2020/05/12

Works very well: [Archive.is25 Scrum Magnetische Karten Wiederbeschreibbar 7,5 x 7,5 cm. Beschreibbare Magnete für Agile, Kanban oder Lean Board. Haftnotizen leicht abnehmbar und wiederverwendbar (Mix 5 Farben): AmazonSmile: Bürobedarf & Schreibwaren.

They are 7.5x75cm, but the picture below show they also available as 10x15cm and 2.5×2.5cm cards, plus pre-printed scrum/kanban cards, and even magnetic boards for various purposes.

Not all of the sellers allow for VAT invoice, so better check each:

Read the rest of this entry »

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