Igor Kromin |   Consultant. Coder. Blogger. Tinkerer. Gamer.

I've been trying to make our house and specifically the yard have more of a resort/getaway location feel during this current pandemic situation and the lockdowns that have been in place. Setting up the hot tub area to feel like somewhere else has been on top of the priority list. I've already added some bamboo screening so the next logical step was to add some tiki lights.

I've already had a couple of those bamboo flares that are used for burning citronella oil, but since I wanted these to go in an area that was under cover, I didn't want to have exposed flames. So a trip to the local hardware store (Bunnings) and I bought some flame effect solar lights that were of a similar size to the citronella oil containers in the flares.

It was trivial to remove the citronella containers and insert solar lights in their place. The containers were glued in, but that glue came off easily enough. Each of the solar lights was first placed on its stake and then inserted where the container was. This let me control how high the lights were positioned without having to cut any bamboo off. The bamboo fingers cupped around each light very nicely, without any need for zip ties to hold them down. The rubber bands at the base where the bamboo pole split into fingers provided enough pressure to hold everything together.

IMG_8244.jpeg IMG_8246.jpeg


Now each evening as it gets dark, these turn on automatically and they really do look like flickering flames. It makes for a perfect setting when in the hot tub. Best of all they are 100% maintenance free and won't set the place on fire! (one of the citronella flares did burst into flames and burned a good portion of the bamboo when I was experimenting with it).

Continue reading...  

, , ,

A project I've recently started working on is moving away from a legacy Oracle 9i database and I'm helping with the data migration to a new system. That means that I still have to go and poke around the 9i system from time to time. My usual experience has been with Oracle 10g and up so I was surprised when I tried to run 'desc table_name' to get the following error...
Error report -
ORA-01460: unimplemented or unreasonable conversion requested
01460. 00000 - "unimplemented or unreasonable conversion requested"

Luckily the data dictionary still exists and it is still possible to get a description of your table using a standard SQL statement. The following SQL will do the trick... (replace 'table_name' with the actual name of your table).
select column_name, data_type, data_length from all_tab_columns where table_name='table_name'

Continue reading...  

, , ,

I've been meaning to post about this ever since our wedding last year but other posts came up that seemed more interesting to write about. Well now with Mario 35th birthday coming up I figured that this is a great time to show how we put together Mario Warp Pipe succulent planter pots that we used for as bombonieres at our wedding reception.

The idea with these was that we'd plant succulents into each one (they kinda resemble Piranha Flowers right?!) There were some guests from interstate or overseas that couldn't take living plants back with them so 3D printed cacti were made in those cases (as pictured).

So what I started with was a heap of PVC Downpipe Stormcloud Sockets. These had the right shape, but were too long, so had to be cut down to look right. No particular measurement, just what felt 'about right' and then they were all cut to the same size...

IMG_3199.jpg IMG_3201.jpg

I've used a file to smooth down the edges where the pipes were cut off and then the 3D printed bases were glued in with liquid nails.

IMG_3202.jpg IMG_3831.jpg

Continue reading...  

, ,

So I've always found the inability of handling this error quite annoying. It occurs when the login handler attribute in app.yaml is set to admin and you try to access a page while logged in as a non-admin user. There appears no way of telling AppEngine of handling this kind of error beyond the default error message, but I wanted to be sure.
Current logged in user [email protected] is not authorized to view this page.

In the DevServer, the error originates in the appengine/tools/devappserver2/url_handler.py file at around line 143. I'm having a guess here, but the production server is most likely very similar, at least the error is.
elif admin_only and not admin:
logging.debug('admin required, user unauthorized')
start_response('401 Not authorized', [('Content-Type', 'text/html'),
('Cache-Control', 'no-cache')])
return ['Current logged in user %s is not '
'authorized to view this page.'
% email_addr]

Looking at the code confirmed it for me - there is no way of handling this scenario. However I did come up with a kind of a workaround...the workaround is to add a handler for the /logout URL on your app like this...
- url: /logout
script: logout.php
secure: always
redirect_http_response_code: 301

The code for logout.php is then something like this...
use google\appengine\api\users\UserService;
$user = UserService::getCurrentUser();
if (isset($user)) {
echo 'Logged in as ' . $user->getEmail() . (UserService::isCurrentUserAdmin() ? ' (admin)' : '') . '.<br/><a href="' . UserService::createLogoutUrl('/') . '">Log Out</a>';
else {
echo 'Not logged in.';

This code checks if a user is logged in and displays the email address and whether it's an admin user or not. It then also displays a link to the logout URL. Simple.
Logged in as [email protected] (admin).
Log Out

Although the workaround doesn't help handle the error, it does allow to easily log out as a non-admin user and login as an admin user to access a restricted page.

Continue reading...  

, , , ,