Compile locally and run on raspberry pi via Clion

Background

Compiling C/C++ code on the raspberry pi is very slow, I have some code I am writing that compiles in less than 5 seconds on the laptop but can take 30 minutes on the raspberry pi. This is pretty annoying and slows down testing of code tweaks.

I have found a way of automating this quite successfully via Clion (Commerical software from Jetbrains).

Raspberry pi tools

Firstly we need to get the raspberry pi compile toolchain.

https://github.com/raspberrypi/tools

Git clone this somewhere on your local filesystem.

Read more…

Please share 🙂
error

CherryTree custom codeblock background

A ramble of why…..

…..i want to change the background colour of CherryTree’s codeblocks.

I use Linux as my OS of choice and have for many years. One thing that has been missing is a really good all round note application. I have always wanted something like Onenote but for the past few years I have discovered how powerful markdown is. The use of the ‘`’ (back tick) to insert command line or code in the middle of a document is extremely useful, I find it so much easier to read because it breaks down the text into a consumable form.

These days there are a lot of Electron markdown note taking apps popping up, this isn’t necessarily a bad thing but I find electron apps don’t look very good at all in Linux. I use typora at work on my Mac and it looks native. The same application just looks pretty bad under Ubuntu. Yes it does look worse because it is a Snap but even under fedora it isn’t great.

Read more…

Please share 🙂
error

LVM Transaction ID mismatch and metadata resize error

I nearly lost my LVM thin pool on my laptop recently due to the metadata nearly filling up (99.4%). I first noticed this when trying to install something and the root filesystem was read only. Rebooting the machine re-mounted the root partition as RW. Trying to get this pool into a healthy shape gave me all sorts of transaction id and meta errors so hopefully this post will assist someone.

My LVM Layout

I use LVM on my Fedora 27 system along with encryption; it is probably useful to share the layout so the rest of the blog makes sense.

Using the LVS command:

Read more…

Please share 🙂
error

NGINX Reverse Proxy LetsEncrypt Auto-Renew

Intro

I finally got round to moving all my web services off a single server and onto a new server using ESXi virtualisation. I got an older HP G7 DL380 with 2x Intel Xeon CPU’s and 64GB of RAM for around £300 off eBay. It does use more power (Averages 150W) however it is well worth it as it provides full RAID redundancy and virtualisation provides easy backup/snapshots before any modifications. I have decided to create a separate VM for each service and then use NGINX as a reverse proxy to handle all the SSL. This greatly reduces management overhead as I have only got to renew the certificates in one place, it also provides speed improvements as well as security.

I was initially put off LetsEncrypt with its short certificate lifetime and the need for automation, especially when I add a large and complex Apache configuration file however I decided to go for it with a brand new VM and I am glad I did; it is brilliant!!

Read more…

Please share 🙂
error

Restore missing LVM volume group

This post will show you how I managed to restore my laptop after the grub configuration got corrupted and could not find the LVM root partition.
The grub menu booted into grub-rescue which I could not use to boot the LVM partitions as it was an unrecognised file system. Therefore the only thing to do was boot into a LIVE system. I tried several but ended up using an Arch system as I could potentially chroot into the installed system.

Read more…

Please share 🙂
error