Smart Poi

Whatever happened to processing.js

I have mentioned this before, Processing is the greatest tool to code for me because it provides easy access to so many creative coding options. The main reason I love it so much is because it is cross-platform. I use the same code on the web, desktop and mobile apps (Android).

Now one of those options is less accessible for many new coders. Namely, processing.js.

What is processing.js?

If you don’t know, processing.js is simply a way for your processing (JAVA) code to be translated into JavaScript and run in a browser canvas window.

Why is it cool?

I love processing.js because it’s the easiest way to use the same code and get web-based sketches running on my own server. Just include a processing.js file and the processing sketch (with a tiny bit of html) and it works.

What to do now?

Processing wants us to start using P5.js which is the functionality of Processing but using JavaScript syntax. I am mainly an Android and Java programmer, so for me this is an unnecessary step (mainly involving changing all int’s and floats to var) and I personally will continue using processing.js.

But they took the website away!

Now we come to the reason for this post: they took away the website! If you try and go to processingjs.org website now you will find it’s been taken down by the maintainers. Only the github code is left for posterity. Well luckily there is always the wayback machine: https://web.archive.org/web/20180510071709/http://processingjs.org

Processing.js is alive and well. It’s still working on my site, you can see a load of them all over this site, and on my cv even.

Google Play Store Says NO!

Google Play Store is the portal through which all successful Android Apps have to travel, in order to reach their audience. The last two Apps I tried to upload there were refused, one on the valid grounds of being just a web view. The other, most recently was mistaken by what I can only imagine is an AI to be an Augmented Reality App.

Here is the offending app. Apparently I need to notify people about the confusion that augmented reality can cause. Is this Augmented Reality?

Well try the app out for yourself and see: https://circusscientist.com/SwipeCard.apk

I have changed the age limit to over 18, hopefully this will get my app accepted. Otherwise the only recourse is sending an email to request a review (probably from a bot)

How To Fix the dreaded “Error Establishing A Database Connection” In WordPress

This is just a quick post to note what worked for me. I found loads of tutorials online but none of them had the full story.

Essentially I had to change my database password. Here is what I did:

Assuming you have ssh access to your DigitalOcean Ubuntu droplet:

Fictional Database Name: wordpressDB

Fictional WordPress User Name: wpUser

Fictional Password: 12345

Open your wordpress wp-config.php (usually located at /var/www/html) and change the password, and make a note of the database name and user.

nano /var/www/html/wp-config.php

define( 'DB_PASSWORD', '12345' );

Now change the mySql database details:

mysql -u root -p

use wordpressDB;

UPDATE wp_users SET user_pass = MD5('12345') WHERE ID=1 LIMIT 1;

grant all on wordpressDB.* to 'wpUser'@'localhost' identified by '12345';

flush privileges;

exit;

Conclusion

Anyway that’s what worked for me, hope it helps someone at some point (probably me, in the future). Generally WordPress is pretty stable, this is the first time I encountered this problem.

Legal Animation

A friend who is a graphic artist contacted me, he has a client who is looking for some complex animation of legal transaction history, to illustrate corrupt dealings I imagine.

Anyway, here is the work I’ve done so far.

Hypothetical scenario: There are some terrible things going on at Google, FaceBook and Monsanto. Not to mention the USA, what are they doing with their finances? Check out the attached video to find out!

Corrupt Companies and dodgy dealings

Think I am going to get the gig? At this point I am enjoying creating this program enough not to care.

For those who are interested, the data comes from .csv files – transactions and accounts. Also there are different types of transactions, indicated by a different coloured line. Still a lot to do, but I’m quite proud of this one.

FaceBook is killing me

Here is a tip guys, don’t rely on those big third party services for your livelihood. Due to circumstances beyond my control (coronavirus) my family business has been forced to sink or swim online. We have been doing a ton of marketing, on FaceBook, Instagram, YouTube and the like. Now some bot at FB has flagged my company for “Unusual Activity” and removed my page and also suspended my account.

I’m pretty sure that asking for donations from our followers was the root cause of all this. Whether or not we get back online doesn’t matter, the damage is done. All the links that bounce will reduce our potential to survive the financial squeeze.

All because we used a big, free service, and thought that it was “ours”

Well that is a lesson I won’t need to learn twice. Or at least three times, having already been burned by Google constantly shutting down or ‘upgrading’ services.

UPDATE: Facebook re-instated my account and our business page, no reason given. We removed the reference to paypal payment link, for video show bookings, maybe that was what it was?

Making a Living during the Coronavirus Outbreak, part 2

A CLOWN’S QUEST TO SURVIVE LOCKDOWN

