A new Litter Survey
In a culmination of litter surveys and litter picks, linked data() and data exploration, and remoteStorage and ActivityPub, I have created a web-based litter pick/survey app that I hope will allow federated citizen science.
In a culmination of litter surveys and litter picks, linked data() and data exploration, and remoteStorage and ActivityPub, I have created a web-based litter pick/survey app that I hope will allow federated citizen science.
My latest litter pick target was Hoe Stream and the White Rose Lane Local Nature Reserve. Here's how it went.
I just created a Gitlab CI job to create a release with information from a CHANGELOG.md file for some of my projects. Here's how I did it.
I noticed something strange happening during build process during a multi-tasking bug fix. Turns out I was using Gitlab CI's caching incorrectly. I should have been using artifacts. Here's what I saw.
As a birthday treat, I took the day off work to try out my electronerised litter picker. Here's how it went.
In preparation for a day of litter picking, I finally got round to a project idea - attaching a camera to a litter picker to record it all. Here's what I did.
I finally started implementing UI testing on first-draft using WebdriverIO. While writing tests was easy, getting the tests running was a little more difficult. Here is how I did it.
Hooray! My new blog is live! Based on Sapper, using MongoDB and eventually ActivityPub and ActivityStreams, it will be my federated posting hub to the world.
Creating this new blog, I wanted to make sure there was no metadata data leaking personal information. Here's how I removed all the metadata tags except the ones I wanted from my photos.
Using tmux for your terminal multiplexer but want an easy to reattach to a session? Here's a small bash script to do it.
I am a terminal kind of person. Managing servers and using vim as my text editor of choice, I spend a lot of time in the terminal - a text-based interface allowing to run programs, explore and manipulate the file system, and configure and control the operating system.
I started out using GNU Screen as my terminal multiplexer, software that allows me to run multiple terminals on a single window or session, and keep those terminals open when I disconnected or closed the window.
There are a few issues with screen, such as mouse interactions not working over a certain number of characters in vim, that I have lived with until I found Byobu, an enhancement for screen and tmux that added some sweet features like a status bar.
However, there were some really annoying bugs in the versions that I was jumping between, like listing and attaching to existing sessions.
I eventually switched over to byobu with tmux as it fixed some of the issues with screen and ended up scrapping byobu as tmux is incredibly powerful by itself. The only thing that was missing/not simple to was the half-of-the-time-broken list and reattach to a session feature. So, I decided to write my own script to do it.
#!/bin/bash
readarray -t sessions < <(tmux list-sessions)
if [ $# -ge 1 ]; then
if [ "$1" == "." ]; then
name=$(basename $(pwd))
else
name=$1
fi
if tmux list-sessions 2>&1 | grep "^$name:" >> /dev/null; then
tmux attach-session -t $name
else
tmux new-session \; rename-session $name
fi
else
for i in "${!sessions[@]}"; do
echo $((i+1)): ${sessions[$i]}
done
read -p 'Enter a session number or enter the name for a new session: ' index
re='^[0-9]+$'
if ! [[ "$index" =~ $re ]]; then
tmux new-session \; rename-session $index
elif [ "$((index - 1))" -ge 0 ] && [ "$((index - 1))" -lt ${#sessions[@]} ]; then
id=`echo ${sessions[$((index-1))]} | cut -d ':' -f 1`
tmux attach-session -t $id
fi
fi I called the script tm and put it in my PATH and presto, a working list and reattach sessions command.
$ tm
1: 3: 4 windows (created Fri Jul 24 22:08:47 2020)
2: 4: 2 windows (created Fri Aug 7 20:35:47 2020)
3: blog: 5 windows (created Wed Jul 22 08:56:38 2020) (attached)
n: Create a new session
Enter a session number or enter the name for a new session: Here's how to help your readers save time by making your post's shell commands easy to select and copy - with a simple CSS property.
Making my new blog, I didn't initially set the published dates to be native dates in the database. Here what I did to change them ...and do all the upgrades I needed.
I recently needed to test that some Vue components were creating the correct HTML. To do this, I decided to create snapshots of Object representations of the rendered HTML.
HTML5 number inputs aren't useful, but tel inputs, have all the power
I decided to look into the extortion emails I have been getting and wrote a small script to extract the bitcoin addresses that have been used.
As part of my pledge not to upgrade, I decided to repair two of my failing mice instead of replacing them with a brand new model (as tempting as it was). Here's what I did.