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

OpenSuSE Tumbleweed – when `halt` doesn’t halt, but CLI+HLT the CPU at the end of the shutdown procedure

Posted by jpluimers on 2017/04/26

When halt is not a real halt but a suspend of the CPU.

When halt is not a real halt but a “disabling” of the CPU.

TL;DR:

Don’t use halt, use poweroff instead.

A while ago I wrote about OpenSuSE 12.x not halting after a halt:

The same holds for more recent OpenSuSE systems, but ESXi would never tell what was going on.

Recently I installed an OpenSuSE Tumbleweed system under VMware Fusion (running on Mac OS X) which indicated “The CPU has been disabled by the guest operating system.”

Log indicates a

Log indicates a “Shutdown” which in fact is a CPU not powered down.

Which — Understanding the message: The CPU has been disabled by the guest operating system (2000542) | VMware KB [WayBack] — means that halt will not power down the VM but perform a CLI + HLT on the CPU. This effectively hangs the CPU even though the console log on the right tells does a real Shutdown.

In the past – even under ESXi – a halt would just power down the system, so based on the above I did more digging and fount this very interesting answer in rhel – What is the difference between these commands for bringing down a Linux server? – Unix & Linux Stack Exchange [WayBack] which comes down to:

  • on a systemd [WayBack] based system commands like halt, reboot, shutdown all invoke systemctl [WayBack] calling for a specific target [WayBack].
  • mapping of targets and commands is as follows (quoted from the answer):
    • systemctl isolate halt.target has the shorthands:
      • shutdown -H now
      • systemctl halt
      • plain unadorned halt
    • systemctl isolate reboot.target has the shorthands:
      • shutdown -r now
      • telinit 6
      • systemctl reboot
      • plain unadorned reboot
    • systemctl isolate poweroff.target has the shorthands:
      • shutdown -P now
      • telinit 0
      • shutdown now
      • systemctl poweroff
      • plain unadorned poweroff
    • systemctl isolate rescue.target has the shorthands:
      • telinit 1
      • systemctl rescue
    • systemctl isolate multi-user.target has the shorthands:
      • telinit 2
      • telinit 3
      • telinit 4
    • systemctl isolate graphical.target has the shorthand:
      • telinit 5

For a SysV [WayBack] init runlevels versus systemd targets see:

The systemd parameters making things a bit confusing, for instance you can do reboot --halt and more of those shown in linux – Are there any good reasons for halting system without cutting power? – Super User [WayBack].

That also explains that halt without a powerdown can be useful: it for instance gives the end-user the opportunity to click the reset button instead of the power button after a halt.

–jeroen

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

Easily print GitHub markdown as beautiful PDFs that – in Chrome – immediately download

Posted by jpluimers on 2017/04/26

Printing Markdown with GitPrint

Simply view any Markdown file on GitHub, then in your URL bar replace the github.com part of the URL with gitprint.com — your markdown file will be rendered to a beautiful, printable PDF.

Try an example https://gitprint.com/jquery/jquery/blob/master/README.md

Every once in a while I feel like I’ve been living under a stone for years. Today is such a day as gitprint has been around since 2014 and I only noticed it until now.

It’s cool as it prints any github page (including Markdown, RestructuredText, etc) as a PDF file.

Notes:

Read the rest of this entry »

Posted in Bookmarklet, Development, DVCS - Distributed Version Control, git, GitHub, jQuery, Software Development, Source Code Management, Web Browsers | Leave a Comment »

pestudio – great tool for doing PE executable analysis

Posted by jpluimers on 2017/04/25

pestudio

The standard version of pestudio is free to download as a ZIP file (md5: D62BDE0319015C7CD5ABA8D03A36FFBF).
Once decompressed, pestudio does not require any installation nor does it change the system it is running on.
It is fully portable and runs on any Windows platform. Details about the features of this standard version are available at here [WayBack].

Download pestudio 8.54 [WayBack]

pestudio+

The professional version of pestudio must be purchased and provides the full set of features of the tool. Details about the professional version as well as the licence conditons are available here [WayBack].

Source: pestudio [WayBack]

A great guide is at PeStudio Standard [WayBack] which despite the name does an in-depth explanation on how to use this great tool.

–jeroen

Via: Guide / tutorial, nice tool to examine executables, find virus etc – David Berneda – Google+ [WayBack]

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

Some links for MikroTik tips and scripts

Posted by jpluimers on 2017/04/25

MikroTik has great hardware, but getting things to work can be a bit ehm intimidating.

So here are some links that were useful getting my CCR1009 and CRS226 configurations to do what I wanted.

Very advanced stuff:

Packet flow (maybe the toughest part to wrap your head around):

Scripts:

Load balancing:

Syntax highlighting:

Pictures

Very well written blog:

Manito Network’s Mikrotik solutions blog. In-depth articles on Mikrotik routing, security, best practices, VPN, and more.

Source: Mikrotik — Manito Networks

Solutions for RouterOS-based Mikrotik networks. Includes security and best practices, VPN, routing, switching, and more.

Source: Mikrotik-1 — Manito Networks

–jeroen

Posted in DNS, Internet, IPSec, MikroTik, Network-and-equipment, OpenVPN, Power User, PPTP, routers, VPN | Leave a Comment »

ANSI HTML Adapter example

Posted by jpluimers on 2017/04/24

ANSI HTML Adapter example installation on OpenSuSE Tumbleweed:

zypper addrepo http://download.opensuse.org/repositories/utilities/openSUSE_Factory/utilities.repo
zypper refresh
zypper install aha

On Mac OS X:

brew install aha

