When switching my DHCP to a Mikrotik CCR1009, both the AP7920 and AP7921 failed to get IP addresses. The APC7921 would look bounce between waiting and offered states like this:
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.
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.
Note this works only when the VMs have VMware Tools installed (more on that below):
VMWare provides, not surprisingly, a built in tool for this, vmrun. It’s under /Applications/VMware Fusion.app/Contents/Library/vmrun although it has moved around in other Fusion releases a bit.
🍺 vmrun list Total running VMs: 1 .docker/machine/machines/myvm.vmx
🍺 vmrun getGuestIPAddress ~/.docker/machine/machines/myvm.vmx 172.16.213.128
Based on the above path, I added this to my ~/.bash_profile file:
alias vmrun='/Applications/VMware\ Fusion.app/Contents/Library/vmrun'
alias vmrun-list-running-VMs='vmrun list | grep vmx'
vmrun-list-ipv4-of-running-VMs()
{
vmrun-list-running-VMs | while read line ; do echo $line && vmrun getGuestIPAddress $line; done
}
Now I can do this:
$ vmrun-list-ipv4-of-running-VMs /Users/jeroenp/VM/W81Entx64DelphiRegression.vmwarevm/W81Entx64.vmx 172.16.172.135 /Users/jeroenp/VM/diaspore-opensuse-Tumbleweed-x64.vmwarevm/diaspore-opensuse-Tumbleweed-x64.vmx Error: The VMware Tools are not running in the virtual machine: /Users/jeroenp/VM/diaspore-opensuse-Tumbleweed-x64.vmwarevm/diaspore-opensuse-Tumbleweed-x64.vmx $ vmrun-list-ipv4-of-running-VMs /Users/jeroenp/VM/diaspore.opensuse-Tumbleweed-x64/diaspore.opensuse-Tumbleweed-x64.vmx Error: Unable to get the IP address /Users/jeroenp/VM/W81Entx64DelphiRegression.vmwarevm/W81Entx64.vmx 172.16.172.135 $ vmrun-list-ipv4-of-running-VMs /Users/jeroenp/VM/diaspore.opensuse-Tumbleweed-x64/diaspore.opensuse-Tumbleweed-x64.vmx Error: Unable to get the IP address /Users/jeroenp/VM/W81Entx64DelphiRegression.vmwarevm/W81Entx64.vmx 172.16.172.135 $ vmrun-list-ipv4-of-running-VMs /Users/jeroenp/VM/diaspore.opensuse-Tumbleweed-x64/diaspore.opensuse-Tumbleweed-x64.vmx 172.16.172.134 /Users/jeroenp/VM/W81Entx64DelphiRegression.vmwarevm/W81Entx64.vmx 172.16.172.135 $ vmrun-list-ipv4-of-running-VMs /Users/jeroenp/VM/diaspore.opensuse-Tumbleweed-x64/diaspore.opensuse-Tumbleweed-x64.vmx 172.16.172.134 /Users/jeroenp/VM/W81Entx64DelphiRegression.vmwarevm/W81Entx64.vmx 172.16.172.142
These are the messages I observed:
Error: The VMware Tools are not running in the virtual machine: /Users/jeroenp/VM/diaspore-opensuse-Tumbleweed-x64.vmwarevm/diaspore-opensuse-Tumbleweed-x64.vmx Error: Unable to get the IP address 172.16.172.135
Glueing together APIs requires working with JSON: parsing it, extracting it, transforming it. JQ is a fast, lightweight, flexible, CLI JSON processor, that does the job well. Learn how to use it by getting your hands dirty with a JSON blob that represents the open issues in the public Docker GitHub repository.
Hosting Grumpydev Imageflair locally ended with two issues left: an empty image and my wish to include more complete StackExchange bits like the current StackExchange flair does.
I thought fixing the empty image would take a rainy day. It actually took a few rainy hours.
The drawback of having fetchmsttfonts is that the original Microsoft versions of these fonts are downloaded from corefonts.sourceforge.net each time the fetchmsttfonts package is updated, potentially overwriting newer versions of the fonts in that directory. If you don’t want that, use the trick at (not yet archived at the WayBack machine) font handling – install fetchmsttfonts, copy fonts, rpm -e fethmsttfonts, copy fonts back.
Having the fonts installed, I thought the only thing I needed to fix were the multiple references in config.php from that pointed to Arial.TTF. I took the poor man’s approach and just did this being in the directory of config.php:
cp /usr/share/fonts/truetype/arial.ttf Arial.TTF
Filled Imageflair
That didn’t work either: still no text showed.
So I decided to run imageFlair.php from the command line after setting $imageflair_debug = true; in config.php which then resulted in all sorts of warnings like
PHP Warning: imagettftext(): Could not find/open font
After reading I decided to build a small php-gd.tester.php script containing phpinfo(); and gd_info showing these portions for PHP GD (non-relevant bits stripped):
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
In order to scan some local networks for unknown hosts (yes, on some sites you need to perform archeology), I needed the local IPv4 addresses, netmasks and CIDRs on my Mac running OS X.
Part of that is using ifconfig to get local inet information which however uses hexadecimal network masks and delivers no CIDRs.