<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"><channel><title>James Stone&apos;s Blog</title><description>Blog posts by James Stone</description><link>https://jamesst.one/</link><item><title>The other AI bubble</title><link>https://jamesst.one/posts/the-other-ai-bubble-that-no-one-is-talking-about/</link><guid isPermaLink="true">https://jamesst.one/posts/the-other-ai-bubble-that-no-one-is-talking-about/</guid><description>import Detail from &quot;../../components/Detail.astro&quot;;

Excuse my click baity title. I mean the AI Filter Bubble.

&lt;span&gt;As the memory features of AI apps are getting &lt;Detail&gt;&lt;span slot=&quot;c&quot;&gt;smarter&lt;/span&gt;&lt;span slot=&quot;e&quot;&gt;a larger context window&lt;/span&gt;&lt;/Detail&gt;, 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 has clearly remembered my love for it.
    But it got me thinking we are just making another [filter bubble](https://en.wikipedia.org/wiki/Filter_bubble). It&apos;s social media all over.&lt;/span&gt;

&lt;br/&gt;
&lt;span&gt;Whilst _I_ don&apos;t think there is anything wrong with nix. Sometimes it doesn&apos;t hurt to hear other &lt;Detail&gt;&lt;span slot=&quot;c&quot;&gt;minority&lt;/span&gt;&lt;span slot=&quot;e&quot;&gt;well at least less &lt;a href=&quot;https://distrowatch.com/table.php?distribution=guixsd&quot;&gt;popular&lt;/a&gt;&lt;/span&gt;&lt;/Detail&gt;  [lispy](https://guix.gnu.org/) opinions.&lt;/span&gt;</description><pubDate>Mon, 16 Feb 2026 00:00:00 GMT</pubDate></item><item><title>A no backend future</title><link>https://jamesst.one/posts/no-backend-future/</link><guid isPermaLink="true">https://jamesst.one/posts/no-backend-future/</guid><description>&lt;![CDATA[&lt;p&gt;A typical web tech stack is a frontend , backend and db&lt;/p&gt;
&lt;p&gt;My prediction is the future for many ( not all)  apps will be an LLM dynamically built frontend, using something like this
&lt;a href=&quot;https://tambo.co/blog/posts/introducing-tambo-generative-ui&quot;&gt;https://tambo.co/blog/posts/introducing-tambo-generative-ui&lt;/a&gt; or MCP UI&lt;/p&gt;
&lt;p&gt;Plus a DB that has strict permissions (think postgres RLS) and validation (check constraints etc)&lt;/p&gt;]]&gt;</description><pubDate>Thu, 12 Feb 2026 00:00:00 GMT</pubDate></item><item><title>Web Transport</title><link>https://jamesst.one/posts/web-transport/</link><guid isPermaLink="true">https://jamesst.one/posts/web-transport/</guid><description>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                                                                        |
|--------------------------|---------------------------------------------------------------------|------------------------------------------|--------------------------------------------------|----------------------------------------------------------------------------|
| Web Transport            | Real-time, Bidirectional, can have sub streams                      | Server ↔ Client                          | HTTP/3 only. Secure context. No Safari (for now) | [MDN](https://developer.mozilla.org/en-US/docs/Web/API/WebTransport_API)   |
| WebSocket                | Real-time, Bidirectional communication over a single TCP connection | Server ↔ Client                          |                                                  | [MDN](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket)          |
| SSE (Server-Sent Events) | One way stream of data from server                                  | Server → Client                          |                                                  | [MDN](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events) |
| Web Push                 | Low frequncy updates, push notifications.                           | Server → Browser&apos;s Server → Browser      |                                                  | [MDN](https://developer.mozilla.org/en-US/docs/Web/API/Push_API)           |
| WebRTC                   | Real-time communication (audio, video, data) between browsers       | Client A ↔ Client B ( could be a server) |                                                  | [MDN](https://developer.mozilla.org/en-US/docs/Web/API/WebRTC_API)         |

Web Transport fills a similar niche as Web Sockets. But it has a neat potential advantage over it. It allows multiple streams to be created on the same connection - crucially, each stream does not stall the connection. This solves a problem with Web Sockets where each message is sequentially processed. So if you send a large message followed by lots of small messages, the client has to wait for the large message.

{
/*
```mermaid
    graph TD
        subgraph &quot;WebSocket: is a single stream&quot;
            direction TB
            SA[LARGE\n\nMessage]
            SA --&gt; SB[Small Message 1]
            SB --&gt; SC[Small Message 2]
        end
      style SA fill:#ff9,stroke:#333,stroke-width:2px
```
*/
}
In Web Transport, multiple independent streams can be created, allowing simultaneous processing of different message types.

{
/*
```mermaid
  graph TD
      subgraph &quot;Web Transport: Multiple streams, one connection&quot;

          subgraph &quot;Stream 1&quot;
               direction TB
               MA[LARGE\n\nMessage]
          end

          subgraph &quot;Stream 2&quot;
              direction TB
              MB[Small Message 1]
              MB --&gt; MC[Small Message 2]
          end

      end

      style MA fill:#ff9,stroke:#333,stroke-width:2px

```
*/
}
# example use case

Picture a collaborative document editor where multiple users are working together:

- Small cursor position updates (high frequency, need low latency)
- Text changes/edits (medium-sized messages)
- Document metadata (larger messages like version history)

With Web Transport, all these can flow independently on the same connection, so cursor movements remain responsive even when large document changes are being processed. Unlike WebSockets, one user&apos;s large edit won&apos;t stall another user&apos;s cursor position updates.

A prior solution was to open multiple WebSocket connections, one for each type of message. But this has a large overhead.

---

Also of note is the Background Synchronization API [MDN](https://developer.mozilla.org/en-US/docs/Web/API/Background_Synchronization_API) although that is not really supported and is **not** triggerable from the server.</description><pubDate>Wed, 04 Feb 2026 00:00:00 GMT</pubDate></item><item><title>Satisfying TS</title><link>https://jamesst.one/posts/satisfying-ts/</link><guid isPermaLink="true">https://jamesst.one/posts/satisfying-ts/</guid><description>&lt;![CDATA[&lt;p&gt;I see &lt;code&gt;as&lt;/code&gt; 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.&lt;/p&gt;
&lt;p&gt;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:&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;ts&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;type&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; UpdateNewMessage&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; { &lt;/span&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt;type&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; &quot;UpdateNewMessage&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;; &lt;/span&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt;text&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; string&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; };&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;type&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; UpdateUserJoined&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; { &lt;/span&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt;type&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; &quot;UpdateUserJoined&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;; &lt;/span&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt;username&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; string&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; };&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;type&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; Update&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; UpdateNewMessage&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; |&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; UpdateUserJoined&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;const&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; allUpdates&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; Update&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;[] &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; getUpdates&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;();&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;const&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; newMessageUpdates&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; allUpdates.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;filter&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  (&lt;/span&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt;update&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;) &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&gt;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; update.type &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;===&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; &quot;UpdateNewMessage&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;) &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;as&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; UpdateNewMessage&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;[];&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This compiles, but you have forced the array to be a &lt;code&gt;UpdateNewMessage[]&lt;/code&gt; even if your filter is wrong.&lt;/p&gt;
&lt;p&gt;Instead, use a type predicate to let the compiler narrow safely:&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;ts&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;type&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; UpdateNewMessage&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; { &lt;/span&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt;type&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; &quot;UpdateNewMessage&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;; &lt;/span&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt;text&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; string&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; };&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;type&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; UpdateUserJoined&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; { &lt;/span&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt;type&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; &quot;UpdateUserJoined&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;; &lt;/span&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt;username&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; string&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; };&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;type&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; Update&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; UpdateNewMessage&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; |&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; UpdateUserJoined&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; isUpdateNewMessage&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt;update&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; Update&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt; update&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; is&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; UpdateNewMessage&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;  return&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; update.type &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;===&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; &quot;UpdateNewMessage&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;const&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; newMessageUpdates&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; allUpdates.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;filter&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(isUpdateNewMessage);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;// inferred as UpdateNewMessage[]&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The predicate keeps the check in one place, and you keep full type safety without a cast. These functions can live alongside your type declarations so your runtime checks stay aligned with your types.&lt;/p&gt;
&lt;p&gt;Much more satisfying :D&lt;/p&gt;
&lt;p&gt;More details: &lt;a href=&quot;https://www.typescriptlang.org/docs/handbook/2/narrowing.html#using-type-predicates&quot;&gt;https://www.typescriptlang.org/docs/handbook/2/narrowing.html#using-type-predicates&lt;/a&gt;&lt;/p&gt;]]&gt;</description><pubDate>Wed, 28 Jan 2026 00:00:00 GMT</pubDate></item><item><title>Scroll padding top</title><link>https://jamesst.one/posts/scroll-padding-top/</link><guid isPermaLink="true">https://jamesst.one/posts/scroll-padding-top/</guid><description>&lt;![CDATA[&lt;p&gt;When you have a &lt;strong&gt;sticky&lt;/strong&gt; header, clicking an anchor link can cause the target element to be hidden behind the header. TIL &lt;code&gt;scroll-padding-top&lt;/code&gt; solves this by adding an offset to the scroll position.&lt;/p&gt;
&lt;p&gt;I think a screenshot best describes the problem:&lt;/p&gt;
&lt;p&gt;&lt;img __ASTRO_IMAGE_=&quot;{&amp;#x22;src&amp;#x22;:&amp;#x22;../post_assets/sticky.png&amp;#x22;,&amp;#x22;alt&amp;#x22;:&amp;#x22;Sticky Header covering linked anchor&amp;#x22;,&amp;#x22;index&amp;#x22;:0}&quot;&gt;&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;On this site, I use it in the &lt;code&gt;Nav.astro&lt;/code&gt; component to ensure that the header height is accounted for when scrolling to a fragment:&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;css&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;:root&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt;  --header-height&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;3&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;rem&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;  scroll-padding-top&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt;--header-height&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;nav&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;  height&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt;--header-height&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;  position&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;sticky&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;  top&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This ensures that when a user navigates to an anchor, the top of the content is aligned with the bottom of the sticky navigation bar rather than being obscured by it.&lt;/p&gt;
&lt;p&gt;eg:&lt;/p&gt;
&lt;p&gt;&lt;img __ASTRO_IMAGE_=&quot;{&amp;#x22;src&amp;#x22;:&amp;#x22;../post_assets/sticky-fixed.png&amp;#x22;,&amp;#x22;alt&amp;#x22;:&amp;#x22;Sticky Header not covering linked anchor&amp;#x22;,&amp;#x22;index&amp;#x22;:0}&quot;&gt;&lt;/p&gt;
&lt;p&gt;Live demo: My &lt;a href=&quot;/blog#2026&quot;&gt;2026 posts&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;More details: &lt;a href=&quot;https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/scroll-padding-top&quot;&gt;https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/scroll-padding-top&lt;/a&gt;&lt;/p&gt;]]&gt;</description><pubDate>Wed, 28 Jan 2026 00:00:00 GMT</pubDate></item><item><title>PC cattle</title><link>https://jamesst.one/posts/agents-nix/</link><guid isPermaLink="true">https://jamesst.one/posts/agents-nix/</guid><description>&lt;![CDATA[&lt;p&gt;No, I am not talking about politically correct cattle, but rather the idea of treating your personal computer as cattle.&lt;/p&gt;
&lt;p&gt;I have always liked the idea of treating servers as cattle, not pets. By this, I mean having all configuration defined as code.&lt;/p&gt;
&lt;p&gt;Increasingly, I think it makes sense to treat your personal computer as cattle too - particularly with the rise of agents.
For servers, the main advantages are that you can destroy, deploy and scale them without thought.&lt;/p&gt;
&lt;p&gt;This is also a nice feature for personal computers, though traditionally it hasn’t been that important. You normally only have one PC.&lt;/p&gt;
&lt;p&gt;However, I think LLMs and agents start to change this equation.&lt;/p&gt;
&lt;p&gt;In the era of agents, by treating your personal computer as &lt;del&gt;cattle&lt;/del&gt; code, you get a few benefits:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;You can scale it as many times as you want - think of all those parallel agents you can run!&lt;/li&gt;
&lt;li&gt;Your agents can help configure your computer - and when they stuff it up, you can just roll back to a previous version&lt;/li&gt;
&lt;li&gt;You can set up tests on your personal computer to make sure it works.are the right services running, are the tools installed, does the system still boot and behave as expected? All automatically when you make changes or update your setup. This also helps your agents catch their mistakes.&lt;/li&gt;
&lt;li&gt;You can (re)deploy your computer anywhere you want, destroy it whenever you want, and share the exact same environment with others.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To turn your servers into cattle, you may use terraform, containers, k8s, a combination of these or anyother tool, my personal favourite though is &lt;strong&gt;Nix&lt;/strong&gt;. I live for that immuatbility.
Though for personal computers in my mind it really only makes sense to use Nix (or I guess GNU Guix). That’s because it actually is designed for that.&lt;/p&gt;]]&gt;</description><pubDate>Tue, 27 Jan 2026 00:00:00 GMT</pubDate></item><item><title>How I use agents</title><link>https://jamesst.one/posts/how-i-use-agents/</link><guid isPermaLink="true">https://jamesst.one/posts/how-i-use-agents/</guid><description>import Detail from &quot;../../components/Detail.astro&quot;;

&lt;div&gt;Like many people, I have found &lt;Detail&gt;&lt;span slot=&quot;c&quot;&gt;AI&lt;/span&gt;&lt;span slot=&quot;e&quot;&gt;LLM&lt;/span&gt;&lt;/Detail&gt; agents to be increasingly useful.&lt;/div&gt;

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** suite that it can incrementally add new tests for
    - in particular, I have found integration tests to be the most useful, that way you can let the agent go wild and not get bogged down by a particular implementation. It should not be scared to change
    - **Web dev tip**: Give it a browser it can use in the integration tests.
- has a working **formatter**


The beautiful thing is most agents auto run tests, code formatter and linters after every change.


-----
{
&lt;div&gt;My 2 cents above is based on my experience &lt;Detail&gt;&lt;span slot=&quot;c&quot;&gt;&quot;vibe coding&quot;&lt;/span&gt;&lt;span slot=&quot;e&quot;&gt;&quot;vibe coding&quot;, I also haven&apos;t truly been 100% vibe coding... I still look at the code it writes and then based on that either: &lt;ul&gt;&lt;li&gt;&lt;b&gt;completely undo&lt;/b&gt; the change and ask it to have another go, maybe slightly tweaking my prompt&lt;/li&gt;&lt;li&gt;give it a follow up prompt.&lt;/li&gt;&lt;/ul&gt; &lt;b&gt;though I think starting fresh seems to get better results.&lt;/b&gt;&lt;br/&gt;So I have been &quot;vibe coding&quot;&lt;/span&gt;&lt;/Detail&gt; an app to help me keep track of my running niggles/ injuries.
&lt;/div&gt;
}
The agents really came alive when I made them write some integration tests, using an actual browser. eg:

```ts
import { test, expect } from &quot;@playwright/test&quot;;

test(&quot;homepage loads just added diagnosis&quot;, async ({ page }) =&gt; {
    await page.goto(&quot;/&quot;);
    await expect(page).toHaveTitle(&quot;Current Diagnoses&quot;);
    await expect(page.locator(&quot;diag 1&quot;)).toBeVisible();
});
```</description><pubDate>Sun, 25 Jan 2026 00:00:00 GMT</pubDate></item><item><title>Markdown Code Fences with Multiple Backticks or Tildes</title><link>https://jamesst.one/posts/markdown-code-fences/</link><guid isPermaLink="true">https://jamesst.one/posts/markdown-code-fences/</guid><description>&lt;![CDATA[&lt;p&gt;Today I learned that Markdown code fences can use any number of backticks (&lt;code&gt;`&lt;/code&gt;) or tildes (&lt;code&gt;~&lt;/code&gt;) as long as the number is at least three. The closing fence must have at least as many characters as the opening one.&lt;/p&gt;
&lt;p&gt;This is especially handy for nesting code blocks that contain backticks, such as when documenting Markdown itself.&lt;/p&gt;
&lt;p&gt;For example, to include triple backticks in a code block, you can use four tildes:&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;markdown&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;````&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;This is a code block with ```&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;````&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Which renders as:&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;This is a code block with ```&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;From: &lt;a href=&quot;https://susam.net/nested-code-fences.html&quot;&gt;https://susam.net/nested-code-fences.html&lt;/a&gt;&lt;/p&gt;]]&gt;</description><pubDate>Thu, 22 Jan 2026 00:00:00 GMT</pubDate></item><item><title>Jetstar Pain</title><link>https://jamesst.one/posts/jetstar-pain/</link><guid isPermaLink="true">https://jamesst.one/posts/jetstar-pain/</guid><description>&lt;![CDATA[&lt;p&gt;Something I thought that was already illegal…
&lt;img __ASTRO_IMAGE_=&quot;{&amp;#x22;src&amp;#x22;:&amp;#x22;../post_assets/jetstar-fee.png&amp;#x22;,&amp;#x22;alt&amp;#x22;:&amp;#x22;A screenshot showing jetstars payment options where every one adds a fee&amp;#x22;,&amp;#x22;index&amp;#x22;:0}&quot;&gt;&lt;/p&gt;
&lt;p&gt;Not including compulsory fees in the total cost.&lt;/p&gt;
&lt;p&gt;How do you pay without the fee?&lt;/p&gt;]]&gt;</description><pubDate>Wed, 21 Jan 2026 00:00:00 GMT</pubDate></item><item><title>Comeback</title><link>https://jamesst.one/posts/comeback/</link><guid isPermaLink="true">https://jamesst.one/posts/comeback/</guid><description>import Detail from &quot;../../components/Detail.astro&quot;;

&lt;span&gt;Inspired by &lt;Detail&gt;&lt;span slot=&quot;c&quot;&gt;my brother&apos;s&lt;/span&gt;&lt;span slot=&quot;e&quot;&gt;&lt;a href=&quot;https://family.jamesst.one/individual/541b97bc-3598-5e03-9e08-7ad987c94a33&quot;&gt;Ben&lt;/a&gt;&apos;s&lt;/span&gt;&lt;/Detail&gt; &lt;Detail&gt;&lt;span slot=&quot;c&quot;&gt;blog&lt;/span&gt;&lt;span slot=&quot;e&quot;&gt;ecology [blog](https://bencology.bearblog.dev/)&lt;/span&gt;&lt;/Detail&gt; I decided to dust off my old blog.&lt;/span&gt;

I have pulled in my old blog&apos;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.</description><pubDate>Sat, 17 Jan 2026 00:00:00 GMT</pubDate></item><item><title>Why Multi page apps are exciting again</title><link>https://jamesst.one/posts/mpa-comeback/</link><guid isPermaLink="true">https://jamesst.one/posts/mpa-comeback/</guid><description>&lt;![CDATA[&lt;p&gt;One thing that really excites me in the browser world right now is the renewed focus on &lt;strong&gt;multi-page applications (MPAs)&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;For a long time, &lt;strong&gt;single-page applications (SPAs)&lt;/strong&gt; 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 &lt;del&gt;default&lt;/del&gt;only choice.&lt;/p&gt;
&lt;p&gt;Some of the classic advantages of SPAs included:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;fast page loading &lt;em&gt;after&lt;/em&gt; the initial load&lt;/li&gt;
&lt;li&gt;smooth page transitions and navigation effects&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;But the interesting thing is that these features are no longer exclusive to SPAs.&lt;/p&gt;
&lt;h2 id=&quot;new-browser-features-are-leveling-the-playing-field&quot;&gt;New browser features are leveling the playing field&lt;/h2&gt;
&lt;h3 id=&quot;compression&quot;&gt;Compression&lt;/h3&gt;
&lt;p&gt;Soon, browsers will be able to use &lt;em&gt;super smart compression&lt;/em&gt; based on pages you’ve already loaded. Instead of re-downloading large chunks of repeated HTML (headers, navigation, layout, etc.), servers can send much smaller diffs.&lt;/p&gt;
&lt;p&gt;If you want to dig deeper into this, check out:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://developer.mozilla.org/en-US/docs/Web/HTTP/Compression_Dictionary_Transport&quot;&gt;Compression Dictionary Transport – HTTP | MDN&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.debugbear.com/blog/shared-compression-dictionaries&quot;&gt;The Ultimate Guide to Shared Compression Dictionaries | DebugBear&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This directly chips away at one of the historical weaknesses of MPAs: having to reload the entire document on every navigation.&lt;/p&gt;
&lt;h3 id=&quot;native-prefetching-and-prerendering&quot;&gt;Native prefetching and prerendering&lt;/h3&gt;
&lt;p&gt;Another area where SPAs used to dominate was &lt;strong&gt;preloading&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Previously, only SPAs could easily preload the next page using JavaScript. For example, on link hover you might start loading the next page’s data, then instantly render it on click and refresh it in the background.&lt;/p&gt;
&lt;p&gt;Now, browsers offer a native alternative via the &lt;a href=&quot;https://developer.mozilla.org/en-US/docs/Web/API/Speculation_Rules_API&quot;&gt;Speculation Rules API | MDN&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Instead of custom JavaScript logic, you can declaratively tell the browser what kinds of pages should be prefetched or prerendered:&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;html&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;script&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; type&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;speculationrules&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    &quot;prerender&quot;: [&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;      {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;        &quot;where&quot;: {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;          &quot;and&quot;: [&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;            { &quot;href_matches&quot;: &quot;/*&quot; },&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;            { &quot;not&quot;: { &quot;href_matches&quot;: &quot;/logout&quot; } },&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;            { &quot;not&quot;: { &quot;href_matches&quot;: &quot;/*\\?*(^|&amp;#x26;)add-to-cart=*&quot; } },&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;            { &quot;not&quot;: { &quot;selector_matches&quot;: &quot;.no-prerender&quot; } },&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;            { &quot;not&quot;: { &quot;selector_matches&quot;: &quot;[rel~=nofollow]&quot; } }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;          ]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;        }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;      }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    ],&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    &quot;prefetch&quot;: [&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;      {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;        &quot;urls&quot;: [&quot;next.html&quot;, &quot;next2.html&quot;],&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;        &quot;requires&quot;: [&quot;anonymous-client-ip-when-cross-origin&quot;],&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;        &quot;referrer_policy&quot;: &quot;no-referrer&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;      }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    ]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;&amp;#x3C;/&lt;/span&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;script&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This gives MPAs many of the same preloading capabilities that previously required an SPA and a client-side router.&lt;/p&gt;
&lt;h2 id=&quot;page-transitions&quot;&gt;Page transitions&lt;/h2&gt;
&lt;p&gt;Finally, although I think page transitions can be a gimmick, for a long time smooth transitions were another feature that only an SPA could provide.&lt;/p&gt;
&lt;p&gt;That’s changing with the introduction of &lt;a href=&quot;https://developer.chrome.com/docs/web-platform/view-transitions/&quot;&gt;View Transitions&lt;/a&gt;.
With &lt;a href=&quot;https://developer.chrome.com/docs/web-platform/view-transitions/cross-document&quot;&gt;cross document&lt;/a&gt;
view transitions, MPAs can now animate between full page navigations in a way that previously required client-side rendering.&lt;/p&gt;]]&gt;</description><pubDate>Sat, 17 Jan 2026 00:00:00 GMT</pubDate></item><item><title>Borked systemd units</title><link>https://jamesst.one/posts/bad-settings/</link><guid isPermaLink="true">https://jamesst.one/posts/bad-settings/</guid><description>&lt;![CDATA[&lt;p&gt;Previously when I have been debugging systemd services I have used: &lt;code&gt;systemctl status --failed&lt;/code&gt; to get me all of the failed services&lt;/p&gt;
&lt;p&gt;However that, as in my case today, did not return any failures, yet I knew a service was not working.&lt;/p&gt;
&lt;p&gt;It turned out the service was not working as it had a bad setting:&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;shell&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;❯&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; systemctl&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; status&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; home-manager-james.service&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;○&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; home-manager-james.service&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;     Loaded:&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; bad-setting&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; (Reason: &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;Unit&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; home-manager-james.service&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; has&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; a&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; bad&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; unit&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; file&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; setting.&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;     Active:&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; inactive&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; (dead)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;dec&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 09&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; 13:53:44&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; darter&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; hm-activate-james[1569]:&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; Creating&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; home&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; file&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; links&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; in&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; /home/james&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;dec&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 09&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; 13:53:44&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; darter&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; hm-activate-james[1569]:&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; Activating&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; onFilesChange&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;dec&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 09&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; 13:53:44&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; darter&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; hm-activate-james[1569]:&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; Activating&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; reloadSystemd&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;dec&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 09&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; 13:53:44&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; darter&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; systemd[1]:&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; User&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; systemd&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; daemon&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; not&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; running.&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; Skipping&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; reload.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;dec&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 09&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; 13:53:44&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; darter&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; systemd[1]:&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; home-manager-james.service:&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; Deactivated&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; successfully.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;dec&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 09&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; 13:53:44&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; darter&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; systemd[1]:&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; Finished&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; Home&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; Manager&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; environment&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; for&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; james.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;dec&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 09&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; 13:53:44&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; darter&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; systemd[1]:&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; home-manager-james.service:&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; Consumed&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; 804ms&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; CPU&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; time,&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; 66.9M&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; memory&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; peak,&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; 112.7M&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; read&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; from&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; disk.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;dec&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 09&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; 13:56:16&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; darter&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; systemd[1]:&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; home-manager-james.service:&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; Service&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; has&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; no&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; ExecStart=,&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; ExecStop=,&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; or&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; SuccessAction=.&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; Refusing.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;dec&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 09&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; 14:01:26&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; darter&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; systemd[1]:&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; home-manager-james.service:&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; Service&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; has&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; no&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; ExecStart=,&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; ExecStop=,&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; or&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; SuccessAction=.&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; Refusing.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;dec&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 09&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; 14:02:36&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; darter&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; systemd[1]:&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; home-manager-james.service:&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; Service&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; has&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; no&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; ExecStart=,&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; ExecStop=,&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; or&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; SuccessAction=.&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; Refusing.&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I am still not sure how to identify these services without directly checking their status, like I did above.&lt;/p&gt;]]&gt;</description><pubDate>Tue, 09 Dec 2025 00:00:00 GMT</pubDate></item><item><title>Using network in a nix build</title><link>https://jamesst.one/posts/use-network-in-nix-build/</link><guid isPermaLink="true">https://jamesst.one/posts/use-network-in-nix-build/</guid><description>&lt;![CDATA[&lt;p&gt;You can &lt;strong&gt;not&lt;/strong&gt; normally use network in a nix build, as it is not sandboxed and is therefore a source of non reproducibility.&lt;/p&gt;
&lt;p&gt;However, with &lt;code&gt;lib.fetchers.withNormalizedHash&lt;/code&gt; you can use the network so long as you provide a hash&lt;/p&gt;
&lt;p&gt;A simplified (by me) example from: &lt;a href=&quot;https://github.com/NixOS/nixpkgs/blob/ff214e9d0e5e89be6e1fd5bb2d9f3add6c7c5fbb/pkgs/build-support/docker/default.nix#L141-193&quot;&gt;nixkpgs&lt;/a&gt;&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;nix&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;  addDockerImageToNixStore&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; let&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;        defaultArchitecture&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt; pkgs&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt;go&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt;GOARCH&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;    in&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt;    lib&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt;fetchers&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt;withNormalizedHash&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; { } (&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;      { imageName&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;      ,&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; imageDigest&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;      ,&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; outputHash&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;      ,&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; outputHashAlgo&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;      ,&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; os &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;?&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; &quot;linux&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;      ,&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; arch &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;?&lt;/span&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt; defaultArchitecture&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;      ,&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; tlsVerify &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;?&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; true&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;      ,&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; name &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;?&lt;/span&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt; imageName&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;      }: &lt;/span&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt;pkgs&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt;runCommand&lt;/span&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt; name&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;        {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;          inherit&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; imageDigest&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;          impureEnvVars&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt; lib&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt;fetchers&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt;proxyImpureEnvVars&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;          inherit&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; outputHash&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; outputHashAlgo&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;          outputHashMode&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; &quot;nar&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;          nativeBuildInputs&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; [ &lt;/span&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt;pkgs&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt;skopeo&lt;/span&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt; pkgs&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt;umoci&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; ];&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;          SSL_CERT_FILE&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;${&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;pkgs&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;cacert&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;out&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;/etc/ssl/certs/ca-bundle.crt&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;          sourceURL&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; &quot;docker://&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;${&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;imageName&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;@&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;${&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;imageDigest&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;        }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;        &apos;&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;          tmp=&quot;$(mktemp -d)&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;          skopeo \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;           --insecure-policy \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;           --tmpdir=&quot;$TMPDIR&quot; \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;           --override-os &quot;&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;${&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;os&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot; \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;           --override-arch &quot;&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;${&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;arch&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot; \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;           copy \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;           --src-tls-verify=&quot;&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;${&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;lib&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;boolToString&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; tlsVerify&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot; \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;           &quot;$sourceURL&quot; &quot;oci://$tmp:latest&quot; \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;           | cat&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;           umoci raw unpack --rootless --image &quot;$tmp&quot; &quot;$out&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;        &apos;&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    );&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;]]&gt;</description><pubDate>Tue, 30 Sep 2025 00:00:00 GMT</pubDate></item><item><title>Git ting a good version from git</title><link>https://jamesst.one/posts/git-version/</link><guid isPermaLink="true">https://jamesst.one/posts/git-version/</guid><description>&lt;![CDATA[&lt;p&gt;Not so much a TIL but I keep forgetting this form of &lt;code&gt;git describe&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;So writing it down so I don’t forget it again…&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;git describe --tags&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;]]&gt;</description><pubDate>Thu, 10 Jul 2025 00:00:00 GMT</pubDate></item><item><title>Container sidecar shells</title><link>https://jamesst.one/posts/sh-sidecars/</link><guid isPermaLink="true">https://jamesst.one/posts/sh-sidecars/</guid><description>&lt;![CDATA[&lt;blockquote&gt;
&lt;p&gt;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:&lt;/p&gt;
&lt;/blockquote&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;sh&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;docker&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; run&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;  --rm&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;  -it&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;  --pid=container:&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;container&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; i&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;d&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;  --net=container:&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;container&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; i&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;d&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;  --cap-add&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; sys_admin&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;  alpine&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;  sh&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;from: &lt;a href=&quot;https://tmp.bearblog.dev/minimal-containers-using-nix/&quot;&gt;Minimal containers using Nix&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This starts an Alpine container that attaches to the same PID and network namespaces, giving you visibility into what’s running inside the original container.&lt;/p&gt;
&lt;p&gt;To make this easier, you can define a Bash function:&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;sidecar-sh&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;() {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;  local&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; target_container&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;$1&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;  local&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; container_id&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  container_id&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;$(&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;docker&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; inspect&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; --format&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; &apos;{{.Id}}&apos;&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;$target_container&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;  docker&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; run&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; --rm&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; -it&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;    --pid=container:&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;$container_id&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;    --net=container:&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;$container_id&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;    --cap-add&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; sys_admin&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; \&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;    alpine&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; sh&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;]]&gt;</description><pubDate>Wed, 18 Jun 2025 00:00:00 GMT</pubDate></item><item><title>Good programmers</title><link>https://jamesst.one/posts/good-programmers/</link><guid isPermaLink="true">https://jamesst.one/posts/good-programmers/</guid><description>&lt;![CDATA[&lt;blockquote&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Linus Torvalds&lt;/p&gt;
&lt;p&gt;I actually think this can be generalised:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;/blockquote&gt;]]&gt;</description><pubDate>Fri, 07 Mar 2025 00:00:00 GMT</pubDate></item><item><title>IKEAs restaurant</title><link>https://jamesst.one/posts/ikeas-restaurant/</link><guid isPermaLink="true">https://jamesst.one/posts/ikeas-restaurant/</guid><description>&lt;![CDATA[&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;From &lt;a href=&quot;https://open.spotify.com/episode/6AdowJpGm8uBINgHAdDTKB?si=vGU_5gdDTriVUMJGN7nKTA%0A&quot;&gt;podcast&lt;/a&gt;&lt;/p&gt;]]&gt;</description><pubDate>Wed, 29 Jan 2025 00:00:00 GMT</pubDate></item><item><title>DDL Postgres Macros</title><link>https://jamesst.one/posts/ddl-macros/</link><guid isPermaLink="true">https://jamesst.one/posts/ddl-macros/</guid><description>&lt;![CDATA[&lt;p&gt;In postgres you may find yourself repeating common operations on all your tables. For example adding an &lt;a href=&quot;https://github.com/WHauser-HP/postgres_audit&quot;&gt;audit log&lt;/a&gt;, created times, modified user etc.&lt;/p&gt;
&lt;p&gt;This can be tedious to add everywhere. Instead, you can create a postgres “macro” to update your DDL for you&lt;/p&gt;
&lt;h1 id=&quot;example&quot;&gt;Example&lt;/h1&gt;
&lt;h2 id=&quot;created&quot;&gt;Created&lt;/h2&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;postgresql&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;CREATE OR REPLACE&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; FUNCTION&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; public&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;.add_created_columns(&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    table_type regclass&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;) &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;RETURNS&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; void&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;    LANGUAGE&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; plpgsql&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;    SET&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; search_path &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;TO&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; &apos;&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;AS&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; $_$&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;declare&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;    statement&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; text&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; format&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;($$&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;        alter&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; table&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; %&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;$s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;            add&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; column created_user &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; references&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; public.&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;user&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(id) &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;not null&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;            add&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; column created_at   &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;timestamptz&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; not null&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; default&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; current_timestamp;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;        $$,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;        $&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;begin&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;    execute&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; statement&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;$_$;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;usage&quot;&gt;Usage&lt;/h3&gt;
&lt;p&gt;To use the &lt;code&gt;add_created_columns&lt;/code&gt; macro, you simply call it by passing the table name as a parameter. Here’s an example
of how to use it:&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;postgresql&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;SELECT&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; public&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;add_created_columns&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;public.orders&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;),&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;       public&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;add_created_columns&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;public.products&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This will modify the specified table by adding the &lt;code&gt;created_user&lt;/code&gt; and &lt;code&gt;created_at&lt;/code&gt; columns as defined in the macro.&lt;/p&gt;
&lt;h2 id=&quot;modified&quot;&gt;Modified&lt;/h2&gt;
&lt;p&gt;To add similar columns for tracking modifications, you can create a new macro called &lt;code&gt;add_modified_columns&lt;/code&gt;. Here’s an example:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; this also adds a trigger to keep the modified at up to date.&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;postgresql&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;   create or replace&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; function&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; update_modified_at&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;()&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;    returns&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; trigger &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;as&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; $$&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;begin&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;    new&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;modified_at&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; current_timestamp;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;    return&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; new;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;$$ &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;language&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; plpgsql;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;CREATE OR REPLACE&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; FUNCTION&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; public&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;.add_modified_columns(&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;table_type regclass&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;) &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;RETURNS&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; void&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;LANGUAGE&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; plpgsql&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;SET&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; search_path &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;TO&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; &apos;&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;AS&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; $_$&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;declare&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;statement&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; text&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; format&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;($$&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;        alter&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; table&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; %&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;$s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;            add&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; column modified_user &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; references&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; public.&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;user&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(id) &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;not null&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;            add&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; column modified_at &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;timestamptz&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; not null&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; default&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; current_timestamp;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;        create&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; trigger&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; update_modified_at_trigger&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;            before&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; update&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; on&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; %&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;$s&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;            for&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; each &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;row&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;            execute&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; function&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; update_modified_at();&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;        $$,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;        $&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;begin&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;execute&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; statement&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;$_$;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;usage-1&quot;&gt;Usage&lt;/h3&gt;
&lt;p&gt;To use the &lt;code&gt;add_modified_columns&lt;/code&gt; macro, you can call it similarly as follows:&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;postgresql&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;SELECT&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; public&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;add_modified_columns&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;public.orders&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;),&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;       public&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;add_modified_columns&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;public.products&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This will modify the specified table by adding the &lt;code&gt;modified_user&lt;/code&gt; and &lt;code&gt;modified_at&lt;/code&gt; columns.&lt;/p&gt;]]&gt;</description><pubDate>Wed, 29 Jan 2025 00:00:00 GMT</pubDate></item><item><title>Push to repo in GitHub Actions</title><link>https://jamesst.one/posts/pushing-back-to-git-repo/</link><guid isPermaLink="true">https://jamesst.one/posts/pushing-back-to-git-repo/</guid><description>&lt;![CDATA[&lt;p&gt;I wanted to have a GitHub Action step push back to the repo it is running in.&lt;/p&gt;
&lt;p&gt;For that you need the &lt;code&gt;write&lt;/code&gt; permission. which can be added like so:&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;yaml&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;permissions&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;  contents&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;write&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;from: &lt;a href=&quot;https://stackoverflow.com/a/58393457&quot;&gt;git - Push to origin from GitHub action - Stack Overflow&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;eg in: &lt;a href=&quot;https://github.com/jamesmstone/chess/commit/d0a3250e8cdafa56fa549a7d5513cd0b170a83c8&quot;&gt;add write permission · jamesmstone/chess@d0a3250 · GitHub&lt;/a&gt;&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;yaml&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;Push commit&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;on&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;push&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;permissions&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;  contents&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;write&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;jobs&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;  report&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;    runs-on&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;ubuntu-latest&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;    steps&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;      - &lt;/span&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;uses&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;actions/checkout@v3&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;      - &lt;/span&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;Create report file&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;        run&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;date +%s &gt; report.txt&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;      - &lt;/span&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;Commit report&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;        run&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;|&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;          git config --global user.name &apos;Your Name&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;          git config --global user.email &apos;your-username@users.noreply.github.com&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;          git commit -am &quot;Automated report&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;          git push&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;It it discussed on the github blog: &lt;a href=&quot;https://github.blog/changelog/2021-04-20-github-actions-control-permissions-for-github_token/&quot;&gt;GitHub Actions: Control permissions for GITHUB_TOKEN - GitHub Changelog&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;and here is the docs: &lt;a href=&quot;https://docs.github.com/en/actions/security-for-github-actions/security-guides/automatic-token-authentication#modifying-the-permissions-for-the-github_token&quot;&gt;Automatic token authentication - GitHub Docs&lt;/a&gt;&lt;/p&gt;]]&gt;</description><pubDate>Tue, 10 Dec 2024 00:00:00 GMT</pubDate></item><item><title>Find sqlite dbs</title><link>https://jamesst.one/posts/finding-sqlite-dbs/</link><guid isPermaLink="true">https://jamesst.one/posts/finding-sqlite-dbs/</guid><description>&lt;![CDATA[&lt;p&gt;Lots of applications use sqlite dbs. It can be useful to try and find them all. For this you can use the following command&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;find . -type f -exec sh -c &apos;head -c 16 &quot;$1&quot; 2&gt;/dev/null | grep -q &quot;^SQLite format&quot; &amp;#x26;&amp;#x26; echo &quot;$1&quot;&apos; _ {} \;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;as all sqlite files start with the header string: “SQLite format 3\000” , see: &lt;a href=&quot;https://www.sqlite.org/fileformat.html&quot;&gt;Database File Format&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;it can then be helpful to get the size of each result&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;find . -type f -exec sh -c &apos;head -c 16 &quot;$1&quot; 2&gt;/dev/null | grep -q &quot;^SQLite format&quot; &amp;#x26;&amp;#x26; echo &quot;$1 $(stat -c%s &quot;$1&quot; | numfmt --to=iec)&quot;&apos; _ {} \;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;]]&gt;</description><pubDate>Mon, 25 Nov 2024 00:00:00 GMT</pubDate></item><item><title>Adding auto complete in bash</title><link>https://jamesst.one/posts/auto-completion/</link><guid isPermaLink="true">https://jamesst.one/posts/auto-completion/</guid><description>&lt;![CDATA[&lt;p&gt;in bash code completions are setup using the &lt;code&gt;complete &lt;/code&gt;command&lt;/p&gt;
&lt;p&gt;you can print all current system &lt;code&gt;completion&lt;/code&gt; s using &lt;code&gt;complete -p&lt;/code&gt;&lt;/p&gt;]]&gt;</description><pubDate>Thu, 29 Aug 2024 00:00:00 GMT</pubDate></item><item><title>Decision making</title><link>https://jamesst.one/posts/decision-making/</link><guid isPermaLink="true">https://jamesst.one/posts/decision-making/</guid><description>&lt;![CDATA[&lt;blockquote&gt;
&lt;p&gt;if you’re unsure what to do, always choose the option that makes the better story.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;ul&gt;
&lt;li&gt;Someone via geo wizard &lt;a href=&quot;https://www.youtube.com/watch?v=cqn-KaT0OBo&quot;&gt;YouTube&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;]]&gt;</description><pubDate>Thu, 15 Aug 2024 00:00:00 GMT</pubDate></item><item><title>Searching scrollback in Alacritty</title><link>https://jamesst.one/posts/search-alacritty/</link><guid isPermaLink="true">https://jamesst.one/posts/search-alacritty/</guid><description>&lt;![CDATA[&lt;p&gt;I use &lt;a href=&quot;https://github.com/alacritty/alacritty&quot;&gt;Alacritty&lt;/a&gt; as my terminal emulator. To be honest I am not sure why… it gets out of my way and seems to be fast enough&lt;/p&gt;
&lt;p&gt;Anyway, I wanted to be able to search the scrollback buffer.&lt;/p&gt;
&lt;p&gt;That is quite trivial in alacritty., although as I haven’t read the manual I struggled to find it.&lt;/p&gt;
&lt;p&gt;&lt;kbd&gt;ctrl&lt;/kbd&gt;+&lt;kbd&gt;f&lt;/kbd&gt; , as I first tried, does not work, but &lt;kbd&gt;ctrl&lt;/kbd&gt;+&lt;kbd&gt;shift&lt;/kbd&gt;+&lt;kbd&gt;f&lt;/kbd&gt; does.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Search&lt;/p&gt;
&lt;p&gt;Search allows you to find anything in Alacritty’s scrollback buffer. You can search forward using Ctrl Shift f (Command f on macOS) and backward using Ctrl Shift b (Command b on macOS).&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/alacritty/alacritty/blob/master/docs/features.md&quot;&gt;From GitHub Feature page&lt;/a&gt; viewed at &lt;a href=&quot;https://github.com/alacritty/alacritty/blob/cacdb5bb3b72bad2c729227537979d95af75978f/docs/features.md&quot;&gt; cacdb5b&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;There is also a Vi mode , with standard vi search&lt;/p&gt;]]&gt;</description><pubDate>Tue, 30 Jul 2024 00:00:00 GMT</pubDate></item><item><title>Blood types</title><link>https://jamesst.one/posts/blood-types/</link><guid isPermaLink="true">https://jamesst.one/posts/blood-types/</guid><description>&lt;![CDATA[&lt;p&gt;I was aware humans have different blood types. &lt;code&gt;A&lt;/code&gt; &lt;code&gt;B&lt;/code&gt; &lt;code&gt;AB&lt;/code&gt; &lt;code&gt;O&lt;/code&gt; and you can be positive or negative.&lt;/p&gt;
&lt;p&gt;However, I was not aware that &lt;code&gt;A&lt;/code&gt; &lt;code&gt;B&lt;/code&gt; &lt;code&gt;AB&lt;/code&gt; &lt;code&gt;O&lt;/code&gt; are actually groups of blood types. There are actually 45 known human blood types. &lt;a href=&quot;https://www.newscientist.com/article/mg26134751-500-a-new-understanding-of-how-your-blood-type-influences-your-health/&quot;&gt;See more&lt;/a&gt;. But new ones keep getting discovered!&lt;/p&gt;]]&gt;</description><pubDate>Fri, 26 Jan 2024 00:00:00 GMT</pubDate></item><item><title>Interactively debug a sh script</title><link>https://jamesst.one/posts/debugging-sh-scripts/</link><guid isPermaLink="true">https://jamesst.one/posts/debugging-sh-scripts/</guid><description>&lt;![CDATA[&lt;p&gt;My common (ba)sh script setup is a bit like this:&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;shell&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;# By default, in a pipeline of commands, the exit status of the pipeline is determined by&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;# the exit status of the last command in the pipeline. This changes that to fail if any command fails&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;set&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; -o&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; pipefail&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;# stop on exit&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;set&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; -o&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; errexit&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;# trace , print all commands before running.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;set&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; -x&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Another approach that I just thought of that is useful is to enter an interactive shell should a command fail. eg&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;shell&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;may_fail&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; ||&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; bash&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This is particularly useful when in a loop and subshell:&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;shell&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;find&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;$root_directory&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; -type&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; d&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; |&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; while&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; read&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; -r&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; dir&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;; &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;do&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;      cd&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;$dir&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;      may_fail&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; ||&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; bash&lt;/span&gt;&lt;span style=&quot;color:#6A737D&quot;&gt; # explore current state if this fails.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;done&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;It allows the loop to pause until you’re ready to continue by pressing &lt;kbd&gt;Ctrl&lt;/kbd&gt; + &lt;kbd&gt;d&lt;/kbd&gt;, or you can exit entirely using &lt;kbd&gt;Ctrl&lt;/kbd&gt; + &lt;kbd&gt;c&lt;/kbd&gt;.&lt;/p&gt;]]&gt;</description><pubDate>Wed, 16 Aug 2023 00:00:00 GMT</pubDate></item><item><title>AWK from and to pattern matches</title><link>https://jamesst.one/posts/from-to-pattern-match/</link><guid isPermaLink="true">https://jamesst.one/posts/from-to-pattern-match/</guid><description>&lt;![CDATA[&lt;p&gt;when using awk to parse a file I was aware it uses this basic structure:&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;awk&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;pattern { action }&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;eg&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;shell&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;seq&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 1&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 10&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; |&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; awk&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; &apos;/2/{print $0}&apos;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Outputs&lt;/strong&gt;&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;text&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;and if you omit an action it defaults to &lt;code&gt;print $0&lt;/code&gt; ie print the whole matching line.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;I was not aware however you can have multiple &lt;code&gt;pattern&lt;/code&gt; seperated by &lt;code&gt;,&lt;/code&gt; and it will match from the first pattern until the last pattern&lt;/p&gt;
&lt;p&gt;Relevant excerpt from the man page:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;A pattern may consist of two patterns separated by a comma; in this case, the action is performed for all lines from an occurrence of the first pattern though an occurrence of the second&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2 id=&quot;example&quot;&gt;Example&lt;/h2&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;shell&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; seq&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 1&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; 10&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; |&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; awk&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; &apos;/2/,/8/&apos;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Outputs&lt;/strong&gt;&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;text&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;2&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;3&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;4&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;5&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;6&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;7&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;8&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Discovered from: &lt;a href=&quot;https://www.reddit.com/r/bash/comments/12z9snv/comment/jhrlrg2/&quot;&gt;https://www.reddit.com/r/bash/comments/12z9snv/comment/jhrlrg2/&lt;/a&gt;&lt;/p&gt;]]&gt;</description><pubDate>Sat, 13 May 2023 00:00:00 GMT</pubDate></item><item><title>Swimming pool depth</title><link>https://jamesst.one/posts/swimming-speed-and-pool/</link><guid isPermaLink="true">https://jamesst.one/posts/swimming-speed-and-pool/</guid><description>&lt;![CDATA[&lt;ul&gt;
&lt;li&gt;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.&lt;/li&gt;
&lt;li&gt;In the women’s 400 freestyle, three former world record holders failed to reach their personal bests, and &lt;a href=&quot;https://en.wikipedia.org/wiki/Katie_Ledecky&quot;&gt;Katie Ledecky&lt;/a&gt; did not break 4 minutes.&lt;/li&gt;
&lt;li&gt;The swimming pool at Paris La Défense Arena is &lt;strong&gt;2.15 meters deep&lt;/strong&gt;, below the recommended &lt;strong&gt;3 meters&lt;/strong&gt; by World Aquatics but above the &lt;strong&gt;previous minimum&lt;/strong&gt; of &lt;strong&gt;2 meters.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Shallower pools may cause “wavy” or choppy water, affecting performance, especially in breaststroke.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;From: &lt;a href=&quot;https://sports.yahoo.com/paris-olympics-2024-is-a-slow-swimming-pool-impeding-world-records-133347713.html&quot;&gt;Yahoo Sports&lt;/a&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;However, &lt;a href=&quot;https://en.wikipedia.org/wiki/Kyle_Chalmers&quot;&gt;Kyle Chalmers&lt;/a&gt; swam the world’s fastest time in the 100m freestyle. however as he was not swimming the first leg of the race it does not count. From:
&lt;a href=&quot;https://www.tyla.com/news/kyle-chalmers-olympics-relay-world-record-545320-20240729&quot;&gt;https://www.tyla.com/news/kyle-chalmers-olympics-relay-world-record-545320-20240729&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;]]&gt;</description><pubDate>Sat, 13 May 2023 00:00:00 GMT</pubDate></item><item><title>ESM HTTP imports</title><link>https://jamesst.one/posts/esm-http-imports/</link><guid isPermaLink="true">https://jamesst.one/posts/esm-http-imports/</guid><description>&lt;![CDATA[&lt;p&gt;When using all &lt;a href=&quot;https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules#browser_compatibility&quot;&gt;modern versions&lt;/a&gt; of JS you can use esm modules.&lt;/p&gt;
&lt;p&gt;What I did not realise is you can import modules at runtime over http(s).&lt;/p&gt;
&lt;p&gt;To help with this there are a range of CDNs that host the whole of NPM designed for ESM.&lt;/p&gt;
&lt;p&gt;Some examples include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://esm.sh/&quot;&gt;https://esm.sh/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://esm.run/&quot;&gt;https://esm.run/&lt;/a&gt; - from: &lt;a href=&quot;https://www.jsdelivr.com/&quot;&gt;https://www.jsdelivr.com/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;example&quot;&gt;Example&lt;/h2&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;js&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; { version, verify } &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;from&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; &quot;https://esm.run/jsonwebtoken-esm&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;console.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;log&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(version); &lt;/span&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;// &quot;8.5.1&quot; at time of writing.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;const&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; token&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; =&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;  &quot;eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwic2NvcGVzIjpbImEiLCJiIl0sImlhdCI6MTUxNjIzOTAyMn0.RYe2h0fD7XqWDxSepytntccG5-EfrdGmVmqwfhi36O0&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;const&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; decoded&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; verify&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(token, &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;your-256-bit-secret&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;console.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;log&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(decoded);&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;]]&gt;</description><pubDate>Thu, 22 Dec 2022 00:00:00 GMT</pubDate></item><item><title>Alias plpgsql variables</title><link>https://jamesst.one/posts/alias-plpgsql-variables/</link><guid isPermaLink="true">https://jamesst.one/posts/alias-plpgsql-variables/</guid><description>&lt;![CDATA[&lt;p&gt;Inside plpgsql function you can often get naming conflicts between input parameters and column / table names&lt;/p&gt;
&lt;p&gt;My previous modus operandi was to qualify the input param using the function name. For example:&lt;/p&gt;
&lt;h2 id=&quot;schema&quot;&gt;Schema&lt;/h2&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plpgsql&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;create&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; table&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; data&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;.user (&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  id &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;serial&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; primary key&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;  name&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; text&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; not null&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  birth_date &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;date&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; not null&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;options&quot;&gt;Options&lt;/h2&gt;
&lt;h3 id=&quot;qualify-using-function-name&quot;&gt;Qualify using function name&lt;/h3&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plpgsql&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;create&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; function&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; age&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;( &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;user&quot;&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; int&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; ) &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;returns&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; int&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; as&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;$$&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;  declare&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    user_id alias &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;for&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; &quot;user&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;    --  user_id alias for $1; -- alternative&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;  begin&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;    select&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; age(current_date, birth_date) &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;from&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; data&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;user&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; where&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; id &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; age&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;user&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; ;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;  end&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;$$ &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;language&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; plpgsql;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;alias&quot;&gt;ALIAS&lt;/h3&gt;
&lt;p&gt;But you can also use &lt;code&gt;ALIAS FOR&lt;/code&gt;:&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plpgsql&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;create&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; function&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; age&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;( &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&quot;user&quot;&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; int&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; ) &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;returns&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; int&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; as&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;$$&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;  declare&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    user_id alias &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;for&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; &quot;user&quot;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;    --  user_id alias for $1; -- alternative&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;  begin&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;    select&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; age(current_date, birth_date) &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;from&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; data&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;user&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; where&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; id &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; user_id ;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;  end&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;$$ &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;language&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; plpgsql;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Aside:&lt;/strong&gt; For a function that only does a single &lt;code&gt;select&lt;/code&gt; a &lt;code&gt;SQL&lt;/code&gt; language function is more appropriate.&lt;/p&gt;]]&gt;</description><pubDate>Thu, 24 Nov 2022 00:00:00 GMT</pubDate></item><item><title>React get a components prop types</title><link>https://jamesst.one/posts/react-component-prop/</link><guid isPermaLink="true">https://jamesst.one/posts/react-component-prop/</guid><description>&lt;![CDATA[&lt;p&gt;When using TS with React you may want to get the types of another component.&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;tsx&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;const&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; MyButton&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; React&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;FC&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;&amp;#x3C;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt;  value&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; string&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;  onChange&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt;newValue&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; string&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;) &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&gt;&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; void&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;}&gt; &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; () &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&gt;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;  return&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; &amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#85E89D&quot;&gt;button&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; value&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;{value} &lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;onchange&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;{onChange} /&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;};&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;type&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; ButtonProps&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; React&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;ComponentProps&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;typeof&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; MyButton&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;// equivalent:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;type&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; ButtonProps&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; { &lt;/span&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt;value&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; string&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;; &lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;onChange&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;color:#FFAB70&quot;&gt;newValue&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; string&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;) &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&gt;&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; void&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; };&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This can be particularly useful when using an external library that does not expose the types for a component.&lt;/p&gt;]]&gt;</description><pubDate>Thu, 24 Nov 2022 00:00:00 GMT</pubDate></item><item><title>Spotify playlist to Dropbox - Version 2</title><link>https://jamesst.one/posts/2015-02-04-ifttt-spotify-playlist-dropbox-version-2/</link><guid isPermaLink="true">https://jamesst.one/posts/2015-02-04-ifttt-spotify-playlist-dropbox-version-2/</guid><description>&lt;![CDATA[&lt;p&gt;This is a post about an IFTTT recipe I made. Not sure what &lt;a href=&quot;/posts/2013-11-05-ifttt&quot;&gt;IFTTT is&lt;/a&gt; ?&lt;/p&gt;
&lt;p&gt;Unfortunately for sometime now &lt;a href=&quot;/posts/2013-11-06-ifttt-spotify-playlist-dropbox&quot;&gt;version 1&lt;/a&gt; of these recipes hasn’t been working.
Now that I have some more time on my hands I have decided to fix it.&lt;/p&gt;
&lt;h2 id=&quot;improvements&quot;&gt;Improvements&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;It now works again!&lt;/li&gt;
&lt;li&gt;Its quicker than version 1&lt;/li&gt;
&lt;li&gt;Works more reliably.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;disadvantages&quot;&gt;Disadvantages&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Only works for the first 100 songs in playlists with more the 100 songs&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;technical-differencesbetween-versions&quot;&gt;Technical differences between versions&lt;/h2&gt;




















