RSSAmplifier

Blog

James Stone's Blog

Blog posts by James Stone

jamesst.oneRSS feed ↗48 posts

Latest posts

Walruses synchronise their movements with the weather

Walruses ( Odobenus rosmarus ) pile onto land at “haulouts” to rest, amazingly they seem to sync their movements using the weather. Early observers on the Chukotka coast noticed the herds tracked the barometer , walruses leaving land as air pressure fell and returning as it rose. 1 A weather system is regional, so the same falling pressure reaches distant haulouts at once, and the walruses move…

Bluetooth and Wi-Fi fight over 2.4GHz

I have a phone running a Snapcast client: it pulls synced audio over Wi-Fi and plays it out to a pair of Bluetooth headphones. It buffered constantly: a few seconds of audio, then a stall, then a reconnect. The Wi-Fi signal was excellent (RSSI -44), the server was idle, and the same stream played fine elsewhere, so naturally I blamed everything except the obvious thing. Eventually I just pinged…

DFS Wi-Fi channels are invisible to phones

import Detail from "../../components/Detail.astro"; While debugging [Bluetooth and Wi-Fi fighting over 2.4GHz](/posts/bluetooth-wifi-coexistence), I hit a confusing one: my router was happily broadcasting a 5GHz network, my laptop was connected to it, and yet my phone's Wi-Fi scan flat out refused to show it. Same SSID, same room. The culprit (I think) was DFS [Dynamic Frequency…

Constitutional right to gun ownership

Only three countries in the world enshrine the right to gun ownership in their constitution: The United States of America Mexico Guatemala Source: CNN — What makes America’s gun culture different from the rest of the world ]]>

The other AI bubble