Output looks like this: ANSI HTML Adapter example:

diaspore:/etc # aha --version
Ansi Html Adapter Version 0.4.9.0
diaspore:/etc # aha --version | grep aha
diaspore:/etc # aha --version | aha

Ansi Html Adapter Version 0.4.9.0

And the aha --help output on Mac OS X:

Ansi Html Adapter Version 0.4.8.0
aha takes SGR-colored Input and prints W3C conform HTML-Code
use: aha <options> [-f file]
     aha (--help|-h|-?)
aha reads the Input from a file or stdin and writes HTML-Code to stdout
options: --black,      -b: Black Background and White "standard color"
         --pink,       -p: Pink Background
         --stylesheet, -s: Use a stylesheet instead of inline styles
         --iso X,    -i X: Uses ISO 8859-X instead of utf-8. X must be 1..16
         --title X,  -t X: Gives the html output the title "X" instead of
                           "stdin" or the filename
         --line-fix,   -l: Uses a fix for inputs using control sequences to
                           change the cursor position like htop. It's a hot fix,
                           it may not work with any program like htop. Example:
                           echo q | htop | aha -l > htop.htm
         --word-wrap,  -w: Wrap long lines in the html file. This works with
                           CSS3 supporting browsers as well as many older ones.
         --no-header,  -n: Don't include header into generated HTML,
                           useful for inclusion in full HTML files.
Example: aha --help | aha --black > aha-help.htm
         Writes this help text to the file aha-help.htm

Copyleft Alexander Matthes aka Ziz 2015
         zizsdl@googlemail.com
         http://ziz.delphigl.com/tool_aha.php
This application is subject to the MPL or LGPL.

–jeroen


diaspore:/etc # aha –version
Ansi Html Adapter Version 0.4.9.0
diaspore:/etc # aha –version | aha
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt;
<!– This file was created with the aha Ansi HTML Adapter. https://github.com/theZiz/aha –>
<html xmlns="http://www.w3.org/1999/xhtml"&gt;
<head>
<meta http-equiv="Content-Type" content="application/xml+xhtml; charset=UTF-8" />
<title>stdin</title>
</head>
<body>
<pre>
<span style="color:red;font-weight:bold;">Ansi Html Adapter</span> Version 0.4.9.0
</pre>
</body>
</html>

view raw

aha.example.txt

hosted with ❤ by GitHub

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

Some Wireshark links

Posted by jpluimers on 2017/04/24

I don’t use Wireshark enough to be fluent, so here are some links and quotes that proved to be useful for me:

–jeroen

Posted in *nix, *nix-tools, Power User, Wireshark | Leave a Comment »

opensuse – How to run my script after SuSE finished booting up? – Unix & Linux Stack Exchange

Posted by jpluimers on 2017/04/21

For future research: opensuse – How to run my script after SuSE finished booting up? – Unix & Linux Stack Exchange

Reason? Want to show the output of this as the last boot sequence line:

hostname
ip route
echo
ip address | grep -w 'UP\|flags\|inet\|inet6'
echo more detailed info through "ip address" and "ip route"
cat /etc/resolv.conf | grep nameserver

–jeroen

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

when apple.com != apple.com – Phishing with Unicode Domains – Xudong Zheng

Posted by jpluimers on 2017/04/21

Vulnerability in Chrome, Firefox, and Opera makes users susceptible to phishing with Unicode domains.

Source: [Archive.isPhishing with Unicode Domains – Xudong Zheng

Basically these are not the same sites:

Depending on the font used, you might notice it if you look very careful.

Keywords: Unicode codepoints, visual similarity, codepoint to character mapping in fonts, Punycode

Via: [WayBack] Same URL, two websites? (notice the difference)1. https://www.аррӏе.com/2. https://www.apple.com/ – Jean-Luc Aufranc – Google+

References:

–jeroen

Posted in Power User, Security | Leave a Comment »

Tested the CastBuddy extension from the Chrome Web Store: nice, but high CPU usage even when no videos

Posted by jpluimers on 2017/04/21

CastBuddy – Chrome Web Store:

This extension finds videos on the web sites you are browsing and allows you to play them on your Chromecast device.

Works nice if you need it, but uses a lot of CPU (on my Retina MacBook with latest chrome: about 75% of one CPU core) so it drains battery fast.

You can view this high CPU usage in the Chrome Task Manager (which used to be available through chrome://tasks, but this is one of the use full Find Hidden Features On Chrome’s Internal Chrome:// Pages features they removed). Fire up the Chrome Task Manager through the Window menu.

Verdict

Enable only when you need it. Disable after use in chrome://extensions

–jeroen

via: CastBuddy – Chrome Web Store:

When it finds Chromecast comptible videos ( .webm, .mp4, .mkv etc), count of videos is shown over extension’s menubar icon, which you can click to Select a video and extension will send it to your Chromecast device. Once a casting session is established, you can control video playback from Extension’s popup page.

Posted in Chrome, Google, Power User | 2 Comments »

Warning: C64 geek pr0n! A Mind Is Born

Posted by jpluimers on 2017/04/20

Geek pr0n on the C64:

Making a demo in just 256 bytes would be a formidable challenge regardless of platform. A Mind Is Born is my attempt to do it on the Commodore 64. In the absence of an actual 256-byte compo, it was submitted to the Oldskool 4K Intro compo at [WayBackRevision 2017, where it ended up on 1st place.

Source: [WayBackA Mind Is Born

Via:

–jeroen

Read the rest of this entry »

Posted in 6502, C64, Commodore, Development, History, Software Development | Leave a Comment »