Wednesday, January 2, 2019

Electronic devices + password + death = pain

A few months ago my wife's mother died. Being the "teksavvy" guy I had to deal with the disconnection of all-the-things electronics, gather devices that needed to be returned to the ISP,...

Good thing she only had a Windows 10 laptop, no cell phone, no tablet.

But my wife wanted to access what was on the laptop before we wiped it and re-purposed it to a family member.

Only thing was that the person (not me) who set it up for her had configured it with a Microsoft LiveID account. We had a bunch of hand written note with passwords, account ID but could not find a password or PIN that worked to login into her Windows profile.

I had done Windows password reset in the past using a Live CD but it was in the Windows NT era...

The first ISO I used was Hiren’s BootCD PE (I'll spare the details that the laptop is UEFI and does not have a built-in CD/DVD drive and I could not get it to boot on USB). Unfortunately it was not able to reset or remove LiveID account password. But I was able to clear the local Administrator account password and this gaining access to the machine. If all fails we could always at least recuperate the files from there. But I wanted full account access.

After a few Google search I found PC Unlocker. Being a FLOSS advocate I tend to dismiss closed source commercial software. But I did not have much more time to spend on this. So I bought a copy for 32.7$CAD and give it a spin.

Sure enough I was able to remove the user account password. I then rebooted, Windows in all it's glory decided to do a HDD scan and repair (why I don't know), but I was then able to login the account without any passwords.

I would have preferred an open-source free utility, but when time is limited it's sometimes worth it to spend 30$ instead of fiddling for hours.

If you know of any FLOSS tool that can reset/clear LiveID account password on Windows let me know !

As a side note, having many electronic devices, accounts and passwords I'll have to evaluate how to deal with this to ease the way for my relatives when (if I ever lol) pass away.


Sunday, December 9, 2018

Day-O: A customizable macOS clock replacement

