Category: bash
-
How to Make Verified GitHub Commits
Created by M. Massenzio, 2021-12-24 GitHub has a set of detailed instructions, however, if you know your way around a Linux shell and basic understanding of how keys work, this is a condensed TL;DR version. Also, with minimal effort it could be automated in a shell script (even uploading the key to GitHub via API).…
-
Docker ENTRYPOINT (and a note about $@)
This is something I keep forgetting, so I figure I’ll write it down so it’s here for future reference. General rule: use the exec form of ENTRYPOINT, in other words do this: As expected, this will run apache in the foreground, with PID 1 (unless you’re being a complete idiot and using hostPID – see…
-
Ubuntu: adjust mouse scroll wheel sensitivity
Honestly, it should be easier – then again, it’s Gnome, nothing really is easy. Collecting a combination of various pages (this one finally yielded the right directions) it turns out one has to install imwheel and then adjust the ~/.imwheelrc file: The magic incantation is in the first couple of lines and the value (3…
-
How to emit battery data in a one-liner on MacOS
In MacOS the command to emit data about battery status is: pmset -g batt If you want to record the battery percentage level in a file at regular intervals, here is how to record the data in a one-liner: while true; do \ echo “$(date “+%Y-%m-%d %H:%M:%S”) ” \ “$(pmset -g batt | grep “%”…
-
Running a Bash script forever
It is somewhat desirable to have a Bash script run forever; typical use case is for a long-running Docker container that backgrounds the service, and the startup script (e.g., invoked via the ENTRYPOINT command) needs to be kept alive (terminating the script would result in the process known-as “the container” to terminate too). I have…
-
Using `notify-send` and `yagmail` to send an alert if /boot partition is about to run out of space
Sometimes, you need to send both a visual and email alert for something that is checked using a background process (for example, running a `crontab` job): `notify-send` and `yagmail` provide a more user-friendly alternative on Ubuntu Linux desktop than scraping logs.
-
The art of the command line
This is a very hand summary of daily useful tasks to be used on the command line The Art of the Command Line as the author notes, you can’t really call yourself a “true” developer, if you are not comfortable executing at least basic tasks in a shell. in fact, I would argue, I would…
-
Building a Spark / SciPy / Cassandra “SparkLab” on AWS
I have just completed for a client a complete setup of a “SparkLab” on a cluster of AWS machines: the setup has been completely automated via a Bash script which I have published to this public github gist. The following is a copy of the README file there; the script can be used also on…
-
From null to a hundred in six months
Or how to achieve bi-weekly releases at SaaS scale Background Almost exactly a year ago I joined RiverMeadow: a self-described “cloud mobility” SaaS platform, with the modest task of improving a product I was told was “ready for market” and a team that only needed “some improvement, and a better adoption of Engineering best practices” – in slightly…
-
Automating Eclipse launch
I’ve recently taken up the Eclipse team at Google (we integrate Google’s internal build tools and distributed development environment with the Eclipse Platform) and we are constantly faced with the challenge of maintaining several distributions in a multi-user environment.I thought I’d use some of the goodness we’ve come up with in my home environment too,…