Raspberry Pi Pico W
Just before Christmas I got a Raspberry Pi Pico W to have a play with.
Looking forward to using MicroPython to do some LED flashing and other things.
Started a repo on Github for it Pico W Repo
Search from the command line
A simple Python script to allow you to quickly search from the command line that I’ve been playing with on and off for a while.
https://github.com/alastairhm/searchit
It uses the Python Library Fire to automatically generate the command line interface which is something I stumbled across recently.
You either pass it a paramater for the search term or if one it not passed it used whatever is in your clipboard buffet.
Updating the parameter file you can add other search engines and pick which one to use as your default.
Learn C on Linux
Came across this article of ways to Learn C on Linux which took me back to my 3rd real programming job.
It was with a software house mainly working with C/C++ on Linux/ Unix and embedded systems.
My first real experience use C/C++ in a professional environment, happy days with a good bunch of geeks.
If you’ve never tried it before it would be a good change from more recent languages to learn C for a challenge.
6502 Assembly Language
Been trying to relearn 6502 assembly language for fun, its a lot faster and easier than the first time on actual hardware when I was a teenager.
Been using a book I picked up from eBay Discovering BBC Micro Machine Code by A.P. Stephenson
Using BeebAsm assembler on my Mac with a BBC Micro emulator, rather than build in BBC BASIC one.
You can find my code at Github https://github.com/alastairhm/beebasm
This example draws a line of zeros to Mode 7, see screenshot below.
SystemD Puppet ERB Template for Clustered Minio
@cluster_fqdn is an array of fully qualified domain names of each node in the cluster.
| [Unit] | |
| Description=Minio | |
| Documentation=https://docs.minio.io | |
| Wants=network-online.target | |
| After=network-online.target | |
| After=syslog.target network.target | |
| AssertFileIsExecutable=<%= @installation_directory %>/minio | |
| [Service] | |
| WorkingDirectory=<%= @installation_directory %> | |
| Environment="MINIO_ACCESS_KEY=<%= @access_key %>" | |
| Environment="MINIO_SECRET_KEY=<%= @secret_key %>" | |
| User=<%= @owner %> | |
| Group=<%= @group %> | |
| PermissionsStartOnly=true | |
| ExecStart=<%= @installation_directory %>/minio server --config-dir <%= @configuration_directory %> \ | |
| <% @cluster_fqdn.each_with_index do |fqdn, i| -%> | |
| <%- unless i < (@cluster_fqdn.size - 1) -%> | |
| http://<%= fqdn %><%= @minio_mount_partition %>/minio-data | |
| <%- else -%> | |
| http://<%= fqdn %><%= @minio_mount_partition %>/minio-data \ | |
| <%- end -%> | |
| <% end -%> | |
| StandardOutput=journal | |
| StandardError=inherit | |
| # Specifies the maximum file descriptor number that can be opened by this process | |
| LimitNOFILE=65536 | |
| # Disable timeout logic and wait until process is stopped | |
| TimeoutStopSec=0 | |
| # SIGTERM signal is used to stop Minio | |
| KillSignal=SIGTERM | |
| SendSIGKILL=no | |
| SuccessExitStatus=0 | |
| [Install] | |
| WantedBy=multi-user.target |
https://gist.github.com/alastairhm/51eb6f8bb35b8d785639c3e3165b41ac
Doodle's Geek Monkey by Alastair Montgomery
Building Raspberry PI image using Vagrant
The Vagrant file on https://github.com/alastairhm/pibuild sets up a build environment for building Raspberry Pi images from the repository https://github.com/RPi-Distro/pi-gen.
I am using it to create a custom image minimal with Docker pre-installed based on https://github.com/jonasrosland/pi-gen although you can edit the scripts to pre-install the packages you want in your image.
Doodle's Geek Monkey by Alastair Montgomery
Make a Raspberry Pi Portable Arcade Console (with Retropie)
Looks like a cool project without doing a full arcade machine.