&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;&lt;/th&gt;&lt;th&gt;Version 1&lt;/th&gt;&lt;th&gt;Version 2&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Backend&lt;/td&gt;&lt;td&gt;- Yahoo Pipes&lt;/td&gt;&lt;td&gt;- PHP ( I now know PHP :D )&lt;br&gt;- Memcache&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;APIs used&lt;/td&gt;&lt;td&gt;- Last Fm&lt;br&gt;- Soundcloud&lt;br&gt;- Spotify (Unofficial through webpage scrapping)&lt;/td&gt;&lt;td&gt;- Last Fm&lt;br&gt;- Soundcloud&lt;br&gt;- Spotify (Official)&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;h2 id=&quot;upgrading-to-new-version&quot;&gt;Upgrading to new version&lt;/h2&gt;
&lt;p&gt;Nothing should need to be changed when upgrading from the previous version.&lt;/p&gt;
&lt;h2 id=&quot;using-new-version&quot;&gt;Using New Version&lt;/h2&gt;
&lt;h3 id=&quot;what-this-recipe-does&quot;&gt;What this recipe does&lt;/h3&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;h3 id=&quot;recipes&quot;&gt;Recipes&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;What’s the difference?&lt;/strong&gt; &lt;em&gt;Download only exact matches&lt;/em&gt; only does steps 1 to 3 of *How it Works  *Below. As such it is very limiting (it only gets the exact song).&lt;/p&gt;
&lt;h4 id=&quot;download-only-exact-matches-source-lastfm-free-music&quot;&gt;Download only exact matches (source Last.fm Free Music)&lt;/h4&gt;
&lt;p&gt;Save to box&lt;/p&gt;
&lt;p&gt;&lt;a id=&quot;embed_recipe-126747&quot; class=&quot;embed_recipe embed_recipe-l_83&quot; href=&quot;https://ifttt.com/view_embed_recipe/126747&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://ifttt.com/recipe_embed_img/126747&quot; alt=&quot;IFTTT Recipe: auto #Download the new songs in a #Spotify playlist  to my #Box #free #music #Exact&quot; width=&quot;370px&quot;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Save to dropbox&lt;/p&gt;
&lt;p&gt;&lt;a id=&quot;embed_recipe-126750&quot; class=&quot;embed_recipe embed_recipe-l_87&quot; href=&quot;https://ifttt.com/view_embed_recipe/126750&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://ifttt.com/recipe_embed_img/126750&quot; alt=&quot;IFTTT Recipe: auto #Download the new songs in a #Spotify playlist  to my #Dropbox #free #music #Exact&quot; width=&quot;370px&quot;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Save to google drive&lt;/p&gt;
&lt;p&gt;&lt;a id=&quot;embed_recipe-126748&quot; class=&quot;embed_recipe embed_recipe-l_91&quot; href=&quot;https://ifttt.com/view_embed_recipe/126748&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://ifttt.com/recipe_embed_img/126748&quot; alt=&quot;IFTTT Recipe: auto #Download the new songs in a #Spotify playlist  to my #googledrive #free #music #Exact&quot; width=&quot;370px&quot;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;save to skydrive&lt;/p&gt;
&lt;p&gt;&lt;a id=&quot;embed_recipe-126749&quot; class=&quot;embed_recipe embed_recipe-l_88&quot; href=&quot;https://ifttt.com/view_embed_recipe/126749&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://ifttt.com/recipe_embed_img/126749&quot; alt=&quot;IFTTT Recipe: auto #Download the new songs in a #Spotify playlist  to my #Skydrive #free #music #Exact&quot; width=&quot;370px&quot;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h4 id=&quot;download-all-source-lastfm-free-music-and-soundcloud&quot;&gt;Download all (Source Last.fm Free Music and Soundcloud)&lt;/h4&gt;
&lt;p&gt;Save to box&lt;/p&gt;
&lt;p&gt;&lt;a id=&quot;embed_recipe-126754&quot; class=&quot;embed_recipe embed_recipe-l_81&quot; href=&quot;https://ifttt.com/view_embed_recipe/126754&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://ifttt.com/recipe_embed_img/126754&quot; alt=&quot;IFTTT Recipe: auto #Download the new songs in a #Spotify playlist  to my #Box #free #music #all&quot; width=&quot;370px&quot;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Save to dropbox&lt;/p&gt;
&lt;p&gt;&lt;a id=&quot;embed_recipe-126753&quot; class=&quot;embed_recipe embed_recipe-l_85&quot; href=&quot;https://ifttt.com/view_embed_recipe/126753&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://ifttt.com/recipe_embed_img/126753&quot; alt=&quot;IFTTT Recipe: auto #Download the new songs in a #Spotify playlist  to my #Dropbox #free #music #all&quot; width=&quot;370px&quot;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Save to google drive&lt;/p&gt;
&lt;p&gt;&lt;a id=&quot;embed_recipe-126752&quot; class=&quot;embed_recipe embed_recipe-l_89&quot; href=&quot;https://ifttt.com/view_embed_recipe/126752&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://ifttt.com/recipe_embed_img/126752&quot; alt=&quot;IFTTT Recipe: auto #Download the new songs in a #Spotify playlist  to my #googledrive #free #music #all&quot; width=&quot;370px&quot;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;save to skydrive&lt;/p&gt;
&lt;p&gt;&lt;a id=&quot;embed_recipe-126751&quot; class=&quot;embed_recipe embed_recipe-l_86&quot; href=&quot;https://ifttt.com/view_embed_recipe/126751&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://ifttt.com/recipe_embed_img/126751&quot; alt=&quot;IFTTT Recipe: auto #Download the new songs in a #Spotify playlist  to my #Skydrive #free #music #all&quot; width=&quot;370px&quot;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&quot;set-up-instructions&quot;&gt;Set up Instructions&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;In Spotify right click on your playlist and select *Copy Spotify URI&lt;/p&gt;
&lt;p&gt;&lt;img __ASTRO_IMAGE_=&quot;{&amp;#x22;src&amp;#x22;:&amp;#x22;../post_assets/Screenshot-2013-11-06-17.29.24.png&amp;#x22;,&amp;#x22;alt&amp;#x22;:&amp;#x22;How to Copy Spotify URI&amp;#x22;,&amp;#x22;index&amp;#x22;:0}&quot;&gt;&lt;/p&gt;
&lt;p&gt;How to Copy Spotify URI&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Then go to the desired recipe (&lt;em&gt;links above&lt;/em&gt;)&lt;/li&gt;
&lt;li&gt;In the URL field paste your *Spotify URI *after the “=” sign&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img __ASTRO_IMAGE_=&quot;{&amp;#x22;src&amp;#x22;:&amp;#x22;../post_assets/Screenshot-2013-11-06-18.23.19.png&amp;#x22;,&amp;#x22;alt&amp;#x22;:&amp;#x22;Paste the Spotify URI after the \&amp;#x22;=\&amp;#x22; sign&amp;#x22;,&amp;#x22;index&amp;#x22;:0}&quot;&gt;&lt;/p&gt;
&lt;p&gt;Paste the Spotify URI after the ”=” sign&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;In order for the script to work the feed url you just completed in step 3 needs to be loaded once ( without IFTTT) so copy the complete feed url from IFTTT and paste it into your browser&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ol&gt;



&lt;h2 id=&quot;how-it-works&quot;&gt;How it works&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;The script checks your Spotify playlist&lt;/li&gt;
&lt;li&gt;Then song by song it checks to see if the song is available legally for free from Last.fm&lt;/li&gt;
&lt;li&gt;If it is the script tells IFTTT to add it to your Dropbox or equivalent.&lt;/li&gt;
&lt;li&gt;If it isn’t the script searches Soundcloud for the songs title and artist and then downloads the first &lt;em&gt;downloadable&lt;/em&gt; song. This is why remixed version are often downloaded.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&quot;other-ifttt-recipes&quot;&gt;Other IFTTT recipes&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;I made a post about how I use IFTTT -&lt;em&gt;&lt;a href=&quot;/posts/2013-11-06-my-ifttt-recipes&quot; title=&quot;How I use IFTTT&quot;&gt;interested&lt;/a&gt;?&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://ifttt.com/p/jamesmstone&quot;&gt;My Public IFTTT Profile&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;help&quot;&gt;Help&lt;/h2&gt;
&lt;p&gt;Need help? Have a suggestion? Please leave a comment&lt;/p&gt;
&lt;p&gt;Note: I’m still working on the &lt;em&gt;Download all (Source Last.fm Free Music and Soundcloud)&lt;/em&gt; version Soundcloud API issues so  for now the  &lt;em&gt;Download all&lt;/em&gt; version is working like the &lt;em&gt;exact&lt;/em&gt; version, but that is soon to change.&lt;/p&gt;]]&gt;</description><pubDate>Wed, 04 Feb 2015 00:00:00 GMT</pubDate></item><item><title>Cloud HQ</title><link>https://jamesst.one/posts/2014-05-25-cloud-hq/</link><guid isPermaLink="true">https://jamesst.one/posts/2014-05-25-cloud-hq/</guid><description>&lt;![CDATA[&lt;p&gt;Cloud HQ -  How I &lt;small&gt; (automatically) &lt;/small&gt; sync all my files across the web.&lt;/p&gt;
&lt;h1 id=&quot;what-it-is&quot;&gt;What it is&lt;/h1&gt;
&lt;p&gt;Simply - Cloud HQ is an online service that allows you to sync your files across multiple file storing services.&lt;/p&gt;
&lt;h1 id=&quot;supported-services&quot;&gt;Supported Services&lt;/h1&gt;
&lt;p&gt;&lt;img __ASTRO_IMAGE_=&quot;{&amp;#x22;src&amp;#x22;:&amp;#x22;../post_assets/cloudHQ-Manage-Services1.png&amp;#x22;,&amp;#x22;alt&amp;#x22;:&amp;#x22;Cloud HQ Supported Services&amp;#x22;,&amp;#x22;index&amp;#x22;:0}&quot;&gt;
Cloud HQ Supported Services as of 23/5/14&lt;/p&gt;
&lt;p&gt;Cloud HQ currently supports the following syncing services:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Google Drive&lt;/li&gt;
&lt;li&gt;Gmail&lt;/li&gt;
&lt;li&gt;Dropbox&lt;/li&gt;
&lt;li&gt;Box&lt;/li&gt;
&lt;li&gt;Evernote&lt;/li&gt;
&lt;li&gt;Onedrive&lt;/li&gt;
&lt;li&gt;Onedrive Pro&lt;/li&gt;
&lt;li&gt;Share Point&lt;/li&gt;
&lt;li&gt;WebDAV&lt;/li&gt;
&lt;li&gt;Basecamp Classic&lt;/li&gt;
&lt;li&gt;Basecamp&lt;/li&gt;
&lt;li&gt;Sugar Sync&lt;/li&gt;
&lt;li&gt;Egnyte&lt;/li&gt;
&lt;li&gt;Yandex Disk&lt;/li&gt;
&lt;li&gt;Microsoft Onenote (maybe soon)&lt;/li&gt;
&lt;li&gt;Salesforce (maybe soon)&lt;/li&gt;
&lt;/ul&gt;
&lt;h1 id=&quot;chrome-extension&quot;&gt;Chrome Extension&lt;/h1&gt;
&lt;p&gt;I was incredibly surprised by how helpful the &lt;a href=&quot;https://chrome.google.com/webstore/detail/sync-dropbox-evernote-and/iobcbdgacfkninlcbphihhdlkobkehia&quot;&gt;chrome extension&lt;/a&gt; is.&lt;/p&gt;
&lt;p&gt;The &lt;a href=&quot;https://chrome.google.com/webstore/detail/sync-dropbox-evernote-and/iobcbdgacfkninlcbphihhdlkobkehia&quot;&gt;extension &lt;/a&gt;not only  allows you to follow what files it has just synced, but in google drive  it also allows you to open a file from any of your connected services.&lt;/p&gt;
&lt;h1 id=&quot;referral-link&quot;&gt;Referral Link&lt;/h1&gt;
&lt;p&gt;If you are interested you can get an extended trial by using this link &lt;a href=&quot;https://cloudHQ.net?r=9u4p&quot;&gt;https://cloudHQ.net?r=9u4p&lt;/a&gt; -  plus you also get to help me!&lt;/p&gt;]]&gt;</description><pubDate>Sun, 25 May 2014 00:00:00 GMT</pubDate></item><item><title>My Fitbit channel for IFTTT</title><link>https://jamesst.one/posts/2014-02-09-fitbit-channel-ifttt/</link><guid isPermaLink="true">https://jamesst.one/posts/2014-02-09-fitbit-channel-ifttt/</guid><description>&lt;![CDATA[&lt;p&gt;UPDATE 21/5/14: IFTTT has just released an official &lt;a href=&quot;https://ifttt.com/fitbit&quot;&gt;fitbit channel&lt;/a&gt;. 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 :)&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;My Fitbit channel for &lt;a href=&quot;/posts/2013-11-05-ifttt&quot; title=&quot;Why you should use IFTTT?&quot;&gt;IFTTT&lt;/a&gt;is &lt;del&gt;being&lt;/del&gt; made - &lt;del&gt;sorry to get your hopes up :/ &lt;/del&gt; and i need some people to test it&lt;/p&gt;
&lt;h2 id=&quot;status&quot;&gt;Status&lt;/h2&gt;
&lt;p&gt;As we speak I’m currently coding a 3rd party IFTTT channel for Fitbit. It will work by pretending to be a wordpress blog. So unfortunately this channel would prevent the use of the WordPress channel I’m hoping to get the IFTTT channel out in&lt;del&gt; about a month &lt;/del&gt; a week or so ( but that depends on how much help I get :P  )  The first version will only have actions. A future version may be made that has triggers as well.&lt;/p&gt;
&lt;p&gt;However, as I don’t really have a use for that ( I don’t own a fitbit) it depends on if I get a fitbit - &lt;em&gt;please see below&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Speaking of which if you can donate/ find this project helpful or would like to increase your chance of getting triggers. Please help me buy a fitbit?&lt;/p&gt;
&lt;h2 id=&quot;how-you-can-help&quot;&gt;How you can help&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;I am after some alpha/beta testers for the fitbit channel Update: anyone interested please go &lt;a href=&quot;https://github.com/jamesmstone/OUTDATED-ifttt-fitbit&quot;&gt;here&lt;/a&gt; and leave a comment on the post with any feedback&lt;/li&gt;
&lt;li&gt;I’m curious about the legal requirements with holding medical/fitness data about individuals from all over the world. Obviously I wouldn’t keep the data for longer then I would be required to. So if you have an expertise in this area please contact me by leaving a comment.&lt;/li&gt;
&lt;li&gt;Buy me a fitbit. I don’t have the money for one - I’m just a &lt;a href=&quot;/posts/2013-11-04-im-blogging&quot; title=&quot;Why I blog? aka Welcome&quot;&gt;kid&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;want-to-keep-updated&quot;&gt;Want to keep updated?&lt;/h2&gt;]]&gt;</description><pubDate>Sun, 09 Feb 2014 00:00:00 GMT</pubDate></item><item><title>A New Design</title><link>https://jamesst.one/posts/2013-12-22-new-design/</link><guid isPermaLink="true">https://jamesst.one/posts/2013-12-22-new-design/</guid><description>&lt;![CDATA[&lt;p&gt;I did it! - I finally got round to designing my own version of the site.&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;Enjoy the new design.&lt;/p&gt;]]&gt;</description><pubDate>Sun, 22 Dec 2013 00:00:00 GMT</pubDate></item><item><title>The Best Blogs Ever</title><link>https://jamesst.one/posts/2013-12-16-best-blogs-ever/</link><guid isPermaLink="true">https://jamesst.one/posts/2013-12-16-best-blogs-ever/</guid><description>&lt;![CDATA[&lt;p&gt;Ok you got me these may not be &lt;em&gt;the best blogs ever&lt;/em&gt;, however these are the blogs I’m obsessed with and read every post of.&lt;/p&gt;
&lt;!--more--&gt;
&lt;p&gt;For all the websites, I have grouped them by category and added their &lt;a href=&quot;http://www.alexa.com/&quot;&gt;Alexa rank&lt;/a&gt; &lt;em&gt;(as of 26th Nov 13)&lt;/em&gt; along side the site.&lt;/p&gt;
&lt;h2 id=&quot;tech&quot;&gt;Tech&lt;/h2&gt;
&lt;h3 id=&quot;general&quot;&gt;General&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://www.lifehacker.com.au/&quot;&gt;Lifehacker AUS&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;Alexa Rank: 14,003&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.lifehacker.com&quot;&gt;Lifehacker USA&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;Alexa Rank: 504&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://blog.bufferapp.com/&quot;&gt;The Buffer Blog&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;Alexa Rank: 1,526&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://blog.ifttt.com/&quot;&gt;IFTTT Blog&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;Alexa Rank: 5,464&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://kinja.com/tag/how-i-work&quot;&gt;Kinja: How I Work&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;Alexa Rank, not relevant as this is a tag from &lt;a href=&quot;http://www.kinja.com/&quot;&gt;Kinja Blogs&lt;/a&gt; by Gawker&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;web-development&quot;&gt;Web development&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://tympanus.net/codrops/&quot;&gt;Codrops&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;Alexa Rank: 1,403 &lt;em&gt;Note: rank for the entire site &lt;a href=&quot;http://tympanus.net/&quot;&gt;tympanus.net&lt;/a&gt;&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://css-tricks.com/&quot;&gt;CSS Tricks&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;Alexa Rank: 1,051&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.smashingmagazine.com/&quot;&gt;Smashing Magazine&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;Alexa Rank: 944&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://davidwalsh.name/&quot;&gt;David Walsh&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;Alexa Rank: 4,526&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://lea.verou.me/&quot;&gt;Lea Verou&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;Alexa Rank: 54,903&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://webdesignerwall.com/&quot;&gt;Web Designer Wall&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;Alexa Rank: 7,992&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;web-inspiration&quot;&gt;Web inspiration&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://onepagemania.com/&quot;&gt;One Page Mania&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;Alexa Rank: 108,629&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.awwwards.com/&quot;&gt;Awwwards&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;Alexa Rank: 2,733&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;humour&quot;&gt;Humour&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://www.cracked.com/&quot;&gt;Cracked&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;Alexa Rank: 653&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.explosm.net/&quot;&gt;Explosm&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;Alexa Rank: 3,933&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://theoatmeal.com/&quot;&gt;The Oatmeal&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;Alexa Rank: 2739&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://xkcd.com/&quot;&gt;xkcd&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;Alexa Rank: 1,924&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://what-if.xkcd.com/&quot;&gt;What If xkcd&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Maybe your blog or site?&lt;/p&gt;
&lt;p&gt;What blogs / sites are you obsessed with?&lt;/p&gt;]]&gt;</description><pubDate>Mon, 16 Dec 2013 00:00:00 GMT</pubDate></item><item><title>The Ultimate Free Music Setup</title><link>https://jamesst.one/posts/2013-12-06-ifttt-music-system/</link><guid isPermaLink="true">https://jamesst.one/posts/2013-12-06-ifttt-music-system/</guid><description>&lt;![CDATA[&lt;p&gt;&lt;img __ASTRO_IMAGE_=&quot;{&amp;#x22;src&amp;#x22;:&amp;#x22;../post_assets/Ultimate-Music-Cover.png&amp;#x22;,&amp;#x22;alt&amp;#x22;:&amp;#x22;Ultimate Music Cover&amp;#x22;,&amp;#x22;index&amp;#x22;:0}&quot;&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: left;&quot;&gt;
  How to get the ultimate free music setup - &lt;em&gt;ok maybe it’s not the ultimate setup, but it’s still pretty cool&lt;/em&gt;
