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

When PV Bean Counter stops publishing Sunny Boy 2500TL results to the net

Posted by jpluimers on 2017/04/17

Every once in a while, PV Bean Counter stops reporting results of by Sunny Boy 2500TL. Usually the problem is with the SUNNY EXPLORER software which has (at least) two irritating bugs:

  1. Easy to spot: it can truncate the SunnyExplorer.sx2 file
  2. Harder to spot: corrupted SunnyExplorer.sx2 file

The latter results in these log messages from PV Bean Counter:

9/2/2016 8:16:34 PM :T12 DeviceMgr_SE - Inf :DeviceMgr_SE: Sunny Explorer - CSV Export Failed
9/2/2016 8:16:34 PM :T12 DeviceMgr_SE - Inf :DeviceMgr_SE: UpdateFromDirectory - SunnyExplorer did not retrieve the expected date: 9/1/2016 12:00:00 AM
9/2/2016 8:16:34 PM :T12 DeviceMgr_SE - Inf :DeviceMgr_SE: UpdateFromDirectory - SunnyExplorer did not retrieve the expected date: 9/2/2016 12:00:00 AM

My usual follow up is to open the .sx2 file in Sunny Explorer. In this case this resulted in a MessageBox containing Cannot find Central Directory. It indicates that Sunny Explorer uses SharpZipLib and the .sx2 file is likely using ZIP compression.

In this case, the SunnyExplorer.sx2 file was not truncated, but filled with zero bytes.

Luckily that file gets backed-up often, so it was easy to restore:

  1. Stop the PV Bean Counter service
  2. Restore the .sx2 file
  3. Start the PV Bean Counter service
  4. Wait a while before reports start trickling in.

–jeroen

via: Hooking up a Sunny Boy 2500TL to the net « The Wiert Corner – irregular stream of stuff

Posted in LifeHacker, Power User | Leave a Comment »

MacOS System 7.0.1 Compilation : Apple Computer : Free Download & Streaming : Internet Archive

Posted by jpluimers on 2017/04/17

