<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">

<channel>
  <title>alv&#39;s blog</title>
  <description>&lt;h1 id=&#34;alvis-blog&#34;&gt;alvi’s blog&lt;/h1&gt;
&lt;p&gt;blog!&lt;/p&gt;</description>
  <language>en-GB</language>
<link>https://notes.alv.cx/notes/blog</link>
<atom:link href="https://notes.alv.cx/notes/blog/feed.xml" rel="self" type="application/rss+xml" />


<item>
  <title>not using my phone (part 1)</title>
  <guid>https://notes.alv.cx/notes/blog/2026-04-03-no-phone.html</guid>
  
  <pubDate>Mon, 04 May 2026 00:05:16 +0100</pubDate>
  
  <description><![CDATA[
  <p class="smallText metadata"> title: not using my phone (part 1) </p>
  
  

  
  <p class="smallText metadata"> uuid: cbac2dcf-41b0-417b-8275-2d6305e01b9f (<a href="https://notes.alv.cx/permalink?uuid=cbac2dcf-41b0-417b-8275-2d6305e01b9f">permalink</a>) </p>
  

  
  <p class="smallText metadata"> published: Mon, 04 May 2026 00:05:16 +0100 </p>
  

  <p class="smallText metadata"> tags: [
    
    <a href="https://notes.alv.cx/tags/no_phone">no_phone</a>,
    
    <a href="https://notes.alv.cx/tags/blog">blog</a>
    
  ]</p>

  <p class="smallText metadata">
  
    written by: alv
  
  </p>
  
    <h1 id="not-using-my-phone-until-i-dont-want-to">not using my phone
until i don’t want to</h1>
<p>4 hours a day is a quarter of your waking life!</p>
<p>for a long while now i’ve been trying to bring my screen time to
under 7 hours a week, doing the usual business of making my phone
greyscale to make it less interesting and disabling tap/raise to wake to
increase friction.</p>
<p>last week i achieved that goal by physically distancing myself from
my phone, including not taking it with me at all when i went to the gym,
and i averaged 56 minutes per day.</p>
<p>these are some disparate notes on the process.</p>
<h2 id="week-1-7-hours-a-week">week 1: 7 hours a week</h2>
<p>this week involved driving home from uni, a 4 hour drive. usually
this would involve putting up maps on my phone but as i’ve done the
drive a few times now i figured it would be fine, but a big part of me
still wanted the comfort i was used to.</p>
<p>it did involve getting lost though. i wanted to use my ipod for music
on this drive so before leaving for home i drove to the shops to pick up
a 3.5 mm cable. i didn’t know how to get to the main roads from the shop
i got the cable from and didn’t bother to look it up so i ended up going
the wrong way. after 5-10 minutes of being confused, realising i went
the wrong way, wondering how i knew so little about a town i’ve lived in
4 years, trying to backtrack, and failing to backtrack i found a road i
knew would take me to the motorway.</p>
<figure>
<a href="./images/2026/2026-04-doggie-ipod.jpeg">
<img src="./images/2026/preview-2026-04-doggie-ipod.jpeg"> </a>
<figcaption>
doggie ipod
</figcaption>
</figure>
<h2 id="weeks-2-and-3-1-hour-a-week-and-planning">weeks 2 and 3: 1 hour
a week?, and planning</h2>
<p>week 2 screen time: 34, 106<a href="#fn1" class="footnote-ref"
id="fnref1" role="doc-noteref"><sup>1</sup></a>, 12, 10, 6, 19, 7 (i
decided i would try to get under 1 hour a week tuesday night)</p>
<p>week 3 screen time: i thought it was 1h32, with no days over 30
minutes, but i now think this information is wrong and the true data is
lost forever</p>
<p>in week 1, and afterwards, i found myself reaching for my phone when
it wasn’t there during quiet moments or boredom which makes me think
there is still work to be done. i still need a phone for things like two
factor authentication and online banking but i think it would be
interesting to see if i can eliminate using my phone outside of
essential utilities (and ideally move as many of those off my phone as
is reasonable). the numbers really are arbitrary but my goal is under 1
hour per week, or 514 seconds per day.</p>
<p>while trying to get under an hour a day in week 1, i almost missed an
important event because i hadn’t checked my phone calendar (sufferring
from success). my todo list has been pen and paper for years now but if
i’m going to reduce my screen time further my calendar too must go
analogue. this month isn’t very busy for me so i can’t really speak to
how well it works but i do quite like the way it looks.</p>
<figure>
<a href="./images/2026/2026-04-very-empty-calendar.png">
<img src="./images/2026/preview-2026-04-very-empty-calendar.png"> </a>
<figcaption>
very empty calendar. makes it easy to try but perhaps not
representative. i think the thick line to split the weekend was a genius
move from me but i probably got the idea from somewhere i can’t
remember.
</figcaption>
</figure>
<p>at first it felt difficult to wait for things to happen without a bit
of scrolling but by week 3 i started finding it easier to wait without
doing anything. it was still definitely a conscious decision to not get
out my phone but the decision not to is getting quicker and easier.</p>
<h2 id="navigation">navigation</h2>
<p>navigation is one of the big things i feel like i <em>need</em> my
phone for but maybe that’s not true? i’ve driven to a some new places
these few weeks and it was generally fine as long as i had a bit of
preparation.</p>
<h3 id="london">london</h3>
<p>in the 7 hours week i drove a route i’d driven before between two
places i’d lived in for a long time and still got lost. i definitely
take maps on my phone for granted and it’s one of the genuinely useful
tools on a phone but my silly rules are my silly rules and they are not
exempt.</p>
<p>on saturday, week 2, i had to go collect a pc case i bought
second-hand online in a place i’d never been to before or knew anything
about. it was about 90 minutes away by car and the plan was simple:
write the directions down in my notebook the night before on my computer
and also try to remember them<a href="#fn2" class="footnote-ref"
id="fnref2" role="doc-noteref"><sup>2</sup></a>. i used street view to
get an idea of the place and view of some landmarks to place myself
with, but otherwise i think i could’ve done this with a map of
london.</p>
<figure>
<a href="./images/2026/2026-04-useless-directions.png">
<img src="./images/2026/preview-2026-04-useless-directions.png"> </a>
<figcaption>
these directions look pretty useless like this..
</figcaption>
</figure>
<figure>
<a href="./images/2026/2026-04-snug-fit.jpeg">
<img src="./images/2026/preview-2026-04-snug-fit.jpeg"> </a>
<figcaption>
snug fit
</figcaption>
</figure>
<h3 id="brighton-and-devils-dyke">brighton and devil’s dyke</h3>
<p>on sunday, week 2, i drove to a friend’s house in brighton. i’d
driven there before but with maps and i don’t really know brighton. no
issues up until i was about a minute away but i didn’t know what street
i was on so wandered around for 10 minutes looking for the right place.
all good fun.</p>
<p>on monday, week 3, i drove up to <a
href="https://www.nationaltrust.org.uk/visit/sussex/devils-dyke">devil’s
dyke</a> with a friend and forgot the way to get there, ending up miles
from where we were trying to go and trying to get there by moving in
what felt like the right direction. we had nowhere to be, it was a
lovely day, and it was fun to find the way without a map, even if meant
driving in and out of brighton a couple times.</p>
<h3 id="some-random-garage-10-miles-away">some random garage 10 miles
away</h3>
<p>on wednesday, week 3, i dropped the ball a bit when i had to drive to
a garage i’d never been to before in a car i’d never driven before. i
used my phone without really thinking to plan the trip ahead
instead.</p>
<p>my screen time that day totaled 48 minutes with 28 minutes of
navigation :/</p>
<section id="footnotes" class="footnotes footnotes-end-of-document"
role="doc-endnotes">
<hr />
<ol>
<li id="fn1"><p>i had a lapse i think i was watching youtube in bed on
my phone maybe not good not good but still okay<a href="#fnref1"
class="footnote-back" role="doc-backlink">↩︎</a></p></li>
<li id="fn2"><p>at first i didn’t write any return directions and was
gonna drive around london until i saw a sign that pointed me towards the
m25, but i realised that was silly<a href="#fnref2"
class="footnote-back" role="doc-backlink">↩︎</a></p></li>
</ol>
</section>
  
]]></description>
</item>

