We are an independent development group based in Buffalo, NY. We work together to help each other out in our fields and open source projects. We live by the name Silo City Labs and work towards a better future for each other.

Quick Monitor and Restart in Golang

Go Applications On my desktop I was running a processing script that would occasionally hang at high CPU, so I wrote a quick script to monitor it and restart it. You can see it below and change it as needed. Run it like so after compiling to a binary nohup ./restart & The code package main import ( "fmt" "io/ioutil" "log" "os/exec" "runtime" "strconv" "strings" "time" ) func getCPUSample() (idle, total uint64) { contents, err := ioutil. [Read More]

Kafka Cheat Sheet

Throughout my time working with kafka I have developed great software to use with it. But while the software did many things there are other things I still resorted to this cheat sheet for. I have put together this list of commands which I will keep updated here as I find new links and commands that help. My kafka installtion was under /opt/kafka and you will need to change this to your path you installed kafka too. You can also create a symlink and just copy paste commands as they are after changing ip’s.

[Read More]

Getting Started with Golang

Go Applications A Go app can vary from 3 to millions of lines of code. They should also be written with one or multiple files with the extension .go You can use any text editor to write a Go program like nano, but our favorite and most supported is Visual Studio Code. Setting up a Go Environment For all of our tutorials we will be using VSCode to help us ease into the language. [Read More]

Ultra minimal Raspbian Image for Pi Zero and Zero W

I wanted to make a ultra lite image that I can quickly drop Go programs onto. This image had a few requirements, be under 300MB, have less than 20MB ram usage idle, startup in under 5 seconds. I will post below everything I did to strip this down so that it can be replicated in the future. Currently with the steps below I have achieved 427MB/16MB, close to my goal for disk and memory usage is below the goal. As for bootup time, I am limited by network connection time 5+ seconds.

Install a fresh Raspbian Stretch Lite image into the SD card (source).

Configure headless SSH and Wi-Fi (if necessary) before starting the SD card (source).

[Read More]

Raspberry Pi Booting From USB on older models

Booting from USB is easy on a Pi1, Pi2, or Pi3. This can be useful in mamy cases to speed up the performance of your pi when using a slow sd card. It can also provide a reliable location where you operating system data resides. Sd cards are prone to data corruption from writes a operating system ussually does.   Write the latest Raspbian image to an SD card and boot it. [Read More]

Hobbyist 3d printer roundup of 2019

When we first entered 3d printing we started off quickly printing many and many objects. Slowly our printer started to die down once the printer began acting up. Our current printer the Robox rbx1 became the most pain in the ass printer we saw online. Everything was due to the proprietary software and the lack of 3rd party parts.

We started to try and simplify remote access by using Teamviewer and even went as far as to buy a CEL Root SD card. The CEL Root was even worse than our current methods. This is when we finally had it. We wanted an open source printer with a decent bed, 3rd party parts, and Octoprint support.

Together me and my team came up with the list of hobby printers under $2000. We’ll get a decent filament printer now and a small resin printer later.

[Read More]