Cool stuff to compare when I have my Macintosh SE/30 up and running again: [Archive.isMacOS System 7.0.1 Compilation : Apple Computer : Free Download & Streaming : Internet Archive

Everything can either:

There is quite a bite included:

System Programs: Applications: Games: Utilities: Toys:
HyperCard, BBEdit Lite, Risk, HD Setup, Alarm
Macintosh MacDraw, Cannon Fodder, Disinfectant, Clock,
Basics, MacPaint, Shufflepuck. Disk Copy, Calculator,
Control Panels. Microsoft Excel, ResEdit, Note Pad,
Microsoft Word, TeachText, Puzzle,
Microsoft Works, Compact Pro, Mac Gzip,
Orion, Mar, Scrapbook.
Pagemaker, Stuffit Expander,
ZTerm. Stuffit Lite.

The [Archive.is] downloads:

../
00_coverscreenshot.jpg                          04-Apr-2017 04:51     50.9K
00_coverscreenshot_thumb.jpg                    04-Apr-2017 04:51     3.0K
_screenshot.gif                                 04-Apr-2017 04:51     62.7K
hd1.img                                         04-Apr-2017 04:12     20.4M
hd2.img                                         04-Apr-2017 04:12     20.4M
mac_MacOS_7.0.1_compilation.gif                 04-Apr-2017 04:51     4.2K
mac_MacOS_7.0.1_compilation_archive.torrent     16-Apr-2017 21:33     4.5K
mac_MacOS_7.0.1_compilation_files.xml           16-Apr-2017 21:33     3.8K
mac_MacOS_7.0.1_compilation_meta.sqlite         04-Apr-2017 04:51     14.0K
mac_MacOS_7.0.1_compilation_meta.xml            04-Apr-2017 05:49     4.2K
mac_MacOS_7.0.1_compilation_reviews.xml         16-Apr-2017 21:33     633.0B
screenshot_00.jpg                               04-Apr-2017 04:51     50.9K
screenshot_00_thumb.jpg                         04-Apr-2017 04:51     3.0K

–jeroen

Via (and more background info at): [WayBackIn-browser Mac OS 7.0.1 emulation, compatible software suite arrives at the Internet Archive

A pair of 20MB hard drive compilations contain a full MacOS 7.0.1 environment that runs in a browser, and contains an assortment of applications spanning from 1984 to 1991 has appeared on the Internet Archive, with the entire bundle able to be run inside Safari.

 

Posted in Apple, Classic Macintosh, History, Macintosh SE/30, Power User | Leave a Comment »

Launch & Run Multiple Instances of Any Application in Mac OS X

Posted by jpluimers on 2017/04/17

I needed a second instance of Atom to run on a second monitor:

open -n /Applications/Atom.app

Or even shorter:

open -na Atom

I got there via: Launch & Run Multiple Instances of Any Application in Mac OS X

The reason is that searching for Mac OS X start second Atom instance does not reveal satisfactory results, as the tips in these links all fail:

–jeroen

 

Posted in Apple, atom editor, Mac OS X / OS X / MacOS, OS X 10.10 Yosemite, OS X 10.11 El Capitan, OS X 10.9 Mavericks, Power User, Text Editors | Leave a Comment »

Windows update errors you get when you have a bad network connection: 80244019 and

Posted by jpluimers on 2017/04/14

A while ago I had some intermittent network issues resulting in these Windows Update error numbers:

  • 80244019 (some traffic made it through)
  • 80072EE2 (no traffic made it through)
  • 8??????? (DNS traffic didn’t make it through)

–jeroen

Posted in Power User, Windows, Windows 10, Windows 7, Windows 8, Windows 8.1 | Leave a Comment »

Forcing Chrome to use google.com as search engine

Posted by jpluimers on 2017/04/14

I tried the obvious things to force Chrome on my Mac and Windows to use google.com as search engine when searching through the address/search box (omnibox). On Windows, this works fine, but Chrome on Mac (both are linked through my gmail account) keeps insisting to use google.nl no matter what, as all these fail:

There are tons of reports on the google.com/ncr not working (you see the https://google.nl domain, in that search right?).

For me, google.com/ncr redirects to https://www.google.com/?gws_rd=ssl, so it does redirect, but somehow doesn’t mark it to use as default.

In Chrome, my search settings in chrome://settings/searchEngines are these:

Google (Default) search settings

Google (Default) search settings

I’ve never changed it, so it still points to {google:baseURL}search?q=%s&{google:RLZ}{google:originalQueryForSuggestion}{google:assistedQueryStats}{google:searchFieldtrialParameter}{google:searchClient}{google:sourceId}{google:instantExtendedEnabledParameter}{google:contextualSearchVersion}ie={inputEncoding}

So basically, Chrome screws up the {google:baseURL} portion and there is no way to force {google:baseURL} to a certain value as the 2008 bug 1521 was marked “wontfix” in 2010 and nobody at Google seems to care (except a Google employee wanting expense paid trips abroad).

The totally odd thing is that when I start on https://google.com then search for say “Mac OS X start second atom instance”, I get to https://www.google.com/#q=Mac+OS+X+start+second+atom+instance

Poor mans solution

So I’ve defined two new search engine settings:

When Google.com lets you down, force it to use Google.com

When Google.com lets you down, force it to use Google.com

In case you want to copy the text:

Read the rest of this entry »

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

.bashrc generator: create your .bashrc PS1 with a drag and drop interface

Posted by jpluimers on 2017/04/13

Cool: .bashrc generator: create your .bashrc PS1 with a drag and drop interface

http://bashrcgenerator.com/

–jeroen

http://bashrcgenerator.com/ – Joe C. Hecht – Google+

Posted in bash, Development, Scripting, Software Development | Leave a Comment »

How bad is the Windows command line really?

Posted by jpluimers on 2017/04/13

How bad is the Windows command line really?

The Windows command line is bad. Very bad.

But it took until recently for old Windows versions – that out of the box had either no or poor PowerShell versions – to have slowly died.

So only now PowerShell finally has become an option that really works across all Windows versions I use. Go PowerShell!

–jeroen

Posted in Batch-Files, Development, PowerShell, Scripting, Software Development | Leave a Comment »

NeonHorizon/lipopi: Guide to setting up LiPo batteries on the Raspberry Pi

Posted by jpluimers on 2017/04/12

Interesting hardware project: NeonHorizon/lipopi: Guide to setting up LiPo batteries on the Raspberry Pi

Pictures: Daniel Bull – Google+

Basically it’s a mini-UPS that works for any Raspberry Pi, but for a model 3 you have to add a tiny capacitor.

From the readme:

  • Description: LiPoPi is a guide to setting up the Raspberry Pi with a LiPo battery including both running and charging it
  • Project Website: GitHub
  • Requirements: A Raspberry Pi (any model – see notes about the Raspbery Pi 3) and an Adafruit PowerBoost 500 Charger or 1000C Charger
  • Skillset: Requires soldering skills and a basic knowledge of the command line
  • License: GPL Version 3

–jeroen

Read the rest of this entry »

Posted in Development, Hardware Development, Raspberry Pi | Leave a Comment »

Hosting Grumpydev Imageflair locally – part 2 – trying to get the text and images to display

Posted by jpluimers on 2017/04/12

Blank imageFlair

Blank imageFlair

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.

No text

The culprit is that I didn’t have the Microsoft Core Fonts for the Web installed. Which was no coincidence as the free download of those from Microsoft terminated in 2002. The upside is that because of their licenses, they are available as open source and most linux distributions have a script package that will download these fonts. OpenSuSE has fetchmsttfonts for this.

Alternatively, you can use the web.archive.org to download manually, but that’s a tad tedious. But if you love tedious: Free downloads – TrueType core fonts for the Web.

zypper install fetchmsttfonts

That installs the fonts in:

/usr/share/fonts/truetype

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):

Additional .ini files parsed /etc/php5/conf.d/ctype.ini,
/etc/php5/conf.d/dom.ini,
/etc/php5/conf.d/gd.ini,
/etc/php5/conf.d/iconv.ini,
/etc/php5/conf.d/json.ini,
/etc/php5/conf.d/mysql.ini,
/etc/php5/conf.d/mysqli.ini,
/etc/php5/conf.d/pdo.ini,
/etc/php5/conf.d/pdo_mysql.ini,
/etc/php5/conf.d/pdo_sqlite.ini,
/etc/php5/conf.d/sqlite3.ini,
/etc/php5/conf.d/tokenizer.ini,
/etc/php5/conf.d/xmlreader.ini,
/etc/php5/conf.d/xmlwriter.ini

gd

GD Support enabled
GD headers Version 2.1.1
GD library Version 2.1.1
FreeType Support enabled
FreeType Linkage with freetype
FreeType Version 2.6.3
GIF Read Support enabled
GIF Create Support enabled
JPEG Support enabled
libJPEG Version 8
PNG Support enabled
libPNG Version 1.6.21
WBMP Support enabled
XPM Support enabled
libXpm Version 30411
XBM Support enabled
WebP Support enabled

And the gd_info dump:


<?php
echo "<h1>gd_info</h1>";
$gdInfo = gd_info();
echo "<table>";
foreach($gdInfo as $key=>$value) {
echo "<tbody>";
echo "<tr>";
echo "<td class='e'>" . $key . "</td>";
echo "<td class='v'>" . $value . "</td>";
echo "</tbody>";
}
echo "</table>";
?>

GD Version 2.1.1
FreeType Support 1
FreeType Linkage with freetype
T1Lib Support
GIF Read Support 1
GIF Create Support 1
JPEG Support 1
PNG Support 1
WBMP Support 1
XPM Support 1
XBM Support 1
WebP Support 1
JIS-mapped Japanese Font Support

Too bad though: no information on where it sources the fonts from.

No image

Having no solution for the font rendering yet, I focussed at the lack of profile picture.

In the past, the images were generated with gravatar information in the JSON, but now that is empty. See for instance the output of http://superuser.com/users/flair/1.json versus his image http://superuser.com/users/flair/1.png


{
"id": 1,
"gravatarHtml": {
},
"profileUrl": "http:\/\/superuser.com\/users\/1\/jeff-atwood",
"displayName": "Jeff Atwood",
"reputation": "14,561",
"badgeHtml": "<span title=\"24 gold badges\"><span class=\"badge1\">&#9679;<\/span><span class=\"badgecount\">24<\/span><\/span><span title=\"79 silver badges\"><span class=\"badge2\">&#9679;<\/span><span class=\"badgecount\">79<\/span><\/span><span title=\"109 bronze badges\"><span class=\"badge3\">&#9679;<\/span><span class=\"badgecount\">109<\/span><\/span>"
}

view raw

1.json

hosted with ❤ by GitHub

That reveals quite a change in the JSON that imageFlair expects. Actually there is a lot of HTML in there.

So decided to try http://superuser.com/users/flair/1 in addition to http://superuser.com/users/flair/1.json with this result:


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
<html xmlns="http://www.w3.org/1999/xhtml"&gt;
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
.valuable-flair .userInfo .username a, .valuable-flair .mod-flair
{
color: #1086A4;
}
</style>
<link rel="stylesheet" href="//sstatic.net/flair-Default.css" />
</head>
<body>
<div class="valuable-flair">
<div class="gravatar">
<a title="See my profile on Super User" target="_blank" href="http://superuser.com/users/1/jeff-atwood"><div class="gravatar-wrapper-50"><img src="https://www.gravatar.com/avatar/51d623f33f8b83095db84ff35e15dbe8?s=50&amp;d=identicon&amp;r=PG&quot; alt="" width="50" height="50"></div></a>
</div>
<div class="userInfo">
<span class="username"><img src="http://superuser.com/favicon.ico&quot; width="16" /><a href="http://superuser.com/users/1/jeff-atwood&quot; target="_blank">Jeff Atwood</a><span class="mod-flair" title="moderator">&#9830;</span></span>
<br />
<span class="reputation-score" title="reputation score">14,561</span>
<br />
<span title="24 gold badges"><span class="badge1">&#9679;</span><span class="badgecount">24</span></span><span title="79 silver badges"><span class="badge2">&#9679;</span><span class="badgecount">79</span></span><span title="109 bronze badges"><span class="badge3">&#9679;</span><span class="badgecount">109</span></span>
</div>
</div>
</body>
</html>

view raw

1.html

hosted with ❤ by GitHub

Two downsides here:

  1. This doesn’t work for the combined stackexchange flair: http://stackexchange.com/users/flair/1.png works, but http://stackexchange.com/users/flair/1 gives a 404.
  2. Rendering HTML servers side to PNG requires a lot of work.

Time for another rainy day (:

–jeroen

Read the rest of this entry »

Posted in *nix, *nix-tools, bash, Development, Linux, openSuSE, PHP, Pingback, Power User, Scripting, Software Development, Stackoverflow, SuSE Linux | Leave a Comment »

Having one Raspberry Pi reset another Raspberry Pi through relay or transistor

Posted by jpluimers on 2017/04/11

I’m going to build this later, but as the follow up on shortening the RUN pins of a Raspberry Pi to reset it in The woods and trees of OpenSuSE on single-board computers – image abbreviations – and getting it installed using OS X, I want to see if the below will work for me to have a pair (maybe trio?) of Raspberry Pi devices watch each other and reset any hung one.

The need comes because sometimes a Raspberry Pi either hangs or just won’t finish a reboot sequence:

Basically a Raspberry Pi has GPIO pins that can drive electromechanic (like mechanical relay) or electronic (like transistor+resistors or SSR solid-state relay). Examples:

So basic steps:

  1. Get switching gear (relay+diode, transistor+resistors or solid-state-relay)
  2. On each Pi modify the RUN holes so it has a header
  3. Connect header to switching gear
  4. Write watch-dog code to monitor other Pi and flip GPIO pin
  5. Test, test, test

And since I’m relatively new at electronics:

–jeroen

Read the rest of this entry »

Posted in *nix, Development, Hardware Development, Linux, openSuSE, Power User, Raspberry Pi, SuSE Linux | Leave a Comment »