<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:media="http://search.yahoo.com/mrss/"><channel><title><![CDATA[Fuzzbizz]]></title><description><![CDATA[Stuff that future-me might need]]></description><link>https://robertlawson.net/</link><image><url>https://robertlawson.net/favicon.png</url><title>Fuzzbizz</title><link>https://robertlawson.net/</link></image><generator>Ghost 3.37</generator><lastBuildDate>Fri, 17 Apr 2026 18:03:38 GMT</lastBuildDate><atom:link href="https://robertlawson.net/rss/" rel="self" type="application/rss+xml"/><ttl>60</ttl><item><title><![CDATA[How to get postgrest, postgis, and maplibre to cooperate and use geojson]]></title><description><![CDATA[<p>Postgrest has a really snazzy feature where you can set the <code>'Accept: application/geo+json'</code> header to get your results as geojson instead of simple rows. </p><p>And Maplibre has a handy function where you can pass in a request transformer to alter all your requests to a source, like this:</p>]]></description><link>https://robertlawson.net/how-to-get-postgrest-postgis-and-maplibre-to-cooperate/</link><guid isPermaLink="false">66584e6b0d072f04fedd226a</guid><dc:creator><![CDATA[Robert]]></dc:creator><pubDate>Thu, 30 May 2024 11:34:28 GMT</pubDate><content:encoded><![CDATA[<p>Postgrest has a really snazzy feature where you can set the <code>'Accept: application/geo+json'</code> header to get your results as geojson instead of simple rows. </p><p>And Maplibre has a handy function where you can pass in a request transformer to alter all your requests to a source, like this:</p><pre><code>function customRequestTransformer(url: string): RequestParameters {     
    const params = {
      url: url,
      headers: {
        Authorization: `Bearer ${user.access_token}`,
        Accept: 'application/geo+json',
      },
    }
    return params;
  }



&lt;Map
	....
	transformRequest={customRequestTransformer}