&lt;/p&gt;
&lt;p style=&quot;text-align: left;&quot;&gt;
  &lt;strong&gt;Features&lt;/strong&gt;: Continuous free, legal and unlimited, personally recommended songs that support the artist. - &lt;em&gt;sorry the ended up being a mouthfull&lt;/em&gt;
&lt;/p&gt;
&lt;!--more--&gt;
&lt;h2 id=&quot;the-system&quot;&gt;The System&lt;/h2&gt;
&lt;p&gt;&lt;img __ASTRO_IMAGE_=&quot;{&amp;#x22;src&amp;#x22;:&amp;#x22;../post_assets/Ultimate-Music-Diagram.png&amp;#x22;,&amp;#x22;alt&amp;#x22;:&amp;#x22;Ultimate Music Diagram&amp;#x22;,&amp;#x22;index&amp;#x22;:0}&quot;&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Get an account for each service / download the software
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://dropbox.com&quot;&gt;Dropbox&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.ifttt.com&quot;&gt;IFTTT&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.spotify.com/&quot;&gt;Spotify&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://tribe.nu/Blockify.html&quot;&gt;Blockify&lt;/a&gt; - windows only or potentially &lt;a href=&quot;http://smutefy.inacho.es&quot;&gt;Smutefy&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.last.fm&quot;&gt;Last Fm&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Link them all together
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://www.guidingtech.com/16755/enable-last-fm-spotify-windows-mobile/&quot;&gt;Spotify to Last.fm&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;open up Spotify preferences&lt;/li&gt;
&lt;li&gt;tick scrobble to Last.Fm and enter your Last.Fm details&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Last.fm to IFTTT to Dropbox
&lt;ul&gt;
&lt;li&gt;&lt;a class=&quot;embed_recipe embed_recipe-l_82&quot; id=&quot;embed_recipe-70959&quot; href=&quot;https://ifttt.com/view_embed_recipe/70959&quot; target=&quot;_blank&quot;&gt;&lt;img alt=&quot;IFTTT Recipe: save #free #music to #dropbox  based on your  #last.fm free music recommendations &quot; src=&quot;https://ifttt.com/recipe_embed_img/70959&quot; width=&quot;370px&quot;&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Dropbox to Blockify to Spotify
&lt;ul&gt;
&lt;li&gt;&lt;img __ASTRO_IMAGE_=&quot;{&amp;#x22;src&amp;#x22;:&amp;#x22;../post_assets/Blockify.png&amp;#x22;,&amp;#x22;alt&amp;#x22;:&amp;#x22;Blockify&amp;#x22;,&amp;#x22;index&amp;#x22;:0}&quot;&gt;&lt;/li&gt;
&lt;li&gt;Open up Blockify then choose your Dropbox music folder by going Options -&gt; Set Folder&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&quot;extra-points&quot;&gt; Extra points&lt;/h2&gt;
&lt;p&gt;Sync your new Dropbox music folder to your mobile device using an app like &lt;a href=&quot;https://play.google.com/store/apps/details?id=com.doublecore.musicdropnplay&quot; target=&quot;_blank&quot;&gt;MusicDropNPLay&lt;/a&gt; for Android or  &lt;a href=&quot;https://itunes.apple.com/us/app/tunebox-dropbox-music-player/id475688071&quot; target=&quot;_blank&quot;&gt;Tunebox&lt;/a&gt; for iOS.&lt;/p&gt;
&lt;h2 id=&quot;further-reading&quot;&gt;Further Reading&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;/posts/2013-11-06-ifttt-spotify-playlist-dropbox&quot; title=&quot;IFTTT: Spotify playlist to Dropbox&quot;&gt;Other IFTTT music recipes&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;/posts/2013-11-06-my-ifttt-recipes&quot; title=&quot;How I use IFTTT&quot;&gt;How else I use IFTTT&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://ifttt.com/p/jamesmstone&quot;&gt;My public IFTTT recipes&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;]]&gt;</description><pubDate>Fri, 06 Dec 2013 00:00:00 GMT</pubDate></item><item><title>Auto-capture phone thief</title><link>https://jamesst.one/posts/2013-11-25-automatically-take-photo-phone-thief-android/</link><guid isPermaLink="true">https://jamesst.one/posts/2013-11-25-automatically-take-photo-phone-thief-android/</guid><description>&lt;![CDATA[&lt;p&gt;&lt;a href=&quot;https://play.google.com/store/apps/details?id=com.bloketech.lockwatch&quot;&gt;Lockwatch Anti-Theft&lt;/a&gt; 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.&lt;/p&gt;
&lt;p&gt;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. If you type in the correct password, the alert will be cancelled and you will not receive an e-mail.&lt;/p&gt;
&lt;h2 id=&quot;extra-points&quot;&gt;Extra Points&lt;/h2&gt;
&lt;p&gt;&lt;a name=&quot;ExtraPoints&quot;&gt;&lt;/a&gt;
Want the photo to automatically be added to your dropbox. Using &lt;a title=&quot;Why you should use IFTTT?&quot; href=&quot;/posts/2013-11-05-ifttt/&quot;&gt;IFTTT&lt;/a&gt; you can.
If you follow the steps above and have the email address be a gmail one. You can use the IFTTT recipe below:
&lt;a class=&quot;embed_recipe embed_recipe-l_61&quot; id=&quot;embed_recipe-130299&quot; href=&quot;https://ifttt.com/view_embed_recipe/130299&quot; target=&quot;_blank&quot;&gt;&lt;img alt=&quot;IFTTT Recipe: Take a photo of a phone thief and add it to dropbox [Android]&quot; src=&quot;https://ifttt.com/recipe_embed_img/130299&quot; width=&quot;370px&quot;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&quot;other-ifttt-recipes&quot;&gt;Other IFTTT recipes&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;I recently made a post about how I use IFTTT -&lt;em&gt;&lt;a href=&quot;/posts/2013-11-06-my-ifttt-recipes&quot; title=&quot;How I use IFTTT&quot;&gt;interested&lt;/a&gt;?&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://ifttt.com/p/jamesmstone&quot;&gt;My Public IFTTT Profile&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;help&quot;&gt;Help&lt;/h2&gt;
&lt;p&gt;Need help? Have a suggestion? Please leave a comment&lt;/p&gt;]]&gt;</description><pubDate>Mon, 25 Nov 2013 00:00:00 GMT</pubDate></item><item><title>My Awesome Stuff List</title><link>https://jamesst.one/posts/2013-11-22-awesome-list/</link><guid isPermaLink="true">https://jamesst.one/posts/2013-11-22-awesome-list/</guid><description>&lt;![CDATA[&lt;p&gt;Not a bucket list - &lt;em&gt;just a lot like one&lt;/em&gt; :P&lt;/p&gt;
&lt;h2 id=&quot;adrenaline&quot;&gt;Adrenaline&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;bungee jump&lt;/li&gt;
&lt;li&gt;skydive&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;travel&quot;&gt;Travel&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Visit every continent
&lt;ul&gt;
&lt;li&gt;&lt;del&gt;Australiasia&lt;/del&gt;&lt;/li&gt;
&lt;li&gt;Africa&lt;/li&gt;
&lt;li&gt;&lt;del&gt;Asia&lt;/del&gt;&lt;/li&gt;
&lt;li&gt;&lt;del&gt;Europe&lt;/del&gt; - &lt;em&gt;fun fact: only continent without an “a” and every other has at least 2&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;North America&lt;/li&gt;
&lt;li&gt;South America&lt;/li&gt;
&lt;li&gt;Antartica&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Visit the 7 natural wonders of the world -&lt;em&gt;as decided be me :)&lt;/em&gt;
&lt;ul&gt;
&lt;li&gt;Grand Canyon&lt;/li&gt;
&lt;li&gt;&lt;del&gt;Great Barrier Reef&lt;/del&gt;&lt;/li&gt;
&lt;li&gt;Harbor of Rio de Janeiro&lt;/li&gt;
&lt;li&gt;visit Mount Everest base camp&lt;/li&gt;
&lt;li&gt;See the Aurora
&lt;ul&gt;
&lt;li&gt;Australis&lt;/li&gt;
&lt;li&gt;Borealis&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Victoria Falls&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Swim in every ocean
&lt;ul&gt;
&lt;li&gt;&lt;del&gt;Pacific&lt;/del&gt;&lt;/li&gt;
&lt;li&gt;&lt;del&gt;Indian&lt;/del&gt;&lt;/li&gt;
&lt;li&gt;Atlantic&lt;/li&gt;
&lt;li&gt;Southern&lt;/li&gt;
&lt;li&gt;Arctic&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;fitness&quot;&gt; Fitness&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Run a marathon&lt;/li&gt;
&lt;li&gt;Run a triathlon&lt;/li&gt;
&lt;li&gt;100 consecutive pushups&lt;/li&gt;
&lt;li&gt;200 consecutive situps&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt; &lt;/p&gt;
&lt;h2 id=&quot;cool-stuff-to-dream-of-mastering&quot;&gt;Cool stuff to &lt;del&gt;dream of &lt;/del&gt;master&lt;del&gt;ing&lt;/del&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Shuffling#Riffle&quot;&gt;Awesome shuffle card&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Walking hand stand&lt;/li&gt;
&lt;li&gt;Flip&lt;/li&gt;
&lt;li&gt;Song on guitar&lt;/li&gt;
&lt;li&gt;Solve a Rubix cube&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;other-items&quot;&gt;Other items&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Go without Internet for a month&lt;/li&gt;
&lt;li&gt;Go without a computer for a month&lt;/li&gt;
&lt;li&gt;Die with a smile on my face - yeah im odd&lt;/li&gt;
&lt;li&gt;Break a world record – suggestions?? what world record should I attempt?&lt;/li&gt;
&lt;/ul&gt;]]&gt;</description><pubDate>Fri, 22 Nov 2013 00:00:00 GMT</pubDate></item><item><title>Update: Spotify playlist to Dropbox</title><link>https://jamesst.one/posts/2013-11-11-update-spotify-playlist-dropbox/</link><guid isPermaLink="true">https://jamesst.one/posts/2013-11-11-update-spotify-playlist-dropbox/</guid><description>&lt;![CDATA[&lt;p&gt;How to update to the latest version of this IFTTT Recipe&lt;/p&gt;
&lt;h1 id=&quot;issue-resolved&quot;&gt;Issue Resolved:&lt;/h1&gt;
&lt;h2 id=&quot;steps-to-implement-fix&quot;&gt;Steps to implement fix:&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;In your IFTTT recipe change the URL field to &lt;code&gt;http://ifttt.jamesstone.com.au/?type=&amp;#x26;uri=&lt;/code&gt; making sure to change:&lt;/li&gt;
&lt;/ol&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;?type=&lt;/code&gt; to either &lt;code&gt;?type=full&lt;/code&gt; or &lt;code&gt;?type=exact&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;#x26;uri=&lt;/code&gt; to &lt;code&gt;&amp;#x26;uri=&lt;/code&gt; with your spotify playlist URI appended - example &lt;code&gt;http://ifttt.jamesstone.com.au/?type=full&amp;#x26;uri=spotify:user:spotify:playlist:4hOKQuZbraPDIfaGbM3lKI&lt;/code&gt; &lt;em&gt;(Top 100 songs on Spotify)&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;del&gt;This is a post detailing an issue with the &lt;a title=&quot;IFTTT: Spotify playlist to Dropbox&quot; href=&quot;/posts/2013-11-06-ifttt-spotify-playlist-dropbox&quot;&gt;Spotify playlist to Dropbox recipe&lt;/a&gt;&lt;/del&gt;&lt;/p&gt;
&lt;h1 id=&quot;issue&quot;&gt;&lt;del&gt;Issue&lt;/del&gt;&lt;/h1&gt;
&lt;p&gt;&lt;del&gt;The rss file that is generated by yahoo pipes takes to long to load and IFTTT often timesout.&lt;/del&gt;&lt;/p&gt;
&lt;h1 id=&quot;solution&quot;&gt;&lt;del&gt;Solution&lt;/del&gt;&lt;/h1&gt;
&lt;p&gt;&lt;del&gt;Slowly being developed.Provide a Cache for IFTTT so when IFTTT loads the  rss file it doses’t time out.&lt;/del&gt;&lt;/p&gt;
&lt;h1 id=&quot;how-you-can-help&quot;&gt;&lt;del&gt;How you can help&lt;/del&gt;&lt;/h1&gt;
&lt;ol&gt;
&lt;li&gt;&lt;del&gt;Keep me posted on any future bugs by leaving a comment&lt;/del&gt;&lt;/li&gt;
&lt;li&gt;&lt;del&gt;&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, sans-serif;&quot;&gt;If you know any PHP and are willing to help please leave a comment (I know almost none) &lt;/span&gt;&lt;/del&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;ul&gt;
&lt;li&gt;&lt;del&gt;I’m after some PHP code that for an rss file on request:&lt;/del&gt;
&lt;ul&gt;
&lt;li&gt;&lt;del&gt;Checks for previous cache of the file&lt;/del&gt;&lt;/li&gt;
&lt;li&gt;&lt;del&gt;If previous cache found:&lt;/del&gt;
&lt;ul&gt;
&lt;li&gt;&lt;del&gt;send current cached file ( would be slightly old)&lt;/del&gt;&lt;/li&gt;
&lt;li&gt;&lt;del&gt;then once sent “cached version”&lt;/del&gt;&lt;/li&gt;
&lt;li&gt;&lt;del&gt;get current rss version and update the cache&lt;/del&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;del&gt;If previous cache not found:&lt;/del&gt;
&lt;ul&gt;
&lt;li&gt;&lt;del&gt;get current rss cache&lt;/del&gt;&lt;/li&gt;
&lt;li&gt;&lt;del&gt;send current rss file&lt;/del&gt;&lt;/li&gt;
&lt;li&gt;&lt;del&gt;then once sent loads “live version” to cache&lt;/del&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h1 id=&quot;note&quot;&gt;&lt;del&gt;Note:&lt;/del&gt;&lt;/h1&gt;
&lt;p&gt;&lt;del&gt;The recipes still work, however they aren’t trigger as frequently as they should be.&lt;/del&gt;&lt;/p&gt;]]&gt;</description><pubDate>Mon, 11 Nov 2013 00:00:00 GMT</pubDate></item><item><title>Google celebrates your birthday</title><link>https://jamesst.one/posts/2013-11-08-google-celebrates-birthday/</link><guid isPermaLink="true">https://jamesst.one/posts/2013-11-08-google-celebrates-birthday/</guid><description>&lt;![CDATA[&lt;p&gt;&lt;img __ASTRO_IMAGE_=&quot;{&amp;#x22;src&amp;#x22;:&amp;#x22;../post_assets/Screenshot-2013-11-07-09.42.46.png&amp;#x22;,&amp;#x22;alt&amp;#x22;:&amp;#x22;Google Birthday&amp;#x22;,&amp;#x22;index&amp;#x22;:0}&quot;&gt;&lt;/p&gt;
&lt;p&gt;Thanks Google. What a cool personalised Google birthday doodle.&lt;/p&gt;
&lt;p&gt;After visiting Google’s homepage on my birthday I got a pleasant surprise. Google now celebrates your birthday with a doodle.&lt;br&gt;
To get a personalise Google Doodle on your birthday you have to be signed in and obviously it has to be your birthday.&lt;/p&gt;]]&gt;</description><pubDate>Fri, 08 Nov 2013 00:00:00 GMT</pubDate></item><item><title>Spotify playlist to Dropbox</title><link>https://jamesst.one/posts/2013-11-06-ifttt-spotify-playlist-dropbox/</link><guid isPermaLink="true">https://jamesst.one/posts/2013-11-06-ifttt-spotify-playlist-dropbox/</guid><description>&lt;![CDATA[&lt;p&gt;&lt;a href=&quot;/posts/2015-02-04-ifttt-spotify-playlist-dropbox-version-2&quot;&gt;New Version now available&lt;/a&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;This is a post about an IFTTT recipe I made. Not sure what &lt;a href=&quot;/posts/2013-11-05-ifttt&quot; title=&quot;Why you should use IFTTT?&quot;&gt;IFTTT is&lt;/a&gt;?&lt;/p&gt;
&lt;h2 id=&quot;what-this-recipe-does&quot;&gt;What this recipe does&lt;/h2&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;h2 id=&quot;recipes&quot;&gt;Recipes&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;What’s the difference?&lt;/strong&gt; &lt;em&gt;Download only exact matches&lt;/em&gt; only does steps 1 to 3 of *How it Works  *Below. As such it is very limiting (it only gets the exact song).&lt;/p&gt;
&lt;h3 id=&quot;download-only-exact-matches-source-lastfm-free-music&quot;&gt;Download only exact matches (source Last.fm Free Music)&lt;/h3&gt;
&lt;p&gt;Save to box&lt;br&gt;
&lt;a id=&quot;embed_recipe-126747&quot; class=&quot;embed_recipe embed_recipe-l_83&quot; href=&quot;https://ifttt.com/view_embed_recipe/126747&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://ifttt.com/recipe_embed_img/126747&quot; alt=&quot;IFTTT Recipe: auto #Download the new songs in a #Spotify playlist  to my #Box #free #music #Exact&quot; width=&quot;370px&quot;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Save to dropbox&lt;/p&gt;
&lt;p&gt;&lt;a id=&quot;embed_recipe-126750&quot; class=&quot;embed_recipe embed_recipe-l_87&quot; href=&quot;https://ifttt.com/view_embed_recipe/126750&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://ifttt.com/recipe_embed_img/126750&quot; alt=&quot;IFTTT Recipe: auto #Download the new songs in a #Spotify playlist  to my #Dropbox #free #music #Exact&quot; width=&quot;370px&quot;&gt;&lt;/a&gt;&lt;br&gt;
Save to google drive&lt;br&gt;
&lt;a id=&quot;embed_recipe-126748&quot; class=&quot;embed_recipe embed_recipe-l_91&quot; href=&quot;https://ifttt.com/view_embed_recipe/126748&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://ifttt.com/recipe_embed_img/126748&quot; alt=&quot;IFTTT Recipe: auto #Download the new songs in a #Spotify playlist  to my #googledrive #free #music #Exact&quot; width=&quot;370px&quot;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;save to skydrive&lt;/p&gt;
&lt;p&gt;&lt;a id=&quot;embed_recipe-126749&quot; class=&quot;embed_recipe embed_recipe-l_88&quot; href=&quot;https://ifttt.com/view_embed_recipe/126749&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://ifttt.com/recipe_embed_img/126749&quot; alt=&quot;IFTTT Recipe: auto #Download the new songs in a #Spotify playlist  to my #Skydrive #free #music #Exact&quot; width=&quot;370px&quot;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&quot;download-all-source-lastfm-free-music-and-soundcloud&quot;&gt;Download all (Source Last.fm Free Music and Soundcloud)&lt;/h3&gt;
&lt;p&gt;Save to box&lt;br&gt;
&lt;a id=&quot;embed_recipe-126754&quot; class=&quot;embed_recipe embed_recipe-l_81&quot; href=&quot;https://ifttt.com/view_embed_recipe/126754&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://ifttt.com/recipe_embed_img/126754&quot; alt=&quot;IFTTT Recipe: auto #Download the new songs in a #Spotify playlist  to my #Box #free #music #all&quot; width=&quot;370px&quot;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Save to dropbox&lt;/p&gt;
&lt;p&gt;&lt;a id=&quot;embed_recipe-126753&quot; class=&quot;embed_recipe embed_recipe-l_85&quot; href=&quot;https://ifttt.com/view_embed_recipe/126753&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://ifttt.com/recipe_embed_img/126753&quot; alt=&quot;IFTTT Recipe: auto #Download the new songs in a #Spotify playlist  to my #Dropbox #free #music #all&quot; width=&quot;370px&quot;&gt;&lt;/a&gt;&lt;br&gt;
Save to google drive&lt;br&gt;
&lt;a id=&quot;embed_recipe-126752&quot; class=&quot;embed_recipe embed_recipe-l_89&quot; href=&quot;https://ifttt.com/view_embed_recipe/126752&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://ifttt.com/recipe_embed_img/126752&quot; alt=&quot;IFTTT Recipe: auto #Download the new songs in a #Spotify playlist  to my #googledrive #free #music #all&quot; width=&quot;370px&quot;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;save to skydrive&lt;/p&gt;
&lt;p&gt;&lt;a id=&quot;embed_recipe-126751&quot; class=&quot;embed_recipe embed_recipe-l_86&quot; href=&quot;https://ifttt.com/view_embed_recipe/126751&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;https://ifttt.com/recipe_embed_img/126751&quot; alt=&quot;IFTTT Recipe: auto #Download the new songs in a #Spotify playlist  to my #Skydrive #free #music #all&quot; width=&quot;370px&quot;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&quot;set-up-instructions&quot;&gt;Set up Instructions&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;In Spotify right click on your playlist and select *Copy Spotify URI * then go to the desired recipe
&lt;ul&gt;
&lt;li&gt;&lt;img __ASTRO_IMAGE_=&quot;{&amp;#x22;src&amp;#x22;:&amp;#x22;../post_assets/Screenshot-2013-11-06-17.29.24.png&amp;#x22;,&amp;#x22;alt&amp;#x22;:&amp;#x22;How to Copy Spotify URI&amp;#x22;,&amp;#x22;index&amp;#x22;:0}&quot;&gt; How to Copy Spotify URI&lt;/li&gt;
&lt;li&gt;Then go to the desired recipe (&lt;em&gt;links above&lt;/em&gt;)&lt;/li&gt;
&lt;li&gt;In the URL field paste your *Spotify URI *after the &lt;code&gt;=&lt;/code&gt; sign ( or you can leave it as  &lt;em&gt;spotify:user:spotify:playlist:4hOKQuZbraPDIfaGbM3lKI&lt;/em&gt; for &lt;a href=&quot;spotify:user:spotify:playlist:4hOKQuZbraPDIfaGbM3lKI&quot;&gt;Top 100 tracks currently on Spotify&lt;/a&gt; playlist )&lt;/li&gt;
&lt;li&gt;&lt;img __ASTRO_IMAGE_=&quot;{&amp;#x22;src&amp;#x22;:&amp;#x22;../post_assets/Screenshot-2013-11-06-18.23.19.png&amp;#x22;,&amp;#x22;alt&amp;#x22;:&amp;#x22;Paste the Spotify URI after the \&amp;#x22;=\&amp;#x22; sign&amp;#x22;,&amp;#x22;index&amp;#x22;:0}&quot;&gt; Paste the Spotify URI after the &lt;code&gt;=&lt;/code&gt; sign&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&quot;how-it-works&quot;&gt;How it works&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Yahoo pipes checks your spotify playlist&lt;/li&gt;
&lt;li&gt;Then song by song it checks to see if the song is available legally for free from Last.fm&lt;/li&gt;
&lt;li&gt;If it is Yahoo Pipes tells IFTTT to add it to your dropbox or equivilent.&lt;/li&gt;
&lt;li&gt;If it isn’t Yahoo Pipes searches Soundcloud for the songs title and artist and then downloads the first &lt;em&gt;downloadable&lt;/em&gt; song. This is why remixed version are often downloaded.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&quot;update-issues&quot;&gt;&lt;del&gt;Update: Issues&lt;/del&gt;&lt;/h2&gt;
&lt;p&gt;&lt;del&gt;The recipes will still work, however the recipes aren’t triggered as frequently as they should be. [&lt;a title=&quot;Update: Spotify playlist to Dropbox&quot; href=&quot;/posts/2013-11-11-update-spotify-playlist-dropbox&quot;&gt;Details&lt;/a&gt;]&lt;/del&gt;&lt;/p&gt;
&lt;p&gt;Fixed [&lt;a href=&quot;/posts/2013-11-11-update-spotify-playlist-dropbox&quot; title=&quot;Update: Spotify playlist to Dropbox&quot;&gt;Details&lt;/a&gt;]&lt;/p&gt;
&lt;h2 id=&quot;other-ifttt-recipes&quot;&gt;Other IFTTT recipes&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;I recently made a post about how I use IFTTT -&lt;em&gt;&lt;a href=&quot;/posts/2013-11-06-my-ifttt-recipes&quot; title=&quot;How I use IFTTT&quot;&gt;interested&lt;/a&gt;?&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://ifttt.com/p/jamesmstone&quot; target=&quot;_blank&quot;&gt;My Public IFTTT Profile&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;help&quot;&gt;Help&lt;/h2&gt;
&lt;p&gt;Need help? Have a suggestion? Please leave a comment&lt;/p&gt;]]&gt;</description><pubDate>Wed, 06 Nov 2013 00:00:00 GMT</pubDate></item><item><title>How I use IFTTT</title><link>https://jamesst.one/posts/2013-11-06-my-ifttt-recipes/</link><guid isPermaLink="true">https://jamesst.one/posts/2013-11-06-my-ifttt-recipes/</guid><description>&lt;![CDATA[&lt;p&gt;After reading &lt;a href=&quot;http://aaronfrancis.com/&quot;&gt;Aaron Francis&lt;/a&gt;‘ blog &lt;a href=&quot;https://web.archive.org/web/20230323043904/https://aaronfrancis.com/2013/how-i-use-evernote-and-ifttt&quot;&gt;post&lt;/a&gt; about how he uses Evernote and IFTTT I felt inspired to make this post about how I use IFTTT.&lt;/p&gt;
&lt;p&gt;At present I have 22  IFTTT recipes. Here are some of my favourite.&lt;/p&gt;
&lt;h2 id=&quot;education-related-recipes&quot;&gt;Education related recipes&lt;/h2&gt;
&lt;p&gt;&lt;a class=&quot;embed_recipe embed_recipe-l_77&quot; id=&quot;embed_recipe-102035&quot; href=&quot;https://ifttt.com/view_embed_recipe/102035&quot; target=&quot;_blank&quot;&gt;&lt;img alt=&quot;IFTTT Recipe: Add a random #Wikipedia article to #Feedly every day to increase my knowledge&quot; src=&quot;https://ifttt.com/recipe_embed_img/102035&quot; width=&quot;370px&quot;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Lots of my school related recipes are:&lt;/p&gt;
&lt;p&gt;&lt;a class=&quot;embed_recipe embed_recipe-l_51&quot; id=&quot;embed_recipe-121707&quot; href=&quot;https://ifttt.com/view_embed_recipe/121707&quot; target=&quot;_blank&quot;&gt;&lt;img alt=&quot;IFTTT Recipe: Auto add #class notes to #Evernote. -- #school #uni&quot; src=&quot;https://ifttt.com/recipe_embed_img/121707&quot; width=&quot;370px&quot;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&quot;music-related&quot;&gt;Music Related&lt;/h2&gt;
&lt;p&gt;&lt;a class=&quot;embed_recipe embed_recipe-l_83&quot; id=&quot;embed_recipe-106702&quot; href=&quot;https://ifttt.com/view_embed_recipe/106702&quot; target=&quot;_blank&quot;&gt;&lt;img alt=&quot;IFTTT Recipe: Add #Free #Music to my #Dropbox  -- via #last.fm (but no need for a lastfm account)&quot; src=&quot;https://ifttt.com/recipe_embed_img/106702&quot; width=&quot;370px&quot;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a class=&quot;embed_recipe embed_recipe-l_94&quot; id=&quot;embed_recipe-15575&quot; href=&quot;https://ifttt.com/view_embed_recipe/15575&quot; target=&quot;_blank&quot;&gt;&lt;img alt=&quot;IFTTT Recipe: SoundCloud fav to Dropbox folder - MP3 download if available // #soundcloud #download #dropbox&quot; src=&quot;https://ifttt.com/recipe_embed_img/15575&quot; width=&quot;370px&quot;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&quot;sync-my-services&quot;&gt;Sync my Services&lt;/h2&gt;
&lt;p&gt;&lt;a class=&quot;embed_recipe embed_recipe-l_71&quot; id=&quot;embed_recipe-8981&quot; href=&quot;https://ifttt.com/view_embed_recipe/8981&quot; target=&quot;_blank&quot;&gt;&lt;img alt=&quot;IFTTT Recipe: When #Facebook profile picture changes, update #Twitter profile picture&quot; src=&quot;https://ifttt.com/recipe_embed_img/8981&quot; width=&quot;370px&quot;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&quot;auto-post&quot;&gt;Auto post&lt;/h2&gt;
&lt;p&gt;I try to keep my auto posting recipes to a minimum.  I do this, as I hate browsing through a social network and seeing posts that have obviously been &lt;em&gt;auto posted&lt;/em&gt;. Anyway here are my auto posting recipes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Update my Facebook Status “Happy New Year” every year on the 1st of Jan at midnight&lt;/li&gt;
&lt;li&gt;Update my Facebook Status “Merry Christmas” every year on the 25th of Dec at 11:22 am&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;public-recipes&quot;&gt;Public Recipes&lt;/h2&gt;
&lt;p&gt;You can view all my public recipes &lt;a href=&quot;https://ifttt.com/p/jamesmstone&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;How do you use IFTTT? What are your favourite IFTTT recipes?&lt;/p&gt;]]&gt;</description><pubDate>Wed, 06 Nov 2013 00:00:00 GMT</pubDate></item><item><title>Why you should use IFTTT?</title><link>https://jamesst.one/posts/2013-11-05-ifttt/</link><guid isPermaLink="true">https://jamesst.one/posts/2013-11-05-ifttt/</guid><description>&lt;![CDATA[&lt;p&gt;IFTTT is an amazing tool. It has made my life online so much easier- &lt;em&gt;are you sold?&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;So why should you use IFTTT.&lt;/p&gt;
&lt;h1 id=&quot;but-what-is-ifttt&quot;&gt;But what is IFTTT?&lt;/h1&gt;
&lt;p&gt;IFTTT is a service that lets you create powerful connections [between your online accounts] with one simple statement:
&lt;img __ASTRO_IMAGE_=&quot;{&amp;#x22;src&amp;#x22;:&amp;#x22;../post_assets/ifthisthenthat_big_df311ed95c86c462c5bf2f50ac9405e.png&amp;#x22;,&amp;#x22;alt&amp;#x22;:&amp;#x22;If This Then That&amp;#x22;,&amp;#x22;index&amp;#x22;:0}&quot;&gt; If This Then That (Image Via: &lt;a href=&quot;http://ifttt.com/wtf&quot;&gt;IFTTT&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;So basically, IFTTT allows you to connect your online services via their &lt;a href=&quot;http://en.wikipedia.org/wiki/Application_programming_interface&quot;&gt;API&lt;/a&gt;‘s. These connections are called &lt;em&gt;recipes&lt;/em&gt;  which are made from the phrase IF &lt;strong&gt;THIS&lt;/strong&gt; THEN &lt;strong&gt;THAT.&lt;/strong&gt;&lt;/p&gt;
&lt;h2 id=&quot;still-dont-get-it&quot;&gt;Still don’t get it?&lt;/h2&gt;
&lt;p&gt;Sorry that’s my fault. It’s a hard concept to explain. I think an example will help.&lt;/p&gt;
&lt;p&gt;IFTTT allows you to:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class=&quot;embed_recipe embed_recipe-l_33&quot; id=&quot;embed_recipe-24908&quot; href=&quot;https://ifttt.com/view_embed_recipe/24908&quot; target=&quot;_blank&quot;&gt;&lt;img alt=&quot;IFTTT Recipe: Text me the weather every morning&quot; src=&quot;https://ifttt.com/recipe_embed_img/24908&quot; width=&quot;370px&quot;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class=&quot;embed_recipe embed_recipe-l_71&quot; id=&quot;embed_recipe-8981&quot; href=&quot;https://ifttt.com/view_embed_recipe/8981&quot; target=&quot;_blank&quot;&gt;&lt;img alt=&quot;IFTTT Recipe: When #Facebook profile picture changes, update #Twitter profile picture&quot; src=&quot;https://ifttt.com/recipe_embed_img/8981&quot; width=&quot;370px&quot;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class=&quot;embed_recipe embed_recipe-l_42&quot; id=&quot;embed_recipe-102384&quot; href=&quot;https://ifttt.com/view_embed_recipe/102384&quot; target=&quot;_blank&quot;&gt;&lt;img alt=&quot;IFTTT Recipe: Backup my contacts to a Google Spreadsheet&quot; src=&quot;https://ifttt.com/recipe_embed_img/102384&quot; width=&quot;370px&quot;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a class=&quot;embed_recipe embed_recipe-l_29&quot; id=&quot;embed_recipe-103371&quot; href=&quot;https://ifttt.com/view_embed_recipe/103371&quot; target=&quot;_blank&quot;&gt;&lt;img alt=&quot;IFTTT Recipe: Email me my new iPhone photos&quot; src=&quot;https://ifttt.com/recipe_embed_img/103371&quot; width=&quot;370px&quot;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;There are an infinite number of &lt;a title=&quot;IFTTT recipes&quot; href=&quot;https://ifttt.com/recipes&quot; target=&quot;_blank&quot;&gt;possibilities&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;UPDATE:&lt;/strong&gt; I have since made a post about how I use IFTTT. That post can be found &lt;a href=&quot;/posts/2013-11-06-my-ifttt-recipes/&quot; title=&quot;How I use IFTTT&quot;&gt;here&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The Services IFTTT support are called channels. Currently there are &lt;a href=&quot;https://ifttt.com/channels&quot;&gt;72 channels&lt;/a&gt; with more regularly being added. To view them all you can click &lt;a href=&quot;https://ifttt.com/channels&quot;&gt;here&lt;/a&gt;&lt;/p&gt;
&lt;h1 id=&quot;so-why-use-ifttt&quot;&gt;So why use IFTTT&lt;/h1&gt;
&lt;p&gt;Pretty simply - It will make your life easier.&lt;/p&gt;]]&gt;</description><pubDate>Tue, 05 Nov 2013 00:00:00 GMT</pubDate></item><item><title>Why I blog? aka Welcome</title><link>https://jamesst.one/posts/2013-11-04-im-blogging/</link><guid isPermaLink="true">https://jamesst.one/posts/2013-11-04-im-blogging/</guid><description>&lt;![CDATA[&lt;p&gt;Welcome to my Blog :)&lt;/p&gt;
&lt;h1 id=&quot;a-little-about-me&quot;&gt;A little about me&lt;/h1&gt;
&lt;p&gt;Name: James Stone&lt;br&gt;
Age: 17&lt;br&gt;
Job: Student&lt;br&gt;
Location: Australia&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;I wasn’t really sure what my first post, &lt;em&gt;my intro post&lt;/em&gt;, should talk about. So I have decided to mention why I’m blogging.&lt;/p&gt;
&lt;p&gt;I have decided to start blogging for a few reasons but I guess the main reason is my online presence.&lt;/p&gt;
&lt;h1 id=&quot;online-presence&quot;&gt;Online Presence&lt;/h1&gt;
&lt;p&gt;Growing up the number of times I have heard the media, school, speakers etc talk about our &lt;em&gt;online image&lt;/em&gt;. Particularly about stories where people have lost jobs or failed to get them over their poor digital image. And like most kids my age I’m sick of hearing their message about why we shouldn’t post anything stupid online as it stays “&lt;em&gt;forever”&lt;/em&gt;. I disagree with this message. I think they should instead be teaching us how to market ourselves online, to create the best possible digital image.&lt;/p&gt;
&lt;p&gt;I think their message is scaring us from contributing to the public web (at least its scaring me!). However I also think that rather than not posting anything online and having a neutral online presence it’s important to have a positive one. So I have decided to take their advice one step further. Rather than not being stupid online, I will try and standout by having a strong positive online presence, that can be used to market myself.&lt;/p&gt;
&lt;h1 id=&quot;future-job&quot;&gt;Future Job?&lt;/h1&gt;
&lt;p&gt;Another key reason why I’m going to blog is for a future job.&lt;/p&gt;
&lt;p&gt;At the moment I’m not really sure what job I would like to have. However, I’m leaning towards a career in IT likely one that involves web development. As such I’ve noticed many blogs and portfolio sites of those in the industry where they display all their works. So I’m also planning on using this as a blog as a place to showcase my creations.&lt;/p&gt;
&lt;h1 id=&quot;credit-where-its-due&quot;&gt;Credit where its due&lt;/h1&gt;
&lt;p&gt;As this is the opening post on this blog, I think it’s important to give credit to the blogs current design. The theme, &lt;a href=&quot;https://scotthsmith.com/projects/decode-archive/&quot;&gt;Decode&lt;/a&gt;, is created by &lt;a href=&quot;http://scotthsmith.com/&quot;&gt;Scott Smith&lt;/a&gt;. (Edit: 16th Mar 2017, this isn’t actively maintained in the same compacity) However, I’m keen to create my own theme – &lt;em&gt;I just haven’t had the chance yet&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;I hope you enjoy reading this blog as much as I have so far enjoyed creating it&lt;/p&gt;
&lt;p&gt;&lt;em&gt;James&lt;/em&gt;&lt;/p&gt;]]&gt;</description><pubDate>Mon, 04 Nov 2013 00:00:00 GMT</pubDate></item></channel></rss>