ESP8266 RGB controller

I had a sizable pile of infra-red RGB controllers that came with every RGB LED strip I’ve ever purchased. Still, one was never around when I needed it, and the transmission range was so small that I’d have to move closer to the LED strip to change the color anyway. Finally, there were really only a few unique colors - most looked the same as the next. I decided to instead replace the RGB LED PWM generator with an ESP8266 (as a NodeMCU) that I could control via a web interface from my phone. ...

Jul 14, 2020 · 2 min · Kristian Golding

Configuring OSMC for high quality audio

And what I mean by that is, “default all audio output to a USB device, not unlike an O2+ODAC kit from JDS labs”. Step 1: Install OSMC, which is a Kodi-based media entertainment distribution that can run on Raspberry Pi (https://osmc.tv/download/) Step 2: Configure ALSA audio to use the USB audio device as the default (this way, I don’t always have to keep the USB device powered). ...

Jun 9, 2020 · 1 min · Kristian Golding

Pushing to Bitbucket vs Gerrit

This is totally for me in the future because I always bloody forget when switching to a Bitbucket project: Bitbucket (creates the branch remotely, ready for you to make a pull request and add reviewers): git push -u $(git remote) cool_branch_name Gerrit (creates a review against the project_ci branch, whatever that is, ready for you to add reviewers): git push $(git remote) HEAD:refs/for/project_ci

May 20, 2020 · 1 min · Kristian Golding

Setting up a raspberry pi photo viewer (with music)

I set up a Raspberry Pi photo viewer at work to display photos from members of the photo club. Members were instructed to put their photos on a Google Drive location (accessible only within the company VPN) and then the viewer would sync down the photos at a predetermined schedule. To get access to Google Drive, I used rclone. To display I used ‘feh’, which was also used to put text indicating the name of the photo. ...

Feb 9, 2020 · 2 min · Kristian Golding

A journey with "Embedded programming with Android": part 1

I purchased the Kindle edition of this book: https://www.amazon.com/Embedded-Programming-Android-Bringing-Scratch-ebook/dp/B013IQGX3A and since I’m going through the book in 2019, there are a few gaps to bridge.  The first was creating an emulator. I did this via command line, and step 1 was to get a basic Android SDK downloaded. I use Vagrant/Virtualbox for my development, so this was used to set up the SDK put this here Once that’s done, I need to configure my emulator to use Android API 15. To get an idea of what I can install, I use the sdkmanager tool to list all the available options: ...

Nov 13, 2019 · 2 min · Kristian Golding

Server performance monitoring with "Netdata"

I run a couple of servers at work for my skunkworks projects, and I was trying to find a good monitoring tool to see how much stress I was putting them under. I already use “monit” (https://mmonit.com/monit/), running on a Raspberry Pi, to monitor whether a server (and services running on it) is there at all, but for more detailed monitoring, Netdata (https://github.com/netdata/netdata) was the killer app for me. It’s super easy to install, and once up and running you just go to :19999 to check the status. If you leave it idle for a while, it’ll stop updating (nice!), which I thought was good because it does provide a metric ton of information. The really nice thing is that because my servers host a bunch of Docker containers, I can see what *each container* is doing. Too awesome. ...

Nov 12, 2019 · 1 min · Kristian Golding

Adding existing NTFS mount to Linux Mint 19.1

I had a Windows machine that had a Vagrant setup on a different drive. When I replaced the Windows partition with Linux Mint, I wanted to have the other drive, already formatted as NTFS and containing my Vagrant workspace, mounted as /vagrant in the Linux machine. First, I found out the properties of the drive: sudo fdisk -l I found it was a device under /dev/sdb1 and formatted as type HPFS/NTFS/exFAT. Now to open the fstab file ...

Jun 17, 2019 · 1 min · Kristian Golding

Docker image to run a quick PHP test server

I had a need to run a PHP-capable web server on my Vagrant box to locally test some Javascript that queried a database via PHP, and then presented that via Google Charts. This Docker image suited that use case just fine. Replace as appropriate: sudo docker run --name web-server -p 127.0.0.1:80:80 -v /opt/mysql:/var/lib/mysql -v <full path to location you want as root>:/web -d osws/php-web-server ...

Aug 5, 2018 · 1 min · Kristian Golding

Install nodejs

Here is how I install nodejs to get access to cool tools like “tldr” (a summarized version of the typical man pages) and “ungit” (an interface to Git to ease people into using it). Run these two commands to get nodejs: curl -sL https://deb.nodesource.com/setup_9.x | sudo -E bash - sudo apt-get install -y nodejs then you can install ungit, tldr, whatever you want. sudo npm install -g tldr These commands work with Linux Mint 17 (or Ubuntu 14.04). ...

Aug 5, 2018 · 1 min · Kristian Golding

Relocating Git repository to new URL

The best way I found to do this was by running these two commands: git clone --mirror old-remote-url-ending-in-dot-git then move into the directory (ending in .git) that would be created, and run this command: git push --mirror new-remote-url-ending-in-dot-git All existing branches and tags would get pushed at one fell swoop.

Jan 30, 2018 · 1 min · Kristian Golding