At work we use week number milestones. Finding which week we are in is always a pain... Until I found Day-O (https://shauninman.com/archive/2016/10/20/day_o_2_mac_menu_bar_clock).

This little piece of software can replace the standard macOS clock and is fully customizable. To install it simply run:

    brew cask install day-o

Then simply start it to get:


You can then click on this new clock and select "Preferences". This is where it gets interesting:
Day-O has multiple placeholders that can be added, all very well documented here: https://shauninman.com/day-o/datetime.html

In my case I simply want to add the week number so I used the following format:
This gives the following clock display:


Next you can remove the standard macOS clock from the control panel.

If you want to move the Day-O clock right in the tool bar simply click on it holding the 'Command' key and slide it in the position you want. For me the final result is:


Hope you find it as useful as I did.


Thursday, November 29, 2018

Helping a STEM student Arduino homework

A few weeks ago I responded on LinkedIn to someone who was looking for someone Arduino savvy. Turned out to be someone looking for help for her daughter that had trouble with a STEM course assignment.

Now I don’t usually do these kind of help. Most of the time it’s lazy students looking for someone to do their homework for them for free of 10$... I have been burned before.

But this time it was different. First it was the parent asking and after a few exchange I could feel that they were willing to put in the effort.

The task at hand was pretty easy. The student needed to reproduce an Instructable project based on an Arduino Uno, a 16x4 LCD and an analog joystick. The Instructable project was this one: https://www.instructables.com/id/Arduino-Looong-Snake-Game-With-LCD-16x4/

I first discovered that they and bought the wrong LCD and did not have the joystick part. I help them source it and during the time they waited for the parts I went on to build it myself. The hardware assembly was pretty straightforward and I had all the parts. Here is the Fritzing diagram:



Next I went on on compiling and uploading the code provided in the Instructable article. It did not work. The code was supposed to wait for you to select a level, but it would instead go straight to the game. Joystick did not work to control the snake… Then when I had that “Oh great, what did I get myself into” moment.

After a 30-40m adding debug print to the serial console and analyzing the code I figured out that the bugs in the code and just fixed it quickly. At least now the code was doing what it was basically designed to do. There are still some bugs in it where the snake jumps sideways, but the plan was never to fix it, just to get it working.

I did adjust the code writing style to match what I use so that it can be somewhat more readable. I did not add any comments or change the code structure.

You can download the fixed source code here: https://gitlab.com/IndianaTux/arduino-snake-game

Now the parent and her daughter got the parts but the male header is not soldered on the LCD and they have yet to find someone to do it. I’ll update this post with issues they went through as I help them out.


Friday, November 16, 2018

Adding shadow to images from the command-line (macos/linux)

When doing documentation, adding a shadow to images or screen grab makes the document come aline and helps break text from images.

For example the following image:


Is pretty "normal" and does not stand-out. However with a single command you can turn it into this:


You will need the ImageMagick package installed: https://www.imagemagick.org/script/download.php

On macOS if you have brew installed it's as simple as running: brew install imagemagick

Then to add a shadow as shown above you simply have to run:

my_image="pi.png" ; cp ${my_image} ${my_image}_original ; convert ${my_image} \( -clone 0 -background gray -shadow 80x3+10+10 \) \( -clone 0 -background gray -shadow 80x3-5-5 \) -reverse -background none -layers merge +repage ${my_image}

Just change my_image="pi.png" to reflact the filename of the image to shich you want to add the shadow to. The above command will create a file with _original which is your original unmodified image.

Wednesday, November 14, 2018

Montreal Advanced Design and Manufacturing Expo 2018

So I attended the the Montreal Advanced Design and Manufacturing Expo at Palais des congrès today.


Was not expecting much, attended out of curiosity. It was really aimed more at the factory automation and packaging business but managed to get to know a couple of sensors manufacturers as well as a Fab (PCB assembly) house that accepts prototype level quantities.

But what I was most disappointed about was the Palais des congrès wifi... On the expo floor I could not connect to the free wifi network from my iPhone of MacBook. It would simply not give me any IP address... The only wifi network that was working was a paid one, so I used one of my 5h of free Fido internet and tethered...

On the floor outside the expo area I managed to connect to the free wifi and get the portal page, but could not get pass it:




So I went over to one of the VanHoutte but it's wifi was locked and I was sitting down with my laptop so did not feel like going to the counter to ask for the password and leave my stuff unattended.

Luckily there was a TimHorton just in front and I was able to connect from there, but my PPTP (yeah I know) would not work...

Wednesday, October 3, 2018

Embedding hardware parts in 3D prints

Yesterday I did my first attempt at embedding a nut in a print...

The idea was to have the nut (8-32 hex nut) be captive in the print so it would not move. I used to simply make the 3D printed hole a bit smaller than the screw and then "force thread the screw in the final print. Works well for small screws like 2mm, but for larger diameter screws the print tends to crack and break.

So here was the design... It's a insertable part in a Nanuk type of rugged case (this particular case is german made and I don't have the manufacturer for electronics.


As you can see there is a hex pattern for the nut.

After slicing the design with Slic3r. I looked at the Gcode output and found which was the last layer printed of that hex pattern. Just before it started to do the part with the top round hole.

Just there I simply inserted an @pause statement in the Gcode file.

An @pause statement simply tells the printer to pause and wait for a resume command. 

When the printer paused, I inserted the 8-32 nut. Now be careful and fast ! Careful because your fingers are close to the hot-end (I used a pair of tweezers) and fast cause you don't want to leave the hot-end not moving for too long.

I use OctoPrint (running on a Raspberry Pi 1, slow WebUI, but it works great!), so once I was done, to resume I simply had to click on the "Resume" button.

And it worked ! The result was very good:




Works very well. I need to experiment on moving the head away and maybe retracting the filament so it does not ooze out when inserting the hardware.

I'll probably try the same method to perform a filament change (change color) at some point.

Friday, September 14, 2018

Getting out of the VoIP business

That's it it''s done...

This week I sent the following e-mail to remaining my VoIP/Asterisk customers:



It's been a fun, what almost 15 years doing VoIP/Asterisk, but I had enough.

Electronic devices + password + death = pain

A few months ago my wife's mother died. Being the "teksavvy" guy I had to deal with the disconnection of all-the-things electr...