Thursday, 16 December 2021

Saturday, 11 January 2020

Export csv from Strava

You can't export csv, but you can get it like this:

Go to your Activities in Strava. It will show you your last 20 activities. Inspect the page (developer tools in browser)

Click "Network", "XHR" and maybe filter for "training"

Make a request in Strava, eg. by choosing type of activity "ride", then you will see it in the inspector. Click Response and you get to see your data in JSON. Copy it into this website: Convert csv, which gives you the csv. If you do that every 20 activities or less, it not that much effort.

From https://scottpdawson.com/export-strava-workout-data/

Tuesday, 17 December 2019

grep file contents recursively

grep -r -B 2 -A 2 "apt" *
Searches all files from here on down for the string apt, and display two lines before and after each hit. Add -i to ignore case.

Thursday, 14 March 2019

parallel ssh with sudo

sshpass -f pw parallel-ssh -i -v -h hostlist -l computer -A -O StrictHostKeyChecking=no -x "-t -t" -I "sudo shutdown -h now" < pw

Thursday, 6 December 2018

Record my desktop

Youtube's recommended resolution is 1280x720.

A y-offset of 50 cuts off everything above the browser tabs (with taskbar at top)

so this line is good:

recordmydesktop -y 50 --width=1280 --height=720

Monday, 12 March 2018

Listen to blocked streams (somafm)

Since the excellent somafm.com is being blocked by my ISP for some reason, I have had to look for a work-around. Having discovered that I could listen through my TAILS vm, I read into Tor a bit more and discovered this:

torsocks cvlc -vv http://somfm.com/lush32.pls

This is running on a Raspberry Pi connected to my house stereo, and works without any configuration of Tor. Simply install Tor and it works. I am using the lowest bitrate stream assuming that Tor would struggle with higher, but haven't tested. Anyway it sounds great on the house stereo!