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 February, 2017

Page dewarping

Posted by jpluimers on 2017/02/28

Flattening images of curled pages, as an optimization problem.

Source: Page dewarping [WayBack]

Great stuff what some day will be very useful as I’ve a truckload of books that need to be scanned someday.

via:

–jeroen

PS: via [WayBackG+ Joseph Mitzen: [WayBackFlameeyes’s Website — Unpaper (fork) repository at [WayBackFlameeyes/unpaper: Forked unpaper repository

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

230 V safety on the work bench – Put your power supply in an old tablet container…

Posted by jpluimers on 2017/02/28

Great tip from Nelis Willers:

230 V safety on the work bench.
Put your power supply in an old tablet container. The high voltage is safely encapsulated and will not accidentally touch something. Of course don’t do this for a kW supply, only where low heat is generated, otherwise you might set a fire!

Source: 230 V safety on the work bench. Put your power supply in an old tablet container…

Posted in Development, Hardware Development, LifeHacker, Power User | Leave a Comment »

New book by +Nick Hodges tech preview by +Stefan Glienke – dependency injection in delphi

Posted by jpluimers on 2017/02/28

[WayBack] New book by +Nick Hodges tech preview by +Stefan Glienke https://leanpub.com/dependencyinjectionindelphivia Jeroen Wiert Pluimers – Google+:

This book covers Dependency Injection from A to Z.  In it you’ll learn about Constructor Injection, Property Injection, and Method Injection.  You’ll learn about the right and wrong way to use the Dependency Injection Container.

Source: Dependency Injection In Delphi by Nick Hodges [Leanpub PDF/iPad/Kindle]

This is the Chapter List:

  • What is Dependency Injection
  • Benefits of Dependency Injection
  • Constructor Injection
  • Property Injection
  • Method Injection
  • Using the Container
  • A Simple Migration Example
  • Advanced Uses of the Container
  • Dependency Injection Anti-patterns
  • A Full, Useful Example
  • Final Thoughts

–jeroen

Source: New book by +Nick Hodges tech preview by +Stefan Glienke https://leanpub.com/…

Posted in Delphi, Delphi 10 Seattle, Delphi 10.1 Berlin (BigBen), Delphi 2010, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Delphi XE7, Delphi XE8, Development, Software Development | Leave a Comment »

Interesting historic read of notes on end 1970s Apple SSAFE project – how it started and ended

Posted by jpluimers on 2017/02/27

This appeared a few days back: [WayBackhttp://bitsavers.trailing-edge.com/pdf/apple/ssafe/Apple_SSAFE_Project.pdf

It’s about “Software and Security from Apple Friends and Enemies” an early exchange of ideas and possibilities for DRM in the Apple ][ and Apple III era.

I got it via my bitsavers.org RSS subscription, but it has been over the net in quite a few other places as well:

I think the most important quote is from the one on reddit, submitted 20170223 by vadermeer  for which I added some WayBack/Archive.is links:

[WayBackFound Internal Apple Memos about copy protection for Apple II, SARA, LISA(self.VintageApple)

Yesterday at the Seattle Goodwill Outlet, where everything is sold by the pound, I noticed the Apple logo on letterhead sticking out from a bin of books, so I started digging. What I found were the 1979-1980 files of Jack MacDonald, manager of system software for the Apple II and /// at the time

They tell the story of project “SSAFE” or “Software Security from Apples Friends and Enemies.” This was a proposal to bring disk copy protection in-house to sell as a service to outside developers. Inter-office memos, meeting notes and progress reports all give a good idea of what a project lifecycle was like. Different schemes and levels of protection are considered, as well as implementation primarily on the Apple II+ and the upcoming SARA (The Apple ///) and Lisa computers. [WayBackRandy Wigginton is featured prominently throughout, along with mentions of Woz and many other familiar names.

The documents were all a jumble so I’ve put them in chronological order and scanned the collection, please enjoy. [Archive.is]

The reddit thread is very nice reading as it explains how close we are now to this Level 1:

Level 1. Totally secure. Absolutely no method of stealing the software. 100% effective. Note that the ideal, level 1, is achievable only through disallowing any access of any kind to the software and the computer. Not very practical in our circumstances.

and this one from boingboing:

It’s so neatly packaged and well-documented it could be a Harvard Business Review case-study.

Edit 20240819: the above Googl links pointed to [Wayback/Archive] Apple SSAFE Project.pdf – Google Drive.

--jeroen

Posted in 6502, Apple, Apple ][, History, Power User | Leave a Comment »

Maybe Probably Dance wrote the fastest hashtable implementation ever

Posted by jpluimers on 2017/02/27

Long read: well worth it. [WayBackI Wrote The Fastest Hashtable | Probably Dance

github repository: skarupke/flat_hash_map: A very fast hashtable

source download: https://github.com/skarupke/flat_hash_map/blob/master/flat_hash_map.hpp

–jeroen

Posted in C++, Development, Software Development | Leave a Comment »

The woods and trees of OpenSuSE on single-board computers – image abbreviations – and getting it installed using OS X

Posted by jpluimers on 2017/02/27

Finding the right image

There are many single-board computers on the OpenSuSE hardware-compatibility list (HCL), including:

A lot of them have ready to go images, often for Tumbleweed, however none of the pages explain the below image differences hence the one-line for each:

Since I wanted a headless system, JeOS was what I needed.

As it wasn’t available for my ODroid C1+ but was for my Raspberry Pi 2 and as my main machine is a 15″ Retina MacBook Pro Late 2013 [WayBack] below are the steps I used to get the image working.

Installing the Raspberry Pi 2 image using OS X

The below Raspberry Pi2 link will redirect to the correct image in the generic download directory http://download.opensuse.org/repositories/devel:/ARM:/Factory:/Contrib:/RaspberryPi2/images/

http://download.opensuse.org/repositories/devel:/ARM:/Factory:/Contrib:/RaspberryPi2/images/openSUSE-Tumbleweed-ARM-JeOS-raspberrypi2.armv7l.raw.xz

For other Raspberry Pi versions, you can find them here:

http://download.opensuse.org/repositories/devel:/ARM:/Factory:/Contrib:/RaspberryPi3/images/openSUSE-Tumbleweed-ARM-JeOS-raspberrypi3.aarch64.raw.xz

http://download.opensuse.org/ports/armv6hl/tumbleweed/images/openSUSE-Tumbleweed-ARM-JeOS-raspberrypi.armv6l-Current.raw.xz

I installed on a 8 gigabyte SD card that revealed itself as /dev/disk1 using this diskutil command (via osx – List all devices connected, lsblk for Mac OS X – Ask Different [WayBack])

diskutil list

So this wrote the image to SD card in a sudo su - prompt:

targetDevice="disk2"
unxz --keep openSUSE-Tumbleweed-ARM-JeOS-raspberrypi2.armv7l-2016.08.20-Build2.1.raw.xz; \
diskutil umount "/dev/${targetDevice}s1"; \
dd bs=1m of="/dev/r${targetDevice}" if=openSUSE-Tumbleweed-ARM-JeOS-raspberrypi2.armv7l-2016.08.20-Build2.1.raw; \
sync; \
diskutil list; \
diskutil eject "/dev/${targetDevice}"

or if you want to select which image to “burn”:

targetDevice="disk2"
imageName="openSUSE-Tumbleweed-ARM-JeOS-raspberrypi2.armv7l-2016.08.20-Build2.1.raw"
imageName="openSUSE-Tumbleweed-ARM-JeOS-raspberrypi.armv6l-2016.11.23-Build2.22.raw"
imageName="openSUSE-Tumbleweed-ARM-JeOS-raspberrypi3.aarch64-2017.01.12-Build3.2.raw"
unxz --keep ${imageName}.xz; \
diskutil umount "/dev/${targetDevice}s1"; \
dd bs=1m of="/dev/r${targetDevice}" if=${imageName}; \
sync; \
diskutil list; \
diskutil eject "/dev/${targetDevice}"

A few notes:

Read the rest of this entry »

Posted in *nix, Development, Hardware, Hardware Development, Linux, Odroid, openSuSE, Power User, Raspberry Pi, Single-Board Computers, SuSE Linux, Tumbleweed | 1 Comment »

iMovie on a 2010 iMac was starting and running slow: 2 simple steps solved that

Posted by jpluimers on 2017/02/27

iMovie on a 2010 iMac was starting and running slow. During startup, it wasn’t using much memory, but during editing it did: less than 2 gigabyte out of 8 gigabyte free memory left.

The hard-disk was like 30% full, there wasn’t much in the cache, few processes were auto-starting and the recycle bin was almost empty.

So my first thought was adding more RAM (which is easy): duplicating it to 16 megabyte was easy and not expensive when you look at the Amazon prices for it.

After that it was faster, but not really fast: especially the loading was still slow (less slow than before, but still taking minutes).

Then I scanned for permission issues and there were quite a few as the machine had been getting updates since 2010. So I repaired the permissions using disk utility.

Now iMovie loaded much faster as well: in under a minute.

So out of 17 Ways to Speed Up Mac OS X Lion – ChrisWrites.com, only 2 steps were really needed so far.

–jeroen

Posted in Apple, iMac, Mac, Mac OS X / OS X / MacOS, Mac OS X 10.6 Snow Leopard, Mac OS X 10.7 Lion, OS X 10.10 Yosemite, OS X 10.11 El Capitan, OS X 10.8 Mountain Lion, OS X 10.9 Mavericks, Power User | Leave a Comment »

bash – cheatsheet to choose between ; or && or || or & via Ask Ubuntu

Posted by jpluimers on 2017/02/26

Cheatsheet:

A; B    Run A and then B, regardless of success of A
A && B  Run B if A succeeded
A || B  Run B if A failed
A &     Run A in background.

Source: bash – Which one is better: using ; or && to execute multiple commands in one line? – Ask Ubuntu [WayBack]

Thanks Jack [WayBack] for the initial answer ubfan1 [WayBack] for getting the formulation right, Hatshepsut [WayBack] for making it a readable cheat-sheet and leftaroundabout [WayBack] for making this brilliant addition using parenthesis which can be used for all permutations:

(A && B) &     In the background: run B if A succeeded

–jeroen

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

Change your passwords and 2FA on a bucketload of sites because of 1139 – cloudflare: Cloudflare Reverse Proxies are Dumping Uninitialized Memory – project-zero – Monorail

Posted by jpluimers on 2017/02/25

There are many sites potentially affected by the recently uncovered cloudflare memory leak bug below.

Read this list to get an impression: [WayBacksites-using-cloudflare/README.md at master · pirate/sites-using-cloudflare

Basically you should change your passwords, 2FA authorisations and any other security hooks going through these sites. There are 1000s of them, including many major sites.

The reason for being so cautious is that the leaks have been cached on many systems, including Google Search. Many providers have scrubbed caches, but the information could still be in some caches, or the caches of end-user machines.

Background reading:

–jeroen

Posted in Power User, Security | Leave a Comment »

Friday fun: Bluetooth Driver installation progress dialogs – via reddit ProgrammerHumor

Posted by jpluimers on 2017/02/24

[WayBack] “So I was trying to install a Bluetooth Driver today… the developer of this program apparently had a little fun with the installation progress dialogs.

Via: [WayBack] So someone tried to install a Bluetooth driver on a Windows machine Source: https://redd.it/5vk3em – This is why I Code – Google+

Read the rest of this entry »

Posted in Fun | Leave a Comment »