import Detail from "../../components/Detail.astro"; Excuse my click baity title. I mean the AI Filter Bubble. As the memory features of AI apps are getting smarter a larger context window , I have recently found it harder to convice AI to not always recommend [nix](https://jamesst.one/tag/nix)! Ok that [example](https://chatgpt.com/share/69931fce-8be8-8002-bca2-dfeb7732be45) is specific to me. It…

A no backend future

A typical web tech stack is a frontend , backend and db My prediction is the future for many ( not all) apps will be an LLM dynamically built frontend, using something like this https://tambo.co/blog/posts/introducing-tambo-generative-ui or MCP UI Plus a DB that has strict permissions (think postgres RLS) and validation (check constraints etc) ]]>

Web Transport

There is a new (to me) way to communicate between the browser and server - Web Transport. [MDN](https://developer.mozilla.org/en-US/docs/Web/API/WebTransport_API) | Technology | Intended Use | Direction | Other Limitations | MDN |…

Satisfying TS

I see as used a lot in TypeScript, and it is one of my pet hates. It throws away type checking by asserting “I know better than the compiler”, which is often not true. A common case is filtering a discriminated union array down to one variant. Say you have a chat app, people reach for an assertion like this: type UpdateNewMessage = { type : "UpdateNewMessage" ; text : string }; type…

Scroll padding top

When you have a sticky header, clicking an anchor link can cause the target element to be hidden behind the header. TIL scroll-padding-top solves this by adding an offset to the scroll position. I think a screenshot best describes the problem: here I have made set the header background’s opacity to 50% so you can see when you click the anchor the header obscures the target element. On this site, I…

PC cattle

No, I am not talking about politically correct cattle, but rather the idea of treating your personal computer as cattle. I have always liked the idea of treating servers as cattle, not pets. By this, I mean having all configuration defined as code. Increasingly, I think it makes sense to treat your personal computer as cattle too - particularly with the rise of agents. For servers, the main…

How I use agents

import Detail from "../../components/Detail.astro"; Like many people, I have found AI LLM agents to be increasingly useful. Like people, some of the biggest power ups I have found are to give the agent a good environment. It works best when it: - has access to an **LSP** to allow it to quickly check type errors or just any error really. - can quickly run **lint** checks - has an existing **test**…

Markdown Code Fences with Multiple Backticks or Tildes

Today I learned that Markdown code fences can use any number of backticks ( ` ) or tildes ( ~ ) as long as the number is at least three. The closing fence must have at least as many characters as the opening one. This is especially handy for nesting code blocks that contain backticks, such as when documenting Markdown itself. For example, to include triple backticks in a code block, you can use…

Jetstar Pain

Something I thought that was already illegal… Not including compulsory fees in the total cost. How do you pay without the fee? ]]>

Comeback

import Detail from "../../components/Detail.astro"; Inspired by my brother's Ben 's blog ecology [blog](https://bencology.bearblog.dev/) I decided to dust off my old blog. I have pulled in my old blog's posts, from pre-2020. All of which are full of cringe! I have also pulled in some of my TIL notes, which were in a separate repo before but will now live here.

Why Multi page apps are exciting again

One thing that really excites me in the browser world right now is the renewed focus on multi-page applications (MPAs) . For a long time, single-page applications (SPAs) felt like the only viable way to achieve certain features and performance characteristics. If you wanted fast navigation or polished page transitions, an SPA was basically the default only choice. Some of the classic advantages of…

Borked systemd units

Previously when I have been debugging systemd services I have used: systemctl status --failed to get me all of the failed services However that, as in my case today, did not return any failures, yet I knew a service was not working. It turned out the service was not working as it had a bad setting: ❯ systemctl status home-manager-james.service ○ home-manager-james.service Loaded: bad-setting…

Using network in a nix build

You can not normally use network in a nix build, as it is not sandboxed and is therefore a source of non reproducibility. However, with lib.fetchers.withNormalizedHash you can use the network so long as you provide a hash A simplified (by me) example from: nixkpgs { addDockerImageToNixStore = let defaultArchitecture = pkgs . go . GOARCH ; in lib . fetchers . withNormalizedHash { } ( { imageName ,…

Git ting a good version from git

Not so much a TIL but I keep forgetting this form of git describe So writing it down so I don’t forget it again… git describe --tags ]]>

Container sidecar shells

Having tools in a container might sometimes be useful for different debugging. Just exec into it and start the diagnostics. With a distroless/minimized image, it’s not that easy. What we can do instead is attach a sidecar container: docker run \ --rm \ -it \ --pid=container: < container i d > \ --net=container: < container i d > \ --cap-add sys_admin \ alpine \ sh from: Minimal containers using…

Good programmers

Most good programmers do programming not because they expect to get paid or get adulation by the public, but because it is fun to program. Linus Torvalds I actually think this can be generalised: Most good Xers do X not because they expect to get paid or get adulation by the public, but because it is fun to X. ]]>

DDL Postgres Macros

In postgres you may find yourself repeating common operations on all your tables. For example adding an audit log , created times, modified user etc. This can be tedious to add everywhere. Instead, you can create a postgres “macro” to update your DDL for you Example Created CREATE OR REPLACE FUNCTION public .add_created_columns( table_type regclass ) RETURNS void LANGUAGE plpgsql SET search_path…

IKEAs restaurant

IKEA is the 6th largest restaurant in the world by number of customers. In 2017 there were 700 million people who ate an IKEA. Roughly 10 percent of the world. From podcast ]]>

Push to repo in GitHub Actions

I wanted to have a GitHub Action step push back to the repo it is running in. For that you need the write permission. which can be added like so: permissions : contents : write from: git - Push to origin from GitHub action - Stack Overflow eg in: add write permission · jamesmstone/chess@d0a3250 · GitHub name : Push commit on : push permissions : contents : write jobs : report : runs-on :…

Find sqlite dbs

Lots of applications use sqlite dbs. It can be useful to try and find them all. For this you can use the following command find . -type f -exec sh -c 'head -c 16 "$1" 2>/dev/null | grep -q "^SQLite format" && echo "$1"' _ {} \; as all sqlite files start with the header string: “SQLite format 3\000” , see: Database File Format it can then be helpful to get the size of each result find . -type f…

Adding auto complete in bash

in bash code completions are setup using the complete command you can print all current system completion s using complete -p ]]>

Decision making

if you’re unsure what to do, always choose the option that makes the better story. Someone via geo wizard YouTube ]]>

Searching scrollback in Alacritty

I use Alacritty as my terminal emulator. To be honest I am not sure why… it gets out of my way and seems to be fast enough Anyway, I wanted to be able to search the scrollback buffer. That is quite trivial in alacritty., although as I haven’t read the manual I struggled to find it. ctrl + f , as I first tried, does not work, but ctrl + shift + f does. Search Search allows you to find anything in…

Blood types

I was aware humans have different blood types. A B AB O and you can be positive or negative. However, I was not aware that A B AB O are actually groups of blood types. There are actually 45 known human blood types. See more . But new ones keep getting discovered! ]]>

Interactively debug a sh script

My common (ba)sh script setup is a bit like this: # By default, in a pipeline of commands, the exit status of the pipeline is determined by # the exit status of the last command in the pipeline. This changes that to fail if any command fails set -o pipefail # stop on exit set -o errexit # trace , print all commands before running. set -x Another approach that I just thought of that is useful is to…

AWK from and to pattern matches

when using awk to parse a file I was aware it uses this basic structure: pattern { action } eg seq 1 10 | awk '/2/{print $0}' Outputs 2 and if you omit an action it defaults to print $0 ie print the whole matching line. I was not aware however you can have multiple pattern seperated by , and it will match from the first pattern until the last pattern Relevant excerpt from the man page: A pattern…

Swimming pool depth

In the men’s 100-meter breaststroke final at the 2024 French Olympics, no swimmer finished better time then Tokyo Olympics race from 3 years earlier. In the women’s 400 freestyle, three former world record holders failed to reach their personal bests, and Katie Ledecky did not break 4 minutes. The swimming pool at Paris La Défense Arena is 2.15 meters deep , below the recommended 3 meters by World…

ESM HTTP imports

When using all modern versions of JS you can use esm modules. What I did not realise is you can import modules at runtime over http(s). To help with this there are a range of CDNs that host the whole of NPM designed for ESM. Some examples include: https://esm.sh/ https://esm.run/ - from: https://www.jsdelivr.com/ Example import { version, verify } from "https://esm.run/jsonwebtoken-esm" ; console.…

Alias plpgsql variables

Inside plpgsql function you can often get naming conflicts between input parameters and column / table names My previous modus operandi was to qualify the input param using the function name. For example: Schema create table data .user ( id serial primary key ; name text not null ; birth_date date not null ; ); Options Qualify using function name create function age ( "user" int ) returns int as…

React get a components prop types

When using TS with React you may want to get the types of another component. const MyButton : React . FC <{ value : string ; onChange : ( newValue : string ) => void ; }> = () => { return < button value = {value} onchange = {onChange} />; }; type ButtonProps = React . ComponentProps < typeof MyButton>; // equivalent: type ButtonProps = { value : string ; onChange : ( newValue : string ) => void };…

Spotify playlist to Dropbox - Version 2

This is a post about an IFTTT recipe I made. Not sure what IFTTT is ? Unfortunately for sometime now version 1 of these recipes hasn’t been working. Now that I have some more time on my hands I have decided to fix it. Improvements It now works again! Its quicker than version 1 Works more reliably. Disadvantages Only works for the first 100 songs in playlists with more the 100 songs Technical…

Cloud HQ

Cloud HQ - How I (automatically) sync all my files across the web. What it is Simply - Cloud HQ is an online service that allows you to sync your files across multiple file storing services. Supported Services Cloud HQ Supported Services as of 23/5/14 Cloud HQ currently supports the following syncing services: Google Drive Gmail Dropbox Box Evernote Onedrive Onedrive Pro Share Point WebDAV…

My Fitbit channel for IFTTT

UPDATE 21/5/14: IFTTT has just released an official fitbit channel . So I recommend everyone uses that. As a result I will discontinue my version at the end of this month. Thanks to everyone who tried and particularly those who tested my fitbit channel. I currently have plans for a 3rd party Snapchat Channel. So keep posted :) My Fitbit channel for IFTTT is being made - sorry to get your hopes up…

A New Design

I did it! - I finally got round to designing my own version of the site. The new design is live now, so please let me know what you think (nothing is perfect the first time). Hopefully there are no bugs, but if you see any please let me know by leaving a comment. Enjoy the new design. ]]>

The Best Blogs Ever

Ok you got me these may not be the best blogs ever , however these are the blogs I’m obsessed with and read every post of. For all the websites, I have grouped them by category and added their Alexa rank (as of 26th Nov 13) along side the site. Tech General Lifehacker AUS Alexa Rank: 14,003 Lifehacker USA Alexa Rank: 504 The Buffer Blog Alexa Rank: 1,526 IFTTT Blog Alexa Rank: 5,464 Kinja: How I…

The Ultimate Free Music Setup

How to get the ultimate free music setup - ok maybe it s not the ultimate setup, but it s still pretty cool Features : Continuous free, legal and unlimited, personally recommended songs that support the artist. - sorry the ended up being a mouthfull The System Get an account for each service / download the software Dropbox IFTTT Spotify Blockify - windows only or potentially Smutefy Last Fm Link…

Auto-capture phone thief

Lockwatch Anti-Theft is an android app that takes a photo using the front facing camera when your passcode is incorrectly entered. It then sends that photo along with the phones’ current GPS location to your email account. Lockwatch by default has a nice feature enabled to prevent false alarms. This means Lockwatch will give you 10 seconds to type in the correct password before it sends the alert.…

My Awesome Stuff List

Not a bucket list - just a lot like one :P Adrenaline bungee jump skydive Travel Visit every continent Australiasia Africa Asia Europe - fun fact: only continent without an “a” and every other has at least 2 North America South America Antartica Visit the 7 natural wonders of the world - as decided be me :) Grand Canyon Great Barrier Reef Harbor of Rio de Janeiro visit Mount Everest base camp See…

Update: Spotify playlist to Dropbox

How to update to the latest version of this IFTTT Recipe Issue Resolved: Steps to implement fix: In your IFTTT recipe change the URL field to http://ifttt.jamesstone.com.au/?type=&uri= making sure to change: ?type= to either ?type=full or ?type=exact &uri= to &uri= with your spotify playlist URI appended - example…

Google celebrates your birthday

Thanks Google. What a cool personalised Google birthday doodle. After visiting Google’s homepage on my birthday I got a pleasant surprise. Google now celebrates your birthday with a doodle. To get a personalise Google Doodle on your birthday you have to be signed in and obviously it has to be your birthday. ]]>

Spotify playlist to Dropbox

New Version now available This is a post about an IFTTT recipe I made. Not sure what IFTTT is ? What this recipe does These recipes download the songs in your Spotify Playlist via Last.fm Free Music and Soundcloud downloadable tracks. The tracks at these sites have been submitted by the artist and been marked as free and downloadable for the public. Recipes What’s the difference? Download only…

How I use IFTTT

After reading Aaron Francis ‘ blog post about how he uses Evernote and IFTTT I felt inspired to make this post about how I use IFTTT. At present I have 22 IFTTT recipes. Here are some of my favourite. Education related recipes Lots of my school related recipes are: Music Related Sync my Services Auto post I try to keep my auto posting recipes to a minimum. I do this, as I hate browsing through a…

Why you should use IFTTT?

IFTTT is an amazing tool. It has made my life online so much easier- are you sold? So why should you use IFTTT. But what is IFTTT? IFTTT is a service that lets you create powerful connections [between your online accounts] with one simple statement: If This Then That (Image Via: IFTTT ) So basically, IFTTT allows you to connect your online services via their API ‘s. These connections are called…

Why I blog? aka Welcome

Welcome to my Blog :) A little about me Name: James Stone Age: 17 Job: Student Location: Australia I wasn’t really sure what my first post, my intro post , should talk about. So I have decided to mention why I’m blogging. I have decided to start blogging for a few reasons but I guess the main reason is my online presence. Online Presence Growing up the number of times I have heard the media,…