Developing for Raspberry Pi with Ultibo

Building apps that will be run on Raspberry Pi will require you in most scenarios to:

  • Develop a regular Linux app
  • Optimised to use hardware and computing power of Raspberry Pi
  • Run it in Raspbian OS or any other Linux distribution of your choice

If you:

  • Can’t or don’t want to base your solution on Linux
  • Need to have nearly no limits and full fexibility
  • Want to learn something really cool

Then you need to get your hands dirty, forget about Linux and start thinking about Ultibo.

What the heck is this? Well… to cite its creators (emphasis and shortening mine):

Ultibo is a complete embedded development environment written specifically for creating applications with small single board computers. It uses many concepts from general operating system design and even borrows information from Linux, but Ultibo is not based on anything else.

Yes, it is what it sounds! No Linux, no console (unless you develop one!), no distro installation. Free Pascal (other languages also partially supported), Lazarus IDE (on any platform), and Raspberry Pi as a target (other platforms also partially covered).

And they’ve told us that Delphi and Pascal programming is long gone and forgotten… Ha! :)

Read More “Developing for Raspberry Pi with Ultibo”

Raspberry Pi-based computer for 80 USD or less?

The variety of original Raspberry Pi editions and thousands of its clones may be a little bit overwhelming.

If you have a problem selecting proper gear box for your scenario or solution this article may help a little bit. I’ll suggest basic components (Raspberry Pi 4’s version, some case and SD card) and a good looking, promising operating system.

Read More “Raspberry Pi-based computer for 80 USD or less?”

File upload blocked despite ALLOW_UNFILTERED_UPLOADS set to true

Some file types are reporting its MIME type different than it is associated with given file extension in WordPress database. Such file upload will be blocked for security reasons (.epub file in my case):

X.epub: Sorry, this file type is not permitted for security reasons

A special ALLOW_UNFILTERED_UPLOADS flag is used in WordPress in such situations. You should try it first. If you still have not satisfying results (i.e. you still can’t upload a file of certain type) then it may mean some MIME table changes made by either your plugin or theme or even a nasty bug in WordPress itself.

In all cases, using must-use plugin with some small filter should solve the problem.

Read More “File upload blocked despite ALLOW_UNFILTERED_UPLOADS set to true”

Disable automatic restarts in Windows 10

Windows knows better then you when to restart your computer. And Windows 10 is the most qualified in such knowledge. That’s why in some scenarios you may lost 40+ tabs open in your browser and a lot of programs running, when your Windows decided that it must be restarted right now.

There are many approaches to preventing Windows 10 from auto-restarting itself:

However, the solution that worked for me is “Disable Automatic Windows 10 Restarts” script at GitHub.

Increasing “Max upload file size” in WordPress the right way

To all those disbelievers — yes, uploading 1 GB or bigger files to WordPress is possible! :)

And you don’t have to play with some workarounds like uploading files through FTP and hard-linking them with your post. You can upload large file right in WordPress built-in file uploader.

However, a lot of steps may be needed before you will be able to achieve this.

Read More “Increasing “Max upload file size” in WordPress the right way”

Uploading MIME-conflicted ebooks and files to WordPress

Starting with 5.0.1 version WordPress introduced an additional security check, where file’s MIME type must match extension. So an attempt to upload any executable file file with .jpg extension will fail with:

Sorry, this file type is not permitted for security reasons

This can be a real pain when trying to upload certain ebook format, because this is exactly the case — a MIME-type conflicted with extension (at least as seen by WordPress). For example: Kindle’s .azw3 files declares itself (content; look inside) as BOOKMOBI. Or .epub format which has application/epub+zip as MIME-type and being a modified version of .zip file or actually a regular .zip file with some predefined content.

There are some ways to workaround this (discussed here), however, not all of them works, sorry!

Read More “Uploading MIME-conflicted ebooks and files to WordPress”