Igor Kromin |   Consultant. Coder. Blogger. Tinkerer. Gamer.
Notice: I'm taking a break from blogging to focus on Atari Gamer . com, check it out!

I've recently added some code to my Atari Gamer website to email me whenever an error is detected or an exception is thrown from my code. I was expecting to start receiving error detail emails but when they started coming in, I was surprised at the errors that I was seeing.

On the most part what I saw were errors with file_get_contents() whenever I was trying to serve what essentially equates to a '404 page'. The errors looked like this...
ERROR: file_get_contents(../retroarch/ag404.lnx): failed to open stream: No such file or directory

The code was trying to open a file from the application file system. The code causing the above error looked like this...
$content = file_get_contents('../retroarch/ag404.lnx');

Of course the file that the code was trying to open was present on the file system. This was tested on the dev server and worked as expected.

To be sure that the production behaviour was different I decided to have a look at the deployed source code for my app, and was surprised that the 'retroarch' directory that the code was expecting, was not shown in the source code browser. I guess I overlooked testing this on the production server once it eventually got deployed, so it's been running like that for months. Lesson learned - never trust the dev server.

This got me thinking that the problem was most likely with app.yaml. The entry that I had for the 'retroarch' directory looked like this...
- url: /retroarch
static_dir: retroarch
secure: always
redirect_http_response_code: 301

Continue reading...  

, , , ,

I've had my Geeetech A10M 3D printer for quite some time now. Incidentally, it is quite a good, high resolution 3D printer on a budget - I also have the Monoprice Select Mini V2, which comes nowhere near the same level of resolution (though is easier to use).

It's been quite hot and humid here in Australia so my workshop hasn't been the most ideal location for 3D printing, but the show must go on so I kept on trying to fulfil orders. Unfortunately what ended up happening with one of the prints is it came loose off the hot bed and the plastic was deposited all around the extruder hot end. It was an ugly sight to see!

After cleaning everything up, I realised that the thermistor wiring was broken off by the extra plastic that melted around the hot end and I was left with a thermistor lodged inside the hot end with its legs snapped off (bar 1 or 2 mm of wire). I've tried to reconnect it with solder, of course that was useless, so I didn't really have much choice but order a new hot end or try to find a replacement thermistor. I did have a lucky break there though, the A10M thermistor is held in place by a small bolt (removed in the photo), so that was my point of attack...

The part number for the A10M hot end thermistor is PT3-25E2-S2, it's a very small 100kΩ thermistor which seems to be available only from Geeetech. I didn't have time for that, so ended up buying a standard sized 100kΩ thermistor from my local electronics store. Here's the new (left) and the new and old (right) for size comparison...

IMG_0771.jpeg IMG_0778.jpeg

Continue reading...  

, , ,

I've recently had my Mac scanned for a corporate compliance test and the older Java 8 JDK has come up as a failure point. Even though I had newer JDKs installed, it meant that I had to go in and uninstall the one that was making me fail this test. There is good documentation online on how to uninstall a java version on macOS, but I thought that I would walk through the process here anyway...

It looked like I had my default JDK set to the old Java 8 home (running these commands in Terminal.app)...
% java -version
java version "1.8.0_231"
Java(TM) SE Runtime Environment (build 1.8.0_231-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.231-b11, mixed mode)
% grep "export JAVA_HOME" .zprofile
.zprofile:export JAVA_HOME=`/usr/libexec/java_home -v 1.8`

So what I did first was remove that export line from the ~/.zprofile script. Then using the java_home utility, I was able to list all of the java installations that I had...
% /usr/libexec/java_home -V
Matching Java Virtual Machines (4):
14.0.1, x86_64: "Java SE 14.0.1" /Library/Java/JavaVirtualMachines/jdk-14.0.1.jdk/Contents/Home
11.0.7, x86_64: "Java SE 11.0.7" /Library/Java/JavaVirtualMachines/jdk-11.0.7.jdk/Contents/Home
9.0.4, x86_64: "Java SE 9.0.4" /Library/Java/JavaVirtualMachines/jdk-9.0.4.jdk/Contents/Home
1.8.0_231, x86_64: "Java SE 8" /Library/Java/JavaVirtualMachines/jdk1.8.0_231.jdk/Contents/Home

That's quite a few! (also I didn't know that some of these were even installed!)

Using the Terminal.app again, I was able to simply delete the JDKs that I didn't want installed by using the rm command and passing in the Home directory of the JDK to delete (using sudo of course, and entering your admin user password), for example...
sudo rm -rf /Library/Java/JavaVirtualMachines/jdk1.8.0_231.jdk

I proceeded to delete all but the latest JDK using this method. There was nothing else to do after this, the JDK was simply gone!

Continue reading...  

, , , ,

Last year I wrote about revisiting PCBWay as a budget PCB fabrication option in 2019, now that it's 2020, it's time to see what, if anything has changed, improved or got worse. In a nutshell - the online checkout experience has improved, though some features I liked in 2019 have been removed. The PCB quality itself remains great as all the previous years and the price is still budget friendly. Shipping options seem to have improved too, with DHL shipping being probably the best value for money.

If you want a $5 discount off your first order with PCBway, follow this link. There is no catch, you just have to be a new member to be eligible for this offer.

Conversion to Gerber

Last year, PCBway offered an online service to convert Eagle files to Gerber. This has been removed since then due to incompatibly concerns. However, there are still good "how to" articles on generating Gerber files from Eagle and also Eagle 9.x specific notes. Overall the process is simple, use the CAM processor to generate all of your layers and ensure that "Negative image" option is unchecked for the Soldermask Top layer.


Continue reading...  

, , , , ,