&gt;
</code></pre><p>But if you do that, you'll see that your Authorization header is added, BUT your Accept one is not. Arrgg!<br></p><p>Annnnd I wrote the below while I was trying to find a fix, but instead I just wrote the fix and pushed it upstream at <a href="https://github.com/maplibre/maplibre-gl-js/pull/4210">https://github.com/maplibre/maplibre-gl-js/pull/4210</a> . Enjoy! The next release of Maplibre-gl-js will work properly with Postgrest now.</p><p>Open source is great.</p><p></p><p>(Below, if anyone is curious) </p><p><br>The culprit is here: https://github.com/maplibre/maplibre-gl-js/blob/68569cf22655c53bc474504bf07893709723f7d6/src/util/ajax.ts#L154</p><pre><code>    if (requestParameters.type === 'json') {
        request.headers.set('Accept', 'application/json');
    }</code></pre><p>and then, here</p><p><a href="https://github.com/maplibre/maplibre-gl-js/blob/68569cf22655c53bc474504bf07893709723f7d6/src/util/ajax.ts#L255">https://github.com/maplibre/maplibre-gl-js/blob/68569cf22655c53bc474504bf07893709723f7d6/src/util/ajax.ts#L255</a><br></p><pre><code>export const getJSON = &lt;T&gt;(requestParameters: RequestParameters, abortController: AbortController): Promise&lt;{data: T} &amp; ExpiryData&gt; =&gt; {
    return makeRequest(extend(requestParameters, {type: 'json'}), abortController);
};</code></pre><p>and finally, here: <a href="https://github.com/maplibre/maplibre-gl-js/blob/68569cf22655c53bc474504bf07893709723f7d6/src/source/geojson_worker_source.ts#L220">https://github.com/maplibre/maplibre-gl-js/blob/68569cf22655c53bc474504bf07893709723f7d6/src/source/geojson_worker_source.ts#L220</a></p><pre><code>async loadGeoJSON(params: LoadGeoJSONParameters, abortController: AbortController): Promise&lt;GeoJSON.GeoJSON&gt; {
        const {promoteId} = params;
        if (params.request) {
            const response = await getJSON&lt;GeoJSON.GeoJSON&gt;(params.request, abortController);</code></pre><p>So loadGeoJSON calls getJSON, which always sets <code>type: 'json</code>', which means our final request nukes whatever request headers we had set.</p><p></p>]]></content:encoded></item><item><title><![CDATA[Ubuntu won't connect to public wifi on German trains (and elsewhere)]]></title><description><![CDATA[<p>I actually saw this on Stackoverflow but can't find the original post, and it looks like <a href="https://dev.to/ingosteinke/comment/21075">https://dev.to/ingosteinke/comment/21075</a> is addressing this too. But like the page says, this website is mostly for me to put stuff I need in the future!</p><p>When I can connect to</p>]]></description><link>https://robertlawson.net/ubuntu-wont-connect-to-public-wifi-on-german-trains-and-elsewhere/</link><guid isPermaLink="false">65d0e5320d072f04fedd2249</guid><dc:creator><![CDATA[Robert]]></dc:creator><pubDate>Sat, 17 Feb 2024 17:04:08 GMT</pubDate><content:encoded><![CDATA[<p>I actually saw this on Stackoverflow but can't find the original post, and it looks like <a href="https://dev.to/ingosteinke/comment/21075">https://dev.to/ingosteinke/comment/21075</a> is addressing this too. But like the page says, this website is mostly for me to put stuff I need in the future!</p><p>When I can connect to public wifi with a captive portal on my phone, but not my laptop, this works:</p><p><code>route -n</code> you should get something like this<br>```bash<br>Destination     Gateway         Genmask         Flags Metric Ref    Use Iface<br>0.0.0.0         172.18.0.1      0.0.0.0         UG    600    0        0 wlp170s0<br>169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 wlp170s0<br>172.17.0.0      0.0.0.0         255.255.0.0     U     0      0        0 docker0<br>172.18.0.0      0.0.0.0         255.255.0.0     U     0      0        0 br-16fba42e0cd7<br>172.18.0.0      0.0.0.0         255.255.0.0     U     600    0        0 wlp170s0<br>172.19.0.0      0.0.0.0         255.255.0.0     U     0      0        0 br-27df09be2d4a<br>```</p><p></p><p>Note the Gateway at 172.18.0.x and the bridge at 172.18.0.0. You need to delete that bridge. </p><p><code>sudo ifconfig  br-16fba42e0cd7 down</code></p><p><code>sudo brctl delbr br-16fba42e0cd7</code></p><p>should do the trick! </p>]]></content:encoded></item><item><title><![CDATA[Rotharroads - the unappreciated bike roads all over rural Ireland]]></title><description><![CDATA[<p>I made a video about rotharroads - which aren't exactly bike infrastructure but can be surprisingly nice to ride on! They're all over rural Ireland <a href="https://youtu.be/6Ba7xHUdeew">https://youtu.be/6Ba7xHUdeew</a></p>]]></description><link>https://robertlawson.net/rotharroads-the-unappreciated-bike-roads-all-over-rural-ireland/</link><guid isPermaLink="false">653eaab50d072f04fedd223d</guid><dc:creator><![CDATA[Robert]]></dc:creator><pubDate>Sun, 29 Oct 2023 18:57:17 GMT</pubDate><content:encoded><![CDATA[<p>I made a video about rotharroads - which aren't exactly bike infrastructure but can be surprisingly nice to ride on! They're all over rural Ireland <a href="https://youtu.be/6Ba7xHUdeew">https://youtu.be/6Ba7xHUdeew</a></p>]]></content:encoded></item><item><title><![CDATA[Stuff I've made]]></title><description><![CDATA[<p>If you're here, maybe it's because you have my email address and were curious. </p><p>I've made a few side projects:</p><p><a href="https://www.gaffologist.com/">www.gaffologist.com</a> for finding houses near transport, bike infra, and schools of your preferred ethos (<a href="https://www.educatetogether.ie/">www.educatetogether.ie</a> in my case!)</p><p><a href="https://calrobert.github.io/">joinedupthinking.ie</a> - just a quick hack to</p>]]></description><link>https://robertlawson.net/stuff-ive-made-2/</link><guid isPermaLink="false">62aaeb970d072f04fedd2227</guid><dc:creator><![CDATA[Robert]]></dc:creator><pubDate>Wed, 07 Sep 2022 17:40:00 GMT</pubDate><content:encoded><![CDATA[<p>If you're here, maybe it's because you have my email address and were curious. </p><p>I've made a few side projects:</p><p><a href="https://www.gaffologist.com/">www.gaffologist.com</a> for finding houses near transport, bike infra, and schools of your preferred ethos (<a href="https://www.educatetogether.ie/">www.educatetogether.ie</a> in my case!)</p><p><a href="https://calrobert.github.io/">joinedupthinking.ie</a> - just a quick hack to get some proposed bike and walking infra on the same map as existing infra (this should be something the government does already....) . It's open source! Feel free to make a PR to <a href="https://github.com/CalRobert/calrobert.github.io/">github.com/CalRobert/calrobert.github.io/</a></p><p> And I don't have much about it online but I have a 200 year old thatched cottage and have done some lime plastering, a little thatch repair, rewilding, etc. if you want to talk about that! It's a 15 minute bike ride from the train, near greenways, near an Educate Together scool, and has gigabit fibre broadband. It was under €100k, even in 2019. It's the house I built Gaffologist to find!</p>]]></content:encoded></item></channel></rss>