In case you missed the last post, the Corvid-19 epidemic has reduced my income to zero. This is what I am doing to survive.

My best show, now on your TV

The Problem:

My wife and business partner came up with the idea, and did a whole load of FaceBook, Instagram and email marketing, so all of a sudden we had bookings, quite a lot of them. Right now I still have to do 4 more personalised kids show video’s by the end of tomorrow.

This is great, they are only R200 each, about $11 US, but everything counts at the moment. The problem is that each video is 30 minutes long, and on my dual core celeron laptop that equates to 3 hours of rendering each if you want HD.

Get the gig first, now learn how to do it!

So I have google. I have used Kdenlive before which amazingly turns out to be a front end to a command line video editor, “melt“, who knew!

My plan (now working) was this:

  1. Render all the non-changing parts of the video (using a script – you can generate melt .mlt render files for pieces of a project inside Kdenlive and que them with bash)
  2. Script the rendering of personalised voice-over parts of the video
  3. Script the audio from the left stereo channel voice recordings over to being on both sides (why did Kdenlive do this to me?!)
  4. Script all the different pieces getting put back together (1GB file in 15 pieces takes 10 minutes, using ffmpeg)
  5. I used YouTube to help me reduce the quality (for someone who didn’t have bandwidth for 1.2GB download), uploaded to YouTube Studio and set the video to unpublished. Then downloaded lower quality again with youtube-dl, share using Google Drive.

It works, more please!

Now each new video takes about 20 minutes to do, instead of 3-4 hours previously. I am hoping to streamline this even more. I guess if I really needed to I could cobble together a system where all I have to do is say the recipient’s name and their video is generated automatically. Of course that would defeat the purpose of a “personal” video. I really do like to feel like I am giving attention to each order.

Why not order your own video for the kids? Email info@bigtop.co.za to book your personalised show!

*Update: our President just announced an extra two weeks of lockdown for everyone.

Making a living during the Corona virus outbreak..

My whole country is in lockdown right now. As a professional circus performer I am particularly affected by the order to stay at home…

As of writing this post, my last paying function, a small birthday party show, was a week and a half ago. I initially started uploading some crazy stuff to YouTube in the hopes that somebody might notice and donate to my family:

Then my wife had a great idea, why not offer an online show. Skype or Whatsapp video is a bit unreliable, so we came up with the idea of a custom, personalised video for parties, available as an mp4 download. Here is the trailer for our offering:

We have already received some enquiries about this video, here’s hoping enough people want one to make a difference to our financial situation here. I am charging $11 (US) for the full 20-25 min custom show video which will be available as a private download from my server (DigitalOcean of course)

If you are interested in booking the show, please check out https://bigtop.co.za for more details.

Finally, I uploaded an entire show I did for an audience of one (my son) last week. For all the kids who are bored at home:

I am going to continue making video’s and practising for the duration of the lockdown here, as well as working on my new CoronavirusSA tracking android app and other projects.

What are you doing to keep busy in these trying times?

tomjuggler at gmail dot com to get in touch

Remember, stay safe and wash hands people!

postmarketOS first look

At home we have a bunch of old Android devices and laptops. The laptops all have some version of Linux running on them by now, but so far I have only had limited use for the oldest Android devices. I have an old S3 mini for example which has a great screen, but unfortunately LineageOS (the Android Upgrade) latest version available is Nougat, and that runs rather slowly. Besides, I already have two Android devices working with later versions.

PostmarketOS is a fairly new project with the goal of porting Alpine Linux (really small) with mainline kernel to ALL Android devices. Also you can run all types of UI on top of postmarketOS for example Plasma Mobile. I just wanted to see if I could have a device with WiFi which I could use to run some Bash scripts, c programs and possibly Python.

Here is how it works:

  1. You need a computer running linux – install the pmbootstrap program
  2. put phone into fastboot mode – making sure to follow instructions on postmarketOS wiki – S3 mini page was here
  3. after following the install guide (really comprehensive and simple), and choosing the kernel (mainline or the old one from Android), the Desktop (mate, xfce, plasma mobile, and many more), just run the install scripts
  4. ssh into phone via usb (or just use the phone touch screen)
  5. to install any program (from alpine linux) type apk add <program>
  6. a good one to have is corekeyboard (onscreen keyboard for phone)

So here it is then: Mate desktop running on postmarketOS in my S3 mini. (not mainline kernel though):

This is my phone screen now. The menu works and everything! (date and time no)

So far I have not been able to get WiFi working, or Bluetooth, however there is an option to share the laptop internet via USB, so I can still install programs. I installed gcc and compiled and ran a c program, and of course a shell script. This is really a great project and worth checking out if you have an old phone or two lying around.