<item>
  <title>website update 2026-04-03: new recipes and website status line</title>
  <guid>https://notes.alv.cx/notes/blog/2026-04-03-website-update-1.html</guid>
  
  <pubDate>Fri, 03 Apr 2026 00:25:06 +0100</pubDate>
  
  <description><![CDATA[
  <p class="smallText metadata"> title: website update 2026-04-03: new recipes and website status line </p>
  
  

  
  <p class="smallText metadata"> uuid: 418d1d9b-5dec-4e37-8b7e-507d017f511c (<a href="https://notes.alv.cx/permalink?uuid=418d1d9b-5dec-4e37-8b7e-507d017f511c">permalink</a>) </p>
  

  
  <p class="smallText metadata"> published: Fri, 03 Apr 2026 00:25:06 +0100 </p>
  

  <p class="smallText metadata"> tags: [
    
    <a href="https://notes.alv.cx/tags/website_update">website_update</a>,
    
    <a href="https://notes.alv.cx/tags/blog">blog</a>
    
  ]</p>

  <p class="smallText metadata">
  
    written by: alv
  
  </p>
  
    <h1
id="website-update-2026-04-03-new-recipes-and-website-status-line">website
update 2026-04-03: new recipes and website status line</h1>
<p>going forward, website updates with changes in content will be
accompanied by a blog post.</p>
<p>a status line was added to the home page for quick updates on the
website, with status viewable at <a
href="https://alv.cx/status">/status</a>.</p>
<p>another recent addition is some new recipes have been added:</p>
<ul>
<li>dall</li>
<li>meat curry</li>
<li>dim bhuna</li>
<li>fiasie (pakoras?)</li>
<li>pilau rice</li>
</ul>
<p>finally, /tidbits has been renamed to <a
href="https://alv.cx/shoebox">/shoebox</a> but don’t worry! your
/tidbits/* bookmarks have not been changed!</p>
  
]]></description>
</item>

<item>
  <title>last.fm bookmarklets</title>
  <guid>https://notes.alv.cx/notes/blog/lastfm_bookmarklets.html</guid>
  
  <pubDate>Mon, 18 Sep 2023 16:25:48 +0100</pubDate>
  
  <description><![CDATA[
  <p class="smallText metadata"> title: last.fm bookmarklets </p>
  
  

  
  <p class="smallText metadata"> uuid: e54ebf58-4033-4dae-81db-91db344f1311 (<a href="https://notes.alv.cx/permalink?uuid=e54ebf58-4033-4dae-81db-91db344f1311">permalink</a>) </p>
  

  
  <p class="smallText metadata"> published: Mon, 18 Sep 2023 16:25:48 +0100 </p>
  

  <p class="smallText metadata"> tags: [
    
    <a href="https://notes.alv.cx/tags/last.fm">last.fm</a>,
    
    <a href="https://notes.alv.cx/tags/scripts">scripts</a>,
    
    <a href="https://notes.alv.cx/tags/blog">blog</a>
    
  ]</p>

  <p class="smallText metadata">
  
    written by: alv
  
  </p>
  
    <h1 id="last.fm-bookmarklets">last.fm bookmarklets</h1>
<p>last.fm doesn’t let you see how many scrobbled you’ve made in one day
particularly easily. Here is a bookmarklet to solve that.</p>
<p><label for="days"> Number of days to view: </label>
<input type="number" value="1" id="days" placeholder="Days"/><br><br>
<label for="offset"> Offset (e.g. 0 to include today, 7 to look at last
week): </label>
<input type="number" value="0" id="offset" placeholder="Offset (Days)" /><br><br>
<label for="username"> last.fm username </label>
<input type="text" value="" id="username" placeholder="Username" /><br><br>
<input type="button" id="button" value="Generate bookmarklet"><br></p>
<p>
<a style="display: none" href="" id="scriptLink">Bookmark this link</a>
</p>
<p>When you press generate bookmarklet, the values <code>OFFSET</code>,
<code>DAYS</code>, <code>USERNAME</code> will be subsituted and put into
the link above. It’s always best to inspect bookmarklets though. Inspect
the page to view the script used to generate the bookmarklet.</p>
<textarea cols="109" rows="15" readonly id="scriptText">
javascript: (() => {
  const MILLESECONDS_PER_DAY = 1000 * 24 * 60 * 60;
  const OFFSET;
  const DAYS;
  const USERNAME;

  const currentDate = new Date();
  const to = new Date(currentDate - (OFFSET * MILLESECONDS_PER_DAY));
  const from = new Date(to - ((DAYS-1) * MILLESECONDS_PER_DAY));
  const toDate = to.getFullYear() + "-" + (to.getMonth()+1) + "-" + to.getDate();
  const fromDate = from.getFullYear() + "-" + (from.getMonth()+1) + "-" + from.getDate();

  document.location = "https://www.last.fm/user/" + USERNAME + "/library?from=" + fromDate + "&to=" + toDate;
})();
</textarea>
<script>
document.getElementById("button").addEventListener("click", () => {
	scriptText = document.getElementById("scriptText").value;
	offset = document.getElementById("offset").value;
	days = document.getElementById("days").value;
	username = document.getElementById("username").value;

	newscript = scriptText.replace(
		      "OFFSET", "OFFSET = " + offset
		      ).replace(
			"DAYS", "DAYS = " + days
		      ).replace(
			"USERNAME", "USERNAME = '" + username + "'"
		      );
	document.getElementById("scriptLink").href = newscript;
	document.getElementById("scriptLink").style = "";
});
</script>
  
]]></description>
</item>

<item>
  <title>Repurposing Racing Wheel Pedals</title>
  <guid>https://notes.alv.cx/notes/blog/g27_pedals.html</guid>
  
  <pubDate>Tue, 04 Aug 2020 15:20:13 +0100</pubDate>
  
  <description><![CDATA[
  <p class="smallText metadata"> title: Repurposing Racing Wheel Pedals </p>
  
  

  
  <p class="smallText metadata"> uuid: 0f09200e-fd50-451b-aae1-1117a8a704db (<a href="https://notes.alv.cx/permalink?uuid=0f09200e-fd50-451b-aae1-1117a8a704db">permalink</a>) </p>
  

  
  <p class="smallText metadata"> published: Tue, 04 Aug 2020 15:20:13 +0100 </p>
  

  <p class="smallText metadata"> tags: [
    
    <a href="https://notes.alv.cx/tags/g27">g27</a>,
    
    <a href="https://notes.alv.cx/tags/sim_racing">sim_racing</a>,
    
    <a href="https://notes.alv.cx/tags/blog">blog</a>
    
  ]</p>

  <p class="smallText metadata">
  
    written by: alv
  
  </p>
  
    <h1>
Repurposing Racing Wheel Pedals
</h1>
<p>
I have a Logitech G27 I don’t use much. I wondered if I could use it for
anything else. I could.
</p>
<h2>
The Pinout of the Connector
</h2>
<p>
The first thing I had to do was figure out what each pin did on the DE-9
connector, and which ones I should care about. This was done easily
after I took off the top plastic casing thing by poking the three 100k
Ohm potentiometers and the connector in the right places at the right
times:
</p>
<style> #pinout_table tr td:first-child { text-align: right } </style>
<img src="./images/repurposing-racing-wheel-pedals-g27-pinout.svg" class="centered" style="width: 10em;">
<table id="pinout_table">
<tr>
<th>
pin
</th>
<th>
function
</th>
</tr>
<tr>
<td>
1,4
</td>
<td>
ground
</td>
</tr>
<tr>
<td>
6
</td>
<td>
clutch pedal
</td>
</tr>
<tr>
<td>
7
</td>
<td>
brake pedal
</td>
</tr>
<tr>
<td>
8
</td>
<td>
accelerator pedal
</td>
</tr>
<tr>
<td>
9
</td>
<td>
voltage in
</td>
</tr>
</table>
<h2>
Reading the Values of the Pots
</h2>
<p>I’m using an Arduino to read the pots and then do something with the
values. I very dirtily wired pin 4 on the pedals to GND on a Arduino
Uno, pin 9 to 5V, and pins 6,7,8 to A0, A1, and A2. I used a basic
sketch to check that everything is good:</p>
<details>
<summary>
Show/hide test_sketch.ino
</summary>
<pre><code> void setup() {
	Serial.begin(9600);
}

void loop() {
	Serial.println(analogRead(A2));
	delay(20);
}
</code></pre>
</details>
<p>I noticed that the minimum and maximum values read by the Uno were
quite far off 0 and 1024, like they should be, and voltage was being
lost on the way to and from the potentiometers. Since the pedals have to
be calibrated every time you plug them in, I assume this is normal and
spat out this code:</p>
<details>
<summary>
Show/hide sketch_aug02a.ino
</summary>
<pre><code>// sensor pins
int sa = A0;
int sb = A1;
int sc = A2;

// minimum values detected by the sensors
int mina = 1025;
int minb = 1025;
int minc = 1025;

// maximum values detected by the sensors
int maxa = 512;
int maxb = 512;
int maxc = 512;

// raw values of the sensors
int rva, rvb, rvc;

// calculated values of the sensors (between 0 and 1, this is the value sent to computer)
float cva, cvb, cvc;

void setup() {
	Serial.begin(9600);
}

void loop() {
	rva = analogRead(sa);
	rvb = analogRead(sb);
	rvc = analogRead(sc);

	if (rva &lt; mina) mina = rva;
	if (rvb &lt; minb) minb = rvb;
	if (rvc &lt; minc) minc = rvc;

	if (rva &gt; maxa) maxa = rva;
	if (rvb &gt; maxb) maxb = rvb;
	if (rvc &gt; maxc) maxc = rvc;

	cva = (float)(rva-mina)/(float)(maxa-mina);
	cvb = (float)(rvb-minb)/(float)(maxb-minb);
	cvc = (float)(rvc-minc)/(float)(maxc-minc);

	Serial.print('[');
	Serial.print(cva); Serial.print(',');
	Serial.print(cvb); Serial.print(',');
	Serial.print(cvc);
	Serial.print(']');
	Serial.println();
	delay(20); 
}
</code></pre>
</details>
<h2>
Actually Making the Numbers Do Something
</h2>
<p>This is where you can make the pedals do fun things. I reworked
another piece of code I wrote to do a similar thing to quickly create a
script that reads the values sent by the Arduino, and then simulate
pressing a key combination. The only thing I’ve done with this is set
push-to-talk to ctrl-shift-alt-1. I don’t know what else I could use
this for, maybe temporarily muting particular things, like music.</p>
<details>
<summary>
Show/hide pedalboard.py
</summary>
<pre><code> #!/usr/bin/env python3

import sys
import json
import time
from enum import Enum

import keyboard
import serial

class KeyState(Enum):
    UP = 0
    DOWN = 1

STATES = [KeyState.UP] * 3
THRESHOLD = 0.8
MACROS = ['ctrl+shift+alt+1', 'ctrl+shift+alt+2', 'ctrl+shift+alt+3']

def get_args():
    """ Get command line arguments """

    import argparse
    parser = argparse.ArgumentParser()
    parser.add_argument('device')
    return parser.parse_args()


def main(args):
    """ Entry point for script """
    while True:
        try:
            kb = serial.Serial(port=args.device, baudrate=9600)
            while True:
                handle(json.loads(kb.readline()))
        except serial.serialutil.SerialException as e:
            print(e)
            print("Failed to connect to device... trying again")
            time.sleep(1)
        except Exception as e:
            print(e)
    return 0

def handle(data):
    global STATES

    states = [KeyState.DOWN if value &gt; THRESHOLD else KeyState.UP for value in data]
    r = [handle_state_change(i, states[i]) if states[i] != STATES[i] else None for i in range(len(STATES))]
    STATES = states
    return r

def handle_state_change(key, newstate):
    print(f"{key} {newstate}")
    return keyboard.press(MACROS[key]) if newstate == KeyState.DOWN else keyboard.release(MACROS[key])


if __name__ == '__main__':
    try:
        sys.exit(main(get_args()))
    except KeyboardInterrupt:
        sys.exit(0)
</code></pre>
</details>
  
]]></description>
</item>

<item>
  <title>first post</title>
  <guid>https://notes.alv.cx/notes/blog/first_post.html</guid>
  
  <pubDate>Fri, 31 Jul 2020 19:52:52 +0100</pubDate>
  
  <description><![CDATA[
  <p class="smallText metadata"> title: first post </p>
  
  

  
  <p class="smallText metadata"> uuid: fd338dc9-ae5f-48f4-9fc6-e02e88ab4ce5 (<a href="https://notes.alv.cx/permalink?uuid=fd338dc9-ae5f-48f4-9fc6-e02e88ab4ce5">permalink</a>) </p>
  

  
  <p class="smallText metadata"> published: Fri, 31 Jul 2020 19:52:52 +0100 </p>
  

  <p class="smallText metadata"> tags: [
    
    <a href="https://notes.alv.cx/tags/blog">blog</a>
    
  ]</p>

  <p class="smallText metadata">
  
    written by: alv
  
  </p>
  
    <h1 id="first-post">first post</h1>
<p>this is my first post</p>
  
]]></description>
</item>

<item>
  <title>alv&#39;s blog</title>
  <guid>https://notes.alv.cx/notes/blog/readme.html</guid>
  
  <pubDate>Fri, 31 Jul 2020 19:50:51 +0100</pubDate>
  
  <description><![CDATA[
  <p class="smallText metadata"> title: alv&#39;s blog </p>
  
  

  
  <p class="smallText metadata"> uuid: 2d03893a-eb9b-4923-8024-a223ecbe72f7 (<a href="https://notes.alv.cx/permalink?uuid=2d03893a-eb9b-4923-8024-a223ecbe72f7">permalink</a>) </p>
  

  
  <p class="smallText metadata"> published: Fri, 31 Jul 2020 19:50:51 +0100 </p>
  

  <p class="smallText metadata"> tags: [
    
    <a href="https://notes.alv.cx/tags/blog">blog</a>,
    
    <a href="https://notes.alv.cx/tags/blog">blog</a>
    
  ]</p>

  <p class="smallText metadata">
  
    written by: alv
  
  </p>
  
    <h1 id="alvis-blog">alvi’s blog</h1>
<p>blog!</p>
  
]]></description>
</item>


</channel>
</rss>