Răsfoiți Sursa

Rebuild site with hugo 0.88.0

Thomas Dy 3 ani în urmă
părinte
comite
ff7982bf81

+ 5 - 5
nix/pinned-nixpkgs.nix

@@ -1,5 +1,5 @@
-builtins.fetchTarball {
-  # has hugo 0.69.2
-  url = "https://releases.nixos.org/nixpkgs/nixpkgs-20.09pre224406.5f14d99efed/nixexprs.tar.xz";
-  sha256 = "1nx9b0nqhn8gk7jsw8z5cq3gid8h8lpcmmr2q0cmi98xg1jsq0nd";
-}
+import (builtins.fetchTarball {
+  # has hugo 0.88.0
+  url = "https://releases.nixos.org/nixpkgs/nixpkgs-21.11pre313955.b72ad04a8a3/nixexprs.tar.xz";
+  sha256 = "0wkzgcjpm39p5fqqsr1j3fg5id81yrnw884fgl5fd63dahn6m6sb";
+})

+ 7 - 7
output/index.html

@@ -2,7 +2,7 @@
 <html lang="en-us">
 <head>
 	<meta charset="utf-8">
-	<meta name="generator" content="Hugo 0.69.2" />
+	<meta name="generator" content="Hugo 0.88.0" />
 	<meta name="viewport" content="width=device-width, initial-scale=1">
 	<link rel="stylesheet" href="/assets/css/theme.css">
 	<link rel="alternate" href="/rss.xml" type="application/rss+xml" title="Pleasant Programmer">
@@ -173,7 +173,7 @@ to get my bluetooth mouse connected on Linux. The main thing I used then was
 <code>bluetoothctl</code> which is essentially a CLI for managing bluetooth devices so I
 started there.</p>
 <p>I started up <code>bluetoothctl</code> and turned on the Prep Pad. And it showed up!</p>
-<div class="highlight"><pre style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-text" data-lang="text">[bluetooth]# power on
+<div class="highlight"><pre tabindex="0" style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-text" data-lang="text">[bluetooth]# power on
 [CHG] Controller ... Class: 0x00010c
 Changing power on succeeded
 [CHG] Controller ... Powered: yes
@@ -183,7 +183,7 @@ Discovery started
 [CHG] Device 1C:BA:8C:21:7C:BB Name: CHSLEEV_00
 [CHG] Device 1C:BA:8C:21:7C:BB Alias: CHSLEEV_00
 </code></pre></div><p>I then connected to it, which was surprisingly easy.</p>
-<div class="highlight"><pre style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-text" data-lang="text">[bluetooth]# connect 1C:BA:8C:21:7C:BB
+<div class="highlight"><pre tabindex="0" style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-text" data-lang="text">[bluetooth]# connect 1C:BA:8C:21:7C:BB
 Attempting to connect to 1C:BA:8C:21:7C:BB
 [CHG] Device 1C:BA:8C:21:7C:BB Connected: yes
 [CHG] Device 1C:BA:8C:21:7C:BB Name: CH BTScale_00
@@ -195,7 +195,7 @@ those things were at that point.</p>
 <p>After a lot of poking around, I could check the general device information. You
 could get the hardware, software and firmware version. There&rsquo;s also the device
 serial number which was nowhere on the actual physical device.</p>
-<div class="highlight"><pre style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-text" data-lang="text">[CHSLEEV_00]# select-attribute /org/bluez/hci0/dev_1C_BA_8C_21_7C_BB/service0010/char0017
+<div class="highlight"><pre tabindex="0" style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-text" data-lang="text">[CHSLEEV_00]# select-attribute /org/bluez/hci0/dev_1C_BA_8C_21_7C_BB/service0010/char0017
 [CH BTScale_00:/service0010/char0017]# attribute-info
 Characteristic - Firmware Revision String
 	UUID: 00002a26-0000-1000-8000-00805f9b34fb
@@ -220,7 +220,7 @@ Attempting to read /org/bluez/hci0/dev_1C_BA_8C_21_7C_BB/service0010/char0017
 </code></pre></div><p>There was also a service which contained Accel Enable, Accel Range, Accel
 X-Coordinate, Accel Y-Coordinate, and Accel Z-Coordinate. I guess it stands for
 accelerometer, which is probably what it uses to weigh things.</p>
-<div class="highlight"><pre style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-text" data-lang="text">[CHSLEEV_00]# select-attribute /org/bluez/hci0/dev_1C_BA_8C_21_7C_BB/service0023/char0024/desc0026
+<div class="highlight"><pre tabindex="0" style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-text" data-lang="text">[CHSLEEV_00]# select-attribute /org/bluez/hci0/dev_1C_BA_8C_21_7C_BB/service0023/char0024/desc0026
 [CH BTScale_00:/service0023/char0024/desc0026]# read
 Attempting to read /org/bluez/hci0/dev_1C_BA_8C_21_7C_BB/service0023/char0024/desc0026
 [CHG] Attribute /org/bluez/hci0/dev_1C_BA_8C_21_7C_BB/service0023/char0024/desc0026 Value: 0x41
@@ -241,7 +241,7 @@ denied. I could however, notify on them. But that didn&rsquo;t yield anything as
 What I <em>could</em> read was Accel Enable, which was set to 00. I guess that means it
 was off. After writing 01 to Accel Enable, I found I could get values out of
 Accel X-Coordinate! Also, the green LED which was permanently on turned off.</p>
-<div class="highlight"><pre style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-text" data-lang="text">[CHSLEEV_00]# select-attribute /org/bluez/hci0/dev_1C_BA_8C_21_7C_BB/service0023/char0024
+<div class="highlight"><pre tabindex="0" style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-text" data-lang="text">[CHSLEEV_00]# select-attribute /org/bluez/hci0/dev_1C_BA_8C_21_7C_BB/service0023/char0024
 [CH BTScale_00:/service0023/char0024]# write 01
 Attempting to write /org/bluez/hci0/dev_1C_BA_8C_21_7C_BB/service0023/char0024
 [CH BTScale_00:/service0023/char0024]# select-attribute /org/bluez/hci0/dev_1C_BA_8C_21_7C_BB/service0023/char002a
@@ -299,7 +299,7 @@ are good, I might not even need to finish it.</p>
 <p>By default, we use UTF-8 for text storage and rendering. A problem is that browsers don&rsquo;t assume UTF-8 as the default and you need to have either a <code>&lt;meta charset=&quot;utf-8&quot; /&gt;</code> in the HTML or <code>Content-Type: text/html; charset=utf-8</code> in the headers. A few of our services don&rsquo;t set the <code>Content-Type</code> with the <code>charset=utf-8</code> part so you&rsquo;d get piñata instead of piñata.</p>
 <p>Being lazy, we usually just correct this at the reverse proxy side. It&rsquo;s trivial to do in nginx. You just need to add <code>charset utf-8;</code> to your configuration and you&rsquo;re good. For haproxy though, I couldn&rsquo;t readily find a solution for it and had to go through the docs to see what I could do.</p>
 <p>After a bit of experimenting, I had success with this:</p>
-<div class="highlight"><pre style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-text" data-lang="text"># set content-type to utf-8 if not already
+<div class="highlight"><pre tabindex="0" style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-text" data-lang="text"># set content-type to utf-8 if not already
 acl has_charset hdr_sub(content-type) -i charset=
 rspirep (Content-Type.*) \1;\ charset=utf-8 unless has_charset
 </code></pre></div><p>This is probably not the best way to do it. Arguably, we should just fix our services to have the correct <code>Content-Type</code> in the first place, but I can do that some other time.</p>

+ 12 - 12
output/page/2.html

@@ -2,7 +2,7 @@
 <html lang="en-us">
 <head>
 	<meta charset="utf-8">
-	<meta name="generator" content="Hugo 0.69.2" />
+	<meta name="generator" content="Hugo 0.88.0" />
 	<meta name="viewport" content="width=device-width, initial-scale=1">
 	<link rel="stylesheet" href="/assets/css/theme.css">
 	<link rel="alternate" href="/rss.xml" type="application/rss+xml" title="Pleasant Programmer">
@@ -49,7 +49,7 @@
 <p>A few months after we started beta testing the app, Cloudflare added more IPs to their range. Unfortunately, our server got moved to those new IPs which were not whitelisted yet. Apparently, the telco whitelisting process was incredibly convoluted and time consuming. Our client didn&rsquo;t want to bother asking them to whitelist more IPs. We also tried asking Cloudflare to move us back to the original IP range, but they could only do that if we were in their enterprise tier. We couldn&rsquo;t really afford that, so we looked for other options.</p>
 <p>Since Cloudflare was essentially just a giant reverse proxy, theoretically there should be no distinction between one IP address from another. The specific IP we get is probably just for load balancing. So we tried accessing the IPs in the range directly and just setting the Host header and it worked! But we get SSL errors because the IP itself doesn&rsquo;t have its own certificate.</p>
 <p>After more testing, we figured out that you could actually use any Cloudflare backed domain so long as we properly set the Host header. We just needed to find one still in the old range. Coincidentally, 4chan.org was. Which led to this wonderful commit</p>
-<div class="highlight"><pre style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-diff" data-lang="diff">commit 123456789abcdef
+<div class="highlight"><pre tabindex="0" style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-diff" data-lang="diff">commit 123456789abcdef
 Author: ~~~~~~
 Date:   ~~~~~~
 
@@ -100,15 +100,15 @@ Date:   ~~~~~~
 <p>To support TiddlyWiki5, we&rsquo;ll need a version of the wiki which has the TiddlyWeb plugin already installed and configured. After that, some tweaking is necessary to get TiddlyWeb to provide what the wiki requires.</p>
 <h2 id="setting-up-tiddlywiki">Setting Up TiddlyWiki</h2>
 <p>TiddlyWiki5 provides a command line tool via <code>npm</code> that allows building custom versions of the wiki. In fact, it comes with templates, called &ldquo;editions&rdquo;, that we can use for our setup. Assuming you already have it installed, create the wiki using</p>
-<div class="highlight"><pre style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-sh" data-lang="sh">tiddlywiki mywiki --init tw5tank          <span style="color:#007f7f"># create wiki from template</span>
+<div class="highlight"><pre tabindex="0" style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-sh" data-lang="sh">tiddlywiki mywiki --init tw5tank          <span style="color:#007f7f"># create wiki from template</span>
 </code></pre></div><p>This creates a wiki intended for use with <a href="https://tank.peermore.com/">Tank</a>, which is built on top of TiddlyWeb. From here, you should look in <code>mywiki/tiddlers/system</code> which contain the entries for <code>SiteTitle</code>, <code>SiteSubtitle</code>, <code>DefaultTiddlers</code>, and <code>tiddlyweb-host</code>. The first 3 should be configured however you want. These are necessary because they&rsquo;re needed before the wiki can load them from the server. <code>tiddlyweb-host</code> contains the location of the TiddlyWeb server, this should be <code>http://localhost:8080/</code> if you&rsquo;re just testing locally. With everything configured, you can build the new wiki by running</p>
-<div class="highlight"><pre style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-sh" data-lang="sh">tiddlywiki mywiki --build
+<div class="highlight"><pre tabindex="0" style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-sh" data-lang="sh">tiddlywiki mywiki --build
 </code></pre></div><p>This will output the wiki to <code>mywiki/output/tw5tank.html</code>. You can now serve it using your favorite local webserver, like <code>python -m http.server</code>.</p>
 <h2 id="setting-up-tiddlyweb">Setting Up TiddlyWeb</h2>
 <p>The TiddlyWeb tutorial recommends using <code>tiddlywebwiki</code> which has all the plugins setup for a nice wiki instance for the old TiddlyWiki. It has a lot of features that aren&rsquo;t really needed, so we won&rsquo;t go with that. So first, we&rsquo;ll need to install TiddlyWeb and any plugins we might want to use.</p>
-<div class="highlight"><pre style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-sh" data-lang="sh">pip install tiddlyweb tiddlywebplugins.status tiddlywebplugins.cherrypy tiddlywebplugins.cors
+<div class="highlight"><pre tabindex="0" style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-sh" data-lang="sh">pip install tiddlyweb tiddlywebplugins.status tiddlywebplugins.cherrypy tiddlywebplugins.cors
 </code></pre></div><p>Next, we&rsquo;ll need the tiddlyweb configuration in <code>tiddlywebconfig.py</code></p>
-<div class="highlight"><pre style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-python" data-lang="python"><span style="color:#007f7f"># A basic configuration.</span>
+<div class="highlight"><pre tabindex="0" style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-python" data-lang="python"><span style="color:#007f7f"># A basic configuration.</span>
 <span style="color:#007f7f"># `pydoc tiddlyweb.config` for details on configuration items.</span>
 
 <span style="color:#fff;font-weight:bold">import</span> tiddlywebplugins.status
@@ -117,7 +117,7 @@ config = {
     <span style="color:#0ff;font-weight:bold">&#39;system_plugins&#39;</span>: [<span style="color:#0ff;font-weight:bold">&#39;tiddlywebplugins.status&#39;</span>, <span style="color:#0ff;font-weight:bold">&#39;tiddlywebplugins.cors&#39;</span>],
     <span style="color:#0ff;font-weight:bold">&#39;secret&#39;</span>: <span style="color:#0ff;font-weight:bold">&#39;36c98d6d14618c79f0ed2d49cd1b9e272d8d4bd0&#39;</span>,
     <span style="color:#0ff;font-weight:bold">&#39;wsgi_server&#39;</span>: <span style="color:#0ff;font-weight:bold">&#39;tiddlywebplugins.cherrypy&#39;</span>,
-    <span style="color:#0ff;font-weight:bold">&#39;cors.enable_non_simple&#39;</span>: True
+    <span style="color:#0ff;font-weight:bold">&#39;cors.enable_non_simple&#39;</span>: <span style="color:#fff;font-weight:bold">True</span>
 }
 
 original_gather_data = tiddlywebplugins.status._gather_data
@@ -136,7 +136,7 @@ tiddlywebplugins.status._gather_data = _status_gather_data
 <li>using cors since we&rsquo;re not hosting the wiki itself on the same server</li>
 </ul>
 <p>With that, we just need to create the store that will hold our data</p>
-<div class="highlight"><pre style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-sh" data-lang="sh">twanager recipe default <span style="color:#0ff;font-weight:bold">&lt;&lt;EOF
+<div class="highlight"><pre tabindex="0" style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-sh" data-lang="sh">twanager recipe default <span style="color:#0ff;font-weight:bold">&lt;&lt;EOF
 </span><span style="color:#0ff;font-weight:bold">desc: standard TiddlyWebWiki environment
 </span><span style="color:#0ff;font-weight:bold">policy: {&#34;read&#34;: [], &#34;create&#34;: [], &#34;manage&#34;: [&#34;R:ADMIN&#34;], &#34;accept&#34;: [], &#34;write&#34;: [&#34;R:ADMIN&#34;], &#34;owner&#34;: &#34;administrator&#34;, &#34;delete&#34;: [&#34;R:ADMIN&#34;]}
 </span><span style="color:#0ff;font-weight:bold">
@@ -147,7 +147,7 @@ twanager bag default <span style="color:#0ff;font-weight:bold">&lt;&lt;EOF
 </span><span style="color:#0ff;font-weight:bold">{&#34;policy&#34;: {&#34;read&#34;: [], &#34;create&#34;: [], &#34;manage&#34;: [&#34;R:ADMIN&#34;], &#34;accept&#34;: [], &#34;write&#34;: [], &#34;owner&#34;: &#34;administrator&#34;, &#34;delete&#34;: []}}
 </span><span style="color:#0ff;font-weight:bold">EOF</span>
 </code></pre></div><p>Finally, we can start the TiddlyWeb server</p>
-<div class="highlight"><pre style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-sh" data-lang="sh">twanager server
+<div class="highlight"><pre tabindex="0" style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-sh" data-lang="sh">twanager server
 </code></pre></div><h2 id="putting-it-all-together">Putting it all together</h2>
 <p>Once you have the TiddlyWeb server running, you can just go to wherever you&rsquo;re hosting the wiki html and it should work. You can try creating some posts, and the check mark on the sidebar should be red for a while and then turn black. Once that&rsquo;s done it&rsquo;s saved. You can refresh your browser and your posts should still be there.</p>
 <p>At this point, you can start customizing your TiddlyWeb instance, by changing your store to something like a database, or adding authorization. You can also tweak the server setup so you won&rsquo;t need CORS anymore.</p>
@@ -221,10 +221,10 @@ twanager bag default <span style="color:#0ff;font-weight:bold">&lt;&lt;EOF
 <p>I googled around for solutions and came across <a href="http://superuser.com/questions/548234/how-can-i-easily-toggle-between-dvorak-and-qwerty-keyboard-layouts-from-a-linux">a nice idea</a>. You could alias <code>asdf</code> to load the DVORAK mapping and <code>aoeu</code> (the equivalent to asdf in DVORAK) to load the QWERTY mapping. This actually makes sense since you don&rsquo;t really have to know where the letters are. The only problem is, you once again have to be logged in to change the key mappings.</p>
 <p>After some further searching, I found <a href="http://unix.stackexchange.com/questions/2884/toggle-between-dvorak-and-qwerty">something close to what I wanted</a>. Apparently, Alt+Up sends a KeyboardSignal keycode to the init process, which can act on that. It also works anywhere, even before being logged in. For SysVinit systems, you can just add a line to your inittab for a command to be run when Alt+Up is pressed.</p>
 <p>In the office, however, we generally use Arch Linux which uses SystemD. But apparently, it also has a mechanism of accepting the Alt+Up press. It runs the kbrequest target whenever it gets the keypress. <code>kbrequest.target</code> is normally aliased to run the rescue service though, so you have to manually create the file in <code>/etc/systemd/system/kbrequest.target</code> and fill it with a description:</p>
-<div class="highlight"><pre style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-ini" data-lang="ini"><span style="color:#fff;font-weight:bold">[Unit]</span>
+<div class="highlight"><pre tabindex="0" style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-ini" data-lang="ini"><span style="color:#fff;font-weight:bold">[Unit]</span>
 <span style="color:#007f7f">Description</span>=<span style="color:#0ff;font-weight:bold">kbrequest target</span>
 </code></pre></div><p>We can then add a service to be run whenever the target is called. Something like <code>/etc/systemd/system/keymap-switch.service</code>:</p>
-<div class="highlight"><pre style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-ini" data-lang="ini"><span style="color:#fff;font-weight:bold">[Unit]</span>
+<div class="highlight"><pre tabindex="0" style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-ini" data-lang="ini"><span style="color:#fff;font-weight:bold">[Unit]</span>
 <span style="color:#007f7f">Description</span>=<span style="color:#0ff;font-weight:bold">Keymap Switch Service</span>
 
 <span style="color:#fff;font-weight:bold">[Service]</span>
@@ -234,7 +234,7 @@ twanager bag default <span style="color:#0ff;font-weight:bold">&lt;&lt;EOF
 <span style="color:#fff;font-weight:bold">[Install]</span>
 <span style="color:#007f7f">WantedBy</span>=<span style="color:#0ff;font-weight:bold">kbrequest.target</span>
 </code></pre></div><p>After enabling said service, we only need the actual keymap switcher, <code>/usr/local/bin/keymap-switch</code>. The StackOverflow answer provides different ways of detecting the current keymap so we know which one to switch to. Since we&rsquo;re using SystemD, we can use that instead for managing which keymap we&rsquo;re actually using. It stores the current settings inside <code>/etc/vconsole.conf</code>. We can also then switch keymaps by using <code>localectl set-keymap</code>.</p>
-<div class="highlight"><pre style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-sh" data-lang="sh"><span style="color:#0f0;font-weight:bold">#!/bin/sh
+<div class="highlight"><pre tabindex="0" style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-sh" data-lang="sh"><span style="color:#0f0;font-weight:bold">#!/bin/sh
 </span><span style="color:#0f0;font-weight:bold"></span><span style="color:#fff;font-weight:bold">source</span> /etc/vconsole.conf
 
 <span style="color:#fff;font-weight:bold">if</span> [ <span style="color:#0ff;font-weight:bold">&#34;</span>$TERM<span style="color:#0ff;font-weight:bold">&#34;</span> = <span style="color:#0ff;font-weight:bold">&#34;dumb&#34;</span> ]; <span style="color:#fff;font-weight:bold">then</span>

+ 5 - 5
output/page/3.html

@@ -2,7 +2,7 @@
 <html lang="en-us">
 <head>
 	<meta charset="utf-8">
-	<meta name="generator" content="Hugo 0.69.2" />
+	<meta name="generator" content="Hugo 0.88.0" />
 	<meta name="viewport" content="width=device-width, initial-scale=1">
 	<link rel="stylesheet" href="/assets/css/theme.css">
 	<link rel="alternate" href="/rss.xml" type="application/rss+xml" title="Pleasant Programmer">
@@ -71,11 +71,11 @@
 <p>Ideally, we shouldn&rsquo;t bother inputting the schedule information into GTFS. Only the route data is really important for jeeps and buses. However, the schedule information is required in the GTFS, and routing apps wouldn&rsquo;t work without it. So we have to add a reasonable trip schedule for jeeps and buses.</p>
 <p>The current GTFS data does define these trip schedules. We assume that jeeps and buses operate between 6:00AM and 11:00PM and a new jeep passes by every 10 minutes. Also, jeeps and buses are defined to only operate on weekdays.</p>
 <p>While there might be jeeps who change routes or don&rsquo;t operate on weekends, I&rsquo;m pretty sure that jeeps and buses run on weekends. We&rsquo;ll have to fix it ourselves temporarily since there&rsquo;s no central GTFS feed yet.</p>
-<div class="highlight"><pre style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-sh" data-lang="sh"><span style="color:#007f7f"># 724594 seems to be the service id used by jeeps and buses</span>
+<div class="highlight"><pre tabindex="0" style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-sh" data-lang="sh"><span style="color:#007f7f"># 724594 seems to be the service id used by jeeps and buses</span>
 sed -i .bak <span style="color:#0ff;font-weight:bold">&#39;/^724594/ s/0,0/1,1/&#39;</span> calendar.txt
 </code></pre></div><p>Another thing we could do is to adjust the time between buses, although the improvement is arguable. With the current 10 minutes between jeeps, it might provide some routes a significant advantage just because the timing is right. So you might get differing route suggestions depending on what time you planned the route. This makes sense when you&rsquo;re sure what the times are, so you can minimize the wait, but with jeeps, you never really know how long the wait will actually be.</p>
 <p>If we set the frequency to one minute, it <em>might</em> give better routes by eliminating the timing issue. Or not, it&rsquo;s kind of hard to tell.</p>
-<div class="highlight"><pre style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-sh" data-lang="sh"><span style="color:#007f7f"># jeep and bus route ids tend to start with 72</span>
+<div class="highlight"><pre tabindex="0" style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-sh" data-lang="sh"><span style="color:#007f7f"># jeep and bus route ids tend to start with 72</span>
 sed -i .bak <span style="color:#0ff;font-weight:bold">&#39;/^72/ s/,600/,60/&#39;</span> frequencies.txt
 </code></pre></div><p>Overall, the problems we&rsquo;re having is a symptom of the mismatch between our transit system and the GTFS. It would be great if our transit system gets better and we don&rsquo;t need to do hackish things for it to fit the GTFS, but that&rsquo;s still a dream. For now, all we can really do is fit a triangle into a square hole.</p>
 
@@ -97,7 +97,7 @@ sed -i .bak <span style="color:#0ff;font-weight:bold">&#39;/^72/ s/,600/,60/&#39
 <p>This is just so hilariously wrong. It&rsquo;s much simpler to just walk along Katipunan Avenue.</p>
 <p>OTP couldn&rsquo;t possibly be that dumb though, so there must be something we&rsquo;re doing wrong. If you notice, Katipunan Avenue is colored red compared to the other streets. OTP seems to be avoiding any path that goes along Katipunan Avenue. The problem might have something to do with the &ldquo;road type&rdquo; designated to Katipunan.</p>
 <p>Apparently, by default OTP will consider roads of type <code>trunk</code> to be non-walkable and non-bikable. This is documented in the <a href="http://wiki.openstreetmap.org/wiki/OpenTripPlanner">OpenStreetMap wiki</a> and the <a href="https://github.com/openplans/OpenTripPlanner/wiki/GraphBuilder#permissions-and-bicycle-safety">OTP wiki</a> as well. There are actually multiple ways to go about this then. The first solution that came to mind was to just edit the original OSM XML file.</p>
-<div class="highlight"><pre style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-text" data-lang="text">sed -i .bak s/trunk/primary/g manila.osm
+<div class="highlight"><pre tabindex="0" style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-text" data-lang="text">sed -i .bak s/trunk/primary/g manila.osm
 </code></pre></div><p>And rebuild the graph. It doesn&rsquo;t really matter much because the OSM data isn&rsquo;t used to render the maps. It&rsquo;s just used to build the routing data. This is actually what I did for <a href="http://maps.pleasantprogrammer.com">maps.pleasantprogrammer.com</a>.</p>
 <p>It&rsquo;s also possible to set the default way properties in OTP. Instead of disallowing walking and biking on <code>highway=trunk</code> we could allow that. This is not much better than the <code>sed</code> solution though. It&rsquo;s better since you keep the weighting done by OTP, but you&rsquo;re still saying that all trunks are walkable which might not be the case.</p>
 <p>The most correct way to actually fix this is to go through each of the trunks and specifying <code>foot=yes</code> and <code>bicycle=yes</code> for those trunks that are actually walkable. You could either do this locally with the dumped data, or contribute it directly to OSM. I&rsquo;m not sure on the particulars with updating OSM though.</p>
@@ -119,7 +119,7 @@ sed -i .bak <span style="color:#0ff;font-weight:bold">&#39;/^72/ s/,600/,60/&#39
 <p>One thing I hadn&rsquo;t tested out last time was OTP&rsquo;s support for elevation data. It makes use of this by showing the elevation you have to traverse while walking along the suggested route. It can also take it into account when suggesting bike routes.</p>
 <p>The <a href="https://github.com/openplans/OpenTripPlanner/wiki/FiveMinutes">5 minute tutorial</a> actually discusses the elevation data briefly, but a more in-depth thing you can look at is the <a href="https://github.com/openplans/OpenTripPlanner/wiki/GraphBuilder#elevation-data">GraphBuilder documentation</a>. It suggests using the ASTER dataset which is free but requires registration. I just opted to use the SRTM data available from the <a href="http://www.philgis.org/freegisdata.htm">PhilGIS website</a>.</p>
 <p>I don&rsquo;t know about the ASTER dataset, but the PhilGIS data was in the ERDAS img format. OTP only supports GeoTIFF so there was a need to convert it beforehand. You can use <a href="http://www.gdal.org/">GDAL</a> for this. You&rsquo;d just then run,</p>
-<div class="highlight"><pre style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-text" data-lang="text">gdal_translate srtm41_90m_phl.img phil.tiff
+<div class="highlight"><pre tabindex="0" style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-text" data-lang="text">gdal_translate srtm41_90m_phl.img phil.tiff
 </code></pre></div><p>Afterwards, it&rsquo;s just a matter of following the OTP instructions on using a local elevation dataset. The process actually doubled the size of the generated Graph.obj so it might not be ideal if you&rsquo;re running on limited RAM.</p>
 <p>I&rsquo;ve actually hosted a <a href="http://maps.pleasantprogrammer.com">working example</a>. It&rsquo;s pretty much at the limits of the RAM so it might be slow and unreliable, but you can test it out just for fun. Please don&rsquo;t abuse it though.</p>
 

+ 9 - 9
output/page/4.html

@@ -2,7 +2,7 @@
 <html lang="en-us">
 <head>
 	<meta charset="utf-8">
-	<meta name="generator" content="Hugo 0.69.2" />
+	<meta name="generator" content="Hugo 0.88.0" />
 	<meta name="viewport" content="width=device-width, initial-scale=1">
 	<link rel="stylesheet" href="/assets/css/theme.css">
 	<link rel="alternate" href="/rss.xml" type="application/rss+xml" title="Pleasant Programmer">
@@ -68,11 +68,11 @@
 		</header>
 		<div class="e-content entry-content">
 			<p>As part of the data released by the DOTC, we also have the <a href="http://philippine-transit.hackathome.com/dataset-philippines-transit-information-service-gtfs/">fare matrix</a> for aircon buses, ordinary buses and jeeps. All as wonderful images. The data is also actually available from the <a href="http://ltfrb.gov.ph/main/farerates">LTFRB website</a>. Generally, the fare scheme is represented as &ldquo;pay <em>X</em> pesos for the first <em>Y</em> kilometers, pay <em>Z</em> for every succeeding kilometer.&rdquo; Instead of a table, we can simply represent this as a formula instead,</p>
-<div class="highlight"><pre style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-text" data-lang="text">base_fare + (distance - initial) * per_km
+<div class="highlight"><pre tabindex="0" style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-text" data-lang="text">base_fare + (distance - initial) * per_km
 </code></pre></div><p>The relevant values for the three services are:</p>
 <!-- raw HTML omitted -->
 <p>It isn&rsquo;t as simple as that though. Fares are also rounded to the nearest 25 centavos. So we&rsquo;d need to round them off correctly. This can be achieved by doing,</p>
-<div class="highlight"><pre style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-text" data-lang="text">round(calculated_fare * 4.0)/4.0
+<div class="highlight"><pre tabindex="0" style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-text" data-lang="text">round(calculated_fare * 4.0)/4.0
 </code></pre></div><p>There&rsquo;s also the discounted fare for students, senior citizens and persons with disability. They get 20% off the fare (prior to rounding) and the resulting fare is rounded off as well.</p>
 <p>Doing just this, we actually do get the same results as the fare matrices in the image for the most part. There are some discrepancies with the discounted jeep fares. I&rsquo;ve tried to resolve it by tweaking around with the formulas, but it really doesn&rsquo;t make sense in any way. I presume these were manually adjusted for one reason or another.</p>
 <p>Here&rsquo;s a <a href="../uploads/farematrix.rb">script</a> that generates CSVs of all the three fare matrices. If you&rsquo;re too lazy to run it, here are links to the <a href="../uploads/pub_aircon.csv">aircon bus</a>, <a href="../uploads/pub_ordinary.csv">ordinary bus</a> and <a href="../uploads/puj.csv">jeep</a> fare matrices.</p>
@@ -85,7 +85,7 @@
 <p>We also don&rsquo;t know if the jeeps or buses strictly follow the distance-based scheme. After all, if you can get on and off anywhere, you can&rsquo;t really measure distance that exactly. I assume they generally work off the notion of &ldquo;zones&rdquo; than actual distance travelled. In that sense, they work more similarly to the LRT which has fares based on how many stops you pass. For jeeps and buses, your fare is probably based more on how many &ldquo;zones&rdquo; you pass through.</p>
 <h3 id="conclusion">Conclusion</h3>
 <p>Philip, a co-worker of mine at By Implication, had suggested that we might want to use a different model than what the GTFS proposes. I have to agree with him. At this point, the GTFS doesn&rsquo;t really fit with our system. But I do think that open data and standards are great. In fact, I applaud the developers who made proposals for the fare system, as those are great first steps towards making the GTFS a more universal standard.</p>
-<p>Side note: I&rsquo;d also actually really like to hear about the DOTC developers&rsquo; experience with the project. It would be nice if they had a devblog.</p>
+<p>Side note: I&rsquo;d also actually really like to hear about the DOTC developers' experience with the project. It would be nice if they had a devblog.</p>
 
 		</div>
 		<small class="dateline">Posted: <time class="published dt-published" itemprop="datePublished" datetime="2013-07-13">2013-07-13</time></small>
@@ -109,14 +109,14 @@
 <p>I&rsquo;ll be splitting the next section up into 2 parts. In the first pass, I&rsquo;ll talk about what I did to just get the app to run but I won&rsquo;t try hard to fix any bugs. This generally is what I do when I try to get apps to run. I&rsquo;ll also be dropping enough information so that you can actually figure out what the real problem is. In the second pass, I&rsquo;ll explain what the problems were and how I fixed them.</p>
 <h3 id="first-pass">First Pass</h3>
 <p>A thing to note about Play (and one of the reasons it&rsquo;s a lovely Java framework) is that you don&rsquo;t need to do manual compilation. Just edit some source files, refresh your browser and it will automatically do the compilation for you. One less argument for using PHP. It even shows you (in the browser!) the source and which line of code caused the compilation error. So that&rsquo;s what I saw, <code>Error: type Check already defined</code></p>
-<div class="highlight"><pre style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-java" data-lang="java">@Retention(RetentionPolicy.<span style="color:#007f7f">RUNTIME</span>)
+<div class="highlight"><pre tabindex="0" style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-java" data-lang="java">@Retention(RetentionPolicy.<span style="color:#007f7f">RUNTIME</span>)
 @Target({ElementType.<span style="color:#007f7f">METHOD</span>, ElementType.<span style="color:#007f7f">TYPE</span>})
 <span style="color:#fff;font-weight:bold">public</span> @interface Check { <span style="color:#007f7f">// error here
 </span><span style="color:#007f7f"></span>
     String[] value();
 }
 </code></pre></div><p>You also know that typical behavior among programmers where your program doesn&rsquo;t compile, but you keep trying to compile it anyway hoping that it will magically just work. That&rsquo;s what I did, and it actually ran. I couldn&rsquo;t really just let this pass, so I decided to try deleting <code>Check.java</code>. I got another compilation error, <code>Error: type Secure already defined</code></p>
-<div class="highlight"><pre style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-java" data-lang="java"><span style="color:#fff;font-weight:bold">public</span> <span style="color:#fff;font-weight:bold">class</span> Secure <span style="color:#fff;font-weight:bold">extends</span> Controller { <span style="color:#007f7f">// error here
+<div class="highlight"><pre tabindex="0" style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-java" data-lang="java"><span style="color:#fff;font-weight:bold">public</span> <span style="color:#fff;font-weight:bold">class</span> Secure <span style="color:#fff;font-weight:bold">extends</span> Controller { <span style="color:#007f7f">// error here
 </span><span style="color:#007f7f"></span>
     @Before(unless={<span style="color:#0ff;font-weight:bold">&#34;login&#34;</span>, <span style="color:#0ff;font-weight:bold">&#34;authenticate&#34;</span>, <span style="color:#0ff;font-weight:bold">&#34;logout&#34;</span>})
 
@@ -125,7 +125,7 @@
 <p>The next problem is a sort of common thing most webapp developers have to solve one way or another. How do you set up the initial admin account? Phrased a different way, how do I login to this thing? The first thing I tried was just add a user into the <code>account</code> table directly. One problem though was how to set the password correctly. Plaintext obviously wouldn&rsquo;t work.</p>
 <p>Another note regarding Play 1.x, it provides the <a href="http://www.playframework.com/documentation/1.2.5/secure">secure module</a> which handles logins and keeping state, you simply need to implement the method <code>boolean authenticate(String username, String password)</code>. It leaves the actual process of verifying the login to the programmer. This can be exploited by just making the method return <code>true</code> and then any login would work. No need to actually set the password. Excellent.</p>
 <p>And we&rsquo;re logged in, just in time to encounter a runtime exception. This also works much like compilation errors in Play. It shows a page with the error and the relevant source lines. Now we get, <code>IndexOutOfBoundsException occured : Index: 0, Size: 0</code></p>
-<div class="highlight"><pre style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-java" data-lang="java"><span style="color:#fff;font-weight:bold">if</span>(session.<span style="color:#007f7f">get</span>(<span style="color:#0ff;font-weight:bold">&#34;agencyId&#34;</span>) == <span style="color:#fff;font-weight:bold">null</span>) {
+<div class="highlight"><pre tabindex="0" style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-java" data-lang="java"><span style="color:#fff;font-weight:bold">if</span>(session.<span style="color:#007f7f">get</span>(<span style="color:#0ff;font-weight:bold">&#34;agencyId&#34;</span>) == <span style="color:#fff;font-weight:bold">null</span>) {
 
     Agency agency = agencies.<span style="color:#007f7f">get</span>(0); <span style="color:#007f7f">// error here
 </span><span style="color:#007f7f"></span>
@@ -133,7 +133,7 @@
     session.<span style="color:#007f7f">put</span>(<span style="color:#0ff;font-weight:bold">&#34;agencyName&#34;</span>, agency.<span style="color:#007f7f">name</span>);
 </code></pre></div><p>Apparently, we need to have an agency. That&rsquo;s generally simple enough. You just manually insert an agency into the <code>agency</code> table. After that&rsquo;s done, we finally have a view of the actual application. It&rsquo;s very Bootstrap-y, but that&rsquo;s just fine. The workflow though, is not perfectly intuitive, but I&rsquo;ll talk about that some other day.</p>
 <p>That&rsquo;s not the end of it though, we still have to fix these bugs. The developer obviously didn&rsquo;t have to put up with this when they were working, so what happened? Also, the log is showing some weird things,</p>
-<div class="highlight"><pre style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-text" data-lang="text">~        _            _
+<div class="highlight"><pre tabindex="0" style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-text" data-lang="text">~        _            _
 ~  _ __ | | __ _ _  _| |
 ~ | &#39;_ \| |/ _&#39; | || |_|
 ~ |  __/|_|\____|\__ (_)
@@ -244,7 +244,7 @@ Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
 <h3 id="second-pass">Second Pass</h3>
 <p>So how did you do? First, the error that <code>type Check already defined</code> usually does mean that <code>Check</code> was already defined elsewhere. Looking in the app folder though, there was nothing of the sort. It&rsquo;s the only one there that was <code>Check.java</code>. But remember the secure module? Modules work by providing source files and Play just compiles them all together. Bingo, <code>Check.java</code>. Doing a diff shows nothing was changed. So the solution really was just simply delete <code>Check.java</code> and also <code>Secure.java</code>. No more compilation errors!</p>
 <p>The next question is, how do you get the initial user? There actually is some code that looks like it creates the default admin user,</p>
-<div class="highlight"><pre style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-java" data-lang="java"><span style="color:#fff;font-weight:bold">if</span>(Security.<span style="color:#007f7f">isConnected</span>()) {
+<div class="highlight"><pre tabindex="0" style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-java" data-lang="java"><span style="color:#fff;font-weight:bold">if</span>(Security.<span style="color:#007f7f">isConnected</span>()) {
     ...
     Account account = Account.<span style="color:#007f7f">find</span>(<span style="color:#0ff;font-weight:bold">&#34;username = ?&#34;</span>, Security.<span style="color:#007f7f">connected</span>()).<span style="color:#007f7f">first</span>();
     ...

+ 1 - 1
output/page/5.html

@@ -2,7 +2,7 @@
 <html lang="en-us">
 <head>
 	<meta charset="utf-8">
-	<meta name="generator" content="Hugo 0.69.2" />
+	<meta name="generator" content="Hugo 0.88.0" />
 	<meta name="viewport" content="width=device-width, initial-scale=1">
 	<link rel="stylesheet" href="/assets/css/theme.css">
 	<link rel="alternate" href="/rss.xml" type="application/rss+xml" title="Pleasant Programmer">

+ 1 - 1
output/pages.html

@@ -2,7 +2,7 @@
 <html lang="en-us">
 <head>
 	<meta charset="utf-8">
-	<meta name="generator" content="Hugo 0.69.2" />
+	<meta name="generator" content="Hugo 0.88.0" />
 	<meta name="viewport" content="width=device-width, initial-scale=1">
 	<link rel="stylesheet" href="/assets/css/theme.css">
 	<link rel="alternate" href="/rss.xml" type="application/rss+xml" title="Pleasant Programmer">

+ 3 - 3
output/pages/projects.html

@@ -2,7 +2,7 @@
 <html lang="en-us">
 <head>
 	<meta charset="utf-8">
-	<meta name="generator" content="Hugo 0.69.2" />
+	<meta name="generator" content="Hugo 0.88.0" />
 	<meta name="viewport" content="width=device-width, initial-scale=1">
 	<link rel="stylesheet" href="/assets/css/theme.css">
 	<link rel="alternate" href="/rss.xml" type="application/rss+xml" title="Pleasant Programmer">
@@ -48,8 +48,8 @@ particularly how well the setting and atmosphere was done. The voice quotes
 whenever you discover a new technology were what really made the game for me and
 I&rsquo;ve included those into the site. I also tried my very best to capture the
 original look and feel from the game using HTML and CSS.</p>
-<h2 id="game-n-chat">Game n&rsquo; Chat</h2>
-<p><a href="https://gamenchat.pleasantprogrammer.com">Game n&rsquo; Chat</a> is an online chatroom
+<h2 id="game-n-chat">Game n' Chat</h2>
+<p><a href="https://gamenchat.pleasantprogrammer.com">Game n' Chat</a> is an online chatroom
 where you can play the Taboo board game. I got the chance to play at a party one
 time and I really enjoyed it. I also remembered having quite a bit of fun
 playing trivia and other games over IRC back in the day, so I decided to build

+ 2 - 2
output/pages/rss.xml

@@ -29,8 +29,8 @@ particularly how well the setting and atmosphere was done. The voice quotes
 whenever you discover a new technology were what really made the game for me and
 I&amp;rsquo;ve included those into the site. I also tried my very best to capture the
 original look and feel from the game using HTML and CSS.&lt;/p&gt;
-&lt;h2 id=&#34;game-n-chat&#34;&gt;Game n&amp;rsquo; Chat&lt;/h2&gt;
-&lt;p&gt;&lt;a href=&#34;https://gamenchat.pleasantprogrammer.com&#34;&gt;Game n&amp;rsquo; Chat&lt;/a&gt; is an online chatroom
+&lt;h2 id=&#34;game-n-chat&#34;&gt;Game n&#39; Chat&lt;/h2&gt;
+&lt;p&gt;&lt;a href=&#34;https://gamenchat.pleasantprogrammer.com&#34;&gt;Game n&#39; Chat&lt;/a&gt; is an online chatroom
 where you can play the Taboo board game. I got the chance to play at a party one
 time and I really enjoyed it. I also remembered having quite a bit of fun
 playing trivia and other games over IRC back in the day, so I decided to build

+ 1 - 1
output/posts.html

@@ -2,7 +2,7 @@
 <html lang="en-us">
 <head>
 	<meta charset="utf-8">
-	<meta name="generator" content="Hugo 0.69.2" />
+	<meta name="generator" content="Hugo 0.88.0" />
 	<meta name="viewport" content="width=device-width, initial-scale=1">
 	<link rel="stylesheet" href="/assets/css/theme.css">
 	<link rel="alternate" href="/rss.xml" type="application/rss+xml" title="Pleasant Programmer">

+ 1 - 1
output/posts/audventure.html

@@ -2,7 +2,7 @@
 <html lang="en-us">
 <head>
 	<meta charset="utf-8">
-	<meta name="generator" content="Hugo 0.69.2" />
+	<meta name="generator" content="Hugo 0.88.0" />
 	<meta name="viewport" content="width=device-width, initial-scale=1">
 	<link rel="stylesheet" href="/assets/css/theme.css">
 	<link rel="alternate" href="/rss.xml" type="application/rss+xml" title="Pleasant Programmer">

+ 2 - 2
output/posts/cloudflare-shenanigans.html

@@ -2,7 +2,7 @@
 <html lang="en-us">
 <head>
 	<meta charset="utf-8">
-	<meta name="generator" content="Hugo 0.69.2" />
+	<meta name="generator" content="Hugo 0.88.0" />
 	<meta name="viewport" content="width=device-width, initial-scale=1">
 	<link rel="stylesheet" href="/assets/css/theme.css">
 	<link rel="alternate" href="/rss.xml" type="application/rss+xml" title="Pleasant Programmer">
@@ -57,7 +57,7 @@
 <p>A few months after we started beta testing the app, Cloudflare added more IPs to their range. Unfortunately, our server got moved to those new IPs which were not whitelisted yet. Apparently, the telco whitelisting process was incredibly convoluted and time consuming. Our client didn&rsquo;t want to bother asking them to whitelist more IPs. We also tried asking Cloudflare to move us back to the original IP range, but they could only do that if we were in their enterprise tier. We couldn&rsquo;t really afford that, so we looked for other options.</p>
 <p>Since Cloudflare was essentially just a giant reverse proxy, theoretically there should be no distinction between one IP address from another. The specific IP we get is probably just for load balancing. So we tried accessing the IPs in the range directly and just setting the Host header and it worked! But we get SSL errors because the IP itself doesn&rsquo;t have its own certificate.</p>
 <p>After more testing, we figured out that you could actually use any Cloudflare backed domain so long as we properly set the Host header. We just needed to find one still in the old range. Coincidentally, 4chan.org was. Which led to this wonderful commit</p>
-<div class="highlight"><pre style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-diff" data-lang="diff">commit 123456789abcdef
+<div class="highlight"><pre tabindex="0" style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-diff" data-lang="diff">commit 123456789abcdef
 Author: ~~~~~~
 Date:   ~~~~~~
 

+ 4 - 4
output/posts/console-keymap-switching.html

@@ -2,7 +2,7 @@
 <html lang="en-us">
 <head>
 	<meta charset="utf-8">
-	<meta name="generator" content="Hugo 0.69.2" />
+	<meta name="generator" content="Hugo 0.88.0" />
 	<meta name="viewport" content="width=device-width, initial-scale=1">
 	<link rel="stylesheet" href="/assets/css/theme.css">
 	<link rel="alternate" href="/rss.xml" type="application/rss+xml" title="Pleasant Programmer">
@@ -57,10 +57,10 @@
 <p>I googled around for solutions and came across <a href="http://superuser.com/questions/548234/how-can-i-easily-toggle-between-dvorak-and-qwerty-keyboard-layouts-from-a-linux">a nice idea</a>. You could alias <code>asdf</code> to load the DVORAK mapping and <code>aoeu</code> (the equivalent to asdf in DVORAK) to load the QWERTY mapping. This actually makes sense since you don&rsquo;t really have to know where the letters are. The only problem is, you once again have to be logged in to change the key mappings.</p>
 <p>After some further searching, I found <a href="http://unix.stackexchange.com/questions/2884/toggle-between-dvorak-and-qwerty">something close to what I wanted</a>. Apparently, Alt+Up sends a KeyboardSignal keycode to the init process, which can act on that. It also works anywhere, even before being logged in. For SysVinit systems, you can just add a line to your inittab for a command to be run when Alt+Up is pressed.</p>
 <p>In the office, however, we generally use Arch Linux which uses SystemD. But apparently, it also has a mechanism of accepting the Alt+Up press. It runs the kbrequest target whenever it gets the keypress. <code>kbrequest.target</code> is normally aliased to run the rescue service though, so you have to manually create the file in <code>/etc/systemd/system/kbrequest.target</code> and fill it with a description:</p>
-<div class="highlight"><pre style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-ini" data-lang="ini"><span style="color:#fff;font-weight:bold">[Unit]</span>
+<div class="highlight"><pre tabindex="0" style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-ini" data-lang="ini"><span style="color:#fff;font-weight:bold">[Unit]</span>
 <span style="color:#007f7f">Description</span>=<span style="color:#0ff;font-weight:bold">kbrequest target</span>
 </code></pre></div><p>We can then add a service to be run whenever the target is called. Something like <code>/etc/systemd/system/keymap-switch.service</code>:</p>
-<div class="highlight"><pre style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-ini" data-lang="ini"><span style="color:#fff;font-weight:bold">[Unit]</span>
+<div class="highlight"><pre tabindex="0" style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-ini" data-lang="ini"><span style="color:#fff;font-weight:bold">[Unit]</span>
 <span style="color:#007f7f">Description</span>=<span style="color:#0ff;font-weight:bold">Keymap Switch Service</span>
 
 <span style="color:#fff;font-weight:bold">[Service]</span>
@@ -70,7 +70,7 @@
 <span style="color:#fff;font-weight:bold">[Install]</span>
 <span style="color:#007f7f">WantedBy</span>=<span style="color:#0ff;font-weight:bold">kbrequest.target</span>
 </code></pre></div><p>After enabling said service, we only need the actual keymap switcher, <code>/usr/local/bin/keymap-switch</code>. The StackOverflow answer provides different ways of detecting the current keymap so we know which one to switch to. Since we&rsquo;re using SystemD, we can use that instead for managing which keymap we&rsquo;re actually using. It stores the current settings inside <code>/etc/vconsole.conf</code>. We can also then switch keymaps by using <code>localectl set-keymap</code>.</p>
-<div class="highlight"><pre style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-sh" data-lang="sh"><span style="color:#0f0;font-weight:bold">#!/bin/sh
+<div class="highlight"><pre tabindex="0" style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-sh" data-lang="sh"><span style="color:#0f0;font-weight:bold">#!/bin/sh
 </span><span style="color:#0f0;font-weight:bold"></span><span style="color:#fff;font-weight:bold">source</span> /etc/vconsole.conf
 
 <span style="color:#fff;font-weight:bold">if</span> [ <span style="color:#0ff;font-weight:bold">&#34;</span>$TERM<span style="color:#0ff;font-weight:bold">&#34;</span> = <span style="color:#0ff;font-weight:bold">&#34;dumb&#34;</span> ]; <span style="color:#fff;font-weight:bold">then</span>

+ 2 - 2
output/posts/elevation-data-in-otp.html

@@ -2,7 +2,7 @@
 <html lang="en-us">
 <head>
 	<meta charset="utf-8">
-	<meta name="generator" content="Hugo 0.69.2" />
+	<meta name="generator" content="Hugo 0.88.0" />
 	<meta name="viewport" content="width=device-width, initial-scale=1">
 	<link rel="stylesheet" href="/assets/css/theme.css">
 	<link rel="alternate" href="/rss.xml" type="application/rss+xml" title="Pleasant Programmer">
@@ -55,7 +55,7 @@
 <p>One thing I hadn&rsquo;t tested out last time was OTP&rsquo;s support for elevation data. It makes use of this by showing the elevation you have to traverse while walking along the suggested route. It can also take it into account when suggesting bike routes.</p>
 <p>The <a href="https://github.com/openplans/OpenTripPlanner/wiki/FiveMinutes">5 minute tutorial</a> actually discusses the elevation data briefly, but a more in-depth thing you can look at is the <a href="https://github.com/openplans/OpenTripPlanner/wiki/GraphBuilder#elevation-data">GraphBuilder documentation</a>. It suggests using the ASTER dataset which is free but requires registration. I just opted to use the SRTM data available from the <a href="http://www.philgis.org/freegisdata.htm">PhilGIS website</a>.</p>
 <p>I don&rsquo;t know about the ASTER dataset, but the PhilGIS data was in the ERDAS img format. OTP only supports GeoTIFF so there was a need to convert it beforehand. You can use <a href="http://www.gdal.org/">GDAL</a> for this. You&rsquo;d just then run,</p>
-<div class="highlight"><pre style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-text" data-lang="text">gdal_translate srtm41_90m_phl.img phil.tiff
+<div class="highlight"><pre tabindex="0" style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-text" data-lang="text">gdal_translate srtm41_90m_phl.img phil.tiff
 </code></pre></div><p>Afterwards, it&rsquo;s just a matter of following the OTP instructions on using a local elevation dataset. The process actually doubled the size of the generated Graph.obj so it might not be ideal if you&rsquo;re running on limited RAM.</p>
 <p>I&rsquo;ve actually hosted a <a href="http://maps.pleasantprogrammer.com">working example</a>. It&rsquo;s pretty much at the limits of the RAM so it might be slow and unreliable, but you can test it out just for fun. Please don&rsquo;t abuse it though.</p>
 

+ 4 - 4
output/posts/fare-data.html

@@ -2,7 +2,7 @@
 <html lang="en-us">
 <head>
 	<meta charset="utf-8">
-	<meta name="generator" content="Hugo 0.69.2" />
+	<meta name="generator" content="Hugo 0.88.0" />
 	<meta name="viewport" content="width=device-width, initial-scale=1">
 	<link rel="stylesheet" href="/assets/css/theme.css">
 	<link rel="alternate" href="/rss.xml" type="application/rss+xml" title="Pleasant Programmer">
@@ -52,11 +52,11 @@
 	</small>
 	<div class="e-content entry-content" itemprop="entry-text">
 		<p>As part of the data released by the DOTC, we also have the <a href="http://philippine-transit.hackathome.com/dataset-philippines-transit-information-service-gtfs/">fare matrix</a> for aircon buses, ordinary buses and jeeps. All as wonderful images. The data is also actually available from the <a href="http://ltfrb.gov.ph/main/farerates">LTFRB website</a>. Generally, the fare scheme is represented as &ldquo;pay <em>X</em> pesos for the first <em>Y</em> kilometers, pay <em>Z</em> for every succeeding kilometer.&rdquo; Instead of a table, we can simply represent this as a formula instead,</p>
-<div class="highlight"><pre style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-text" data-lang="text">base_fare + (distance - initial) * per_km
+<div class="highlight"><pre tabindex="0" style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-text" data-lang="text">base_fare + (distance - initial) * per_km
 </code></pre></div><p>The relevant values for the three services are:</p>
 <!-- raw HTML omitted -->
 <p>It isn&rsquo;t as simple as that though. Fares are also rounded to the nearest 25 centavos. So we&rsquo;d need to round them off correctly. This can be achieved by doing,</p>
-<div class="highlight"><pre style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-text" data-lang="text">round(calculated_fare * 4.0)/4.0
+<div class="highlight"><pre tabindex="0" style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-text" data-lang="text">round(calculated_fare * 4.0)/4.0
 </code></pre></div><p>There&rsquo;s also the discounted fare for students, senior citizens and persons with disability. They get 20% off the fare (prior to rounding) and the resulting fare is rounded off as well.</p>
 <p>Doing just this, we actually do get the same results as the fare matrices in the image for the most part. There are some discrepancies with the discounted jeep fares. I&rsquo;ve tried to resolve it by tweaking around with the formulas, but it really doesn&rsquo;t make sense in any way. I presume these were manually adjusted for one reason or another.</p>
 <p>Here&rsquo;s a <a href="../uploads/farematrix.rb">script</a> that generates CSVs of all the three fare matrices. If you&rsquo;re too lazy to run it, here are links to the <a href="../uploads/pub_aircon.csv">aircon bus</a>, <a href="../uploads/pub_ordinary.csv">ordinary bus</a> and <a href="../uploads/puj.csv">jeep</a> fare matrices.</p>
@@ -69,7 +69,7 @@
 <p>We also don&rsquo;t know if the jeeps or buses strictly follow the distance-based scheme. After all, if you can get on and off anywhere, you can&rsquo;t really measure distance that exactly. I assume they generally work off the notion of &ldquo;zones&rdquo; than actual distance travelled. In that sense, they work more similarly to the LRT which has fares based on how many stops you pass. For jeeps and buses, your fare is probably based more on how many &ldquo;zones&rdquo; you pass through.</p>
 <h3 id="conclusion">Conclusion</h3>
 <p>Philip, a co-worker of mine at By Implication, had suggested that we might want to use a different model than what the GTFS proposes. I have to agree with him. At this point, the GTFS doesn&rsquo;t really fit with our system. But I do think that open data and standards are great. In fact, I applaud the developers who made proposals for the fare system, as those are great first steps towards making the GTFS a more universal standard.</p>
-<p>Side note: I&rsquo;d also actually really like to hear about the DOTC developers&rsquo; experience with the project. It would be nice if they had a devblog.</p>
+<p>Side note: I&rsquo;d also actually really like to hear about the DOTC developers' experience with the project. It would be nice if they had a devblog.</p>
 
 	</div>
 	<aside class="postpromonav">

+ 1 - 1
output/posts/geocoding-services.html

@@ -2,7 +2,7 @@
 <html lang="en-us">
 <head>
 	<meta charset="utf-8">
-	<meta name="generator" content="Hugo 0.69.2" />
+	<meta name="generator" content="Hugo 0.88.0" />
 	<meta name="viewport" content="width=device-width, initial-scale=1">
 	<link rel="stylesheet" href="/assets/css/theme.css">
 	<link rel="alternate" href="/rss.xml" type="application/rss+xml" title="Pleasant Programmer">

+ 1 - 1
output/posts/graphserver.html

@@ -2,7 +2,7 @@
 <html lang="en-us">
 <head>
 	<meta charset="utf-8">
-	<meta name="generator" content="Hugo 0.69.2" />
+	<meta name="generator" content="Hugo 0.88.0" />
 	<meta name="viewport" content="width=device-width, initial-scale=1">
 	<link rel="stylesheet" href="/assets/css/theme.css">
 	<link rel="alternate" href="/rss.xml" type="application/rss+xml" title="Pleasant Programmer">

+ 6 - 6
output/posts/gtfs-editor.html

@@ -2,7 +2,7 @@
 <html lang="en-us">
 <head>
 	<meta charset="utf-8">
-	<meta name="generator" content="Hugo 0.69.2" />
+	<meta name="generator" content="Hugo 0.88.0" />
 	<meta name="viewport" content="width=device-width, initial-scale=1">
 	<link rel="stylesheet" href="/assets/css/theme.css">
 	<link rel="alternate" href="/rss.xml" type="application/rss+xml" title="Pleasant Programmer">
@@ -64,14 +64,14 @@
 <p>I&rsquo;ll be splitting the next section up into 2 parts. In the first pass, I&rsquo;ll talk about what I did to just get the app to run but I won&rsquo;t try hard to fix any bugs. This generally is what I do when I try to get apps to run. I&rsquo;ll also be dropping enough information so that you can actually figure out what the real problem is. In the second pass, I&rsquo;ll explain what the problems were and how I fixed them.</p>
 <h3 id="first-pass">First Pass</h3>
 <p>A thing to note about Play (and one of the reasons it&rsquo;s a lovely Java framework) is that you don&rsquo;t need to do manual compilation. Just edit some source files, refresh your browser and it will automatically do the compilation for you. One less argument for using PHP. It even shows you (in the browser!) the source and which line of code caused the compilation error. So that&rsquo;s what I saw, <code>Error: type Check already defined</code></p>
-<div class="highlight"><pre style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-java" data-lang="java">@Retention(RetentionPolicy.<span style="color:#007f7f">RUNTIME</span>)
+<div class="highlight"><pre tabindex="0" style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-java" data-lang="java">@Retention(RetentionPolicy.<span style="color:#007f7f">RUNTIME</span>)
 @Target({ElementType.<span style="color:#007f7f">METHOD</span>, ElementType.<span style="color:#007f7f">TYPE</span>})
 <span style="color:#fff;font-weight:bold">public</span> @interface Check { <span style="color:#007f7f">// error here
 </span><span style="color:#007f7f"></span>
     String[] value();
 }
 </code></pre></div><p>You also know that typical behavior among programmers where your program doesn&rsquo;t compile, but you keep trying to compile it anyway hoping that it will magically just work. That&rsquo;s what I did, and it actually ran. I couldn&rsquo;t really just let this pass, so I decided to try deleting <code>Check.java</code>. I got another compilation error, <code>Error: type Secure already defined</code></p>
-<div class="highlight"><pre style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-java" data-lang="java"><span style="color:#fff;font-weight:bold">public</span> <span style="color:#fff;font-weight:bold">class</span> Secure <span style="color:#fff;font-weight:bold">extends</span> Controller { <span style="color:#007f7f">// error here
+<div class="highlight"><pre tabindex="0" style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-java" data-lang="java"><span style="color:#fff;font-weight:bold">public</span> <span style="color:#fff;font-weight:bold">class</span> Secure <span style="color:#fff;font-weight:bold">extends</span> Controller { <span style="color:#007f7f">// error here
 </span><span style="color:#007f7f"></span>
     @Before(unless={<span style="color:#0ff;font-weight:bold">&#34;login&#34;</span>, <span style="color:#0ff;font-weight:bold">&#34;authenticate&#34;</span>, <span style="color:#0ff;font-weight:bold">&#34;logout&#34;</span>})
 
@@ -80,7 +80,7 @@
 <p>The next problem is a sort of common thing most webapp developers have to solve one way or another. How do you set up the initial admin account? Phrased a different way, how do I login to this thing? The first thing I tried was just add a user into the <code>account</code> table directly. One problem though was how to set the password correctly. Plaintext obviously wouldn&rsquo;t work.</p>
 <p>Another note regarding Play 1.x, it provides the <a href="http://www.playframework.com/documentation/1.2.5/secure">secure module</a> which handles logins and keeping state, you simply need to implement the method <code>boolean authenticate(String username, String password)</code>. It leaves the actual process of verifying the login to the programmer. This can be exploited by just making the method return <code>true</code> and then any login would work. No need to actually set the password. Excellent.</p>
 <p>And we&rsquo;re logged in, just in time to encounter a runtime exception. This also works much like compilation errors in Play. It shows a page with the error and the relevant source lines. Now we get, <code>IndexOutOfBoundsException occured : Index: 0, Size: 0</code></p>
-<div class="highlight"><pre style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-java" data-lang="java"><span style="color:#fff;font-weight:bold">if</span>(session.<span style="color:#007f7f">get</span>(<span style="color:#0ff;font-weight:bold">&#34;agencyId&#34;</span>) == <span style="color:#fff;font-weight:bold">null</span>) {
+<div class="highlight"><pre tabindex="0" style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-java" data-lang="java"><span style="color:#fff;font-weight:bold">if</span>(session.<span style="color:#007f7f">get</span>(<span style="color:#0ff;font-weight:bold">&#34;agencyId&#34;</span>) == <span style="color:#fff;font-weight:bold">null</span>) {
 
     Agency agency = agencies.<span style="color:#007f7f">get</span>(0); <span style="color:#007f7f">// error here
 </span><span style="color:#007f7f"></span>
@@ -88,7 +88,7 @@
     session.<span style="color:#007f7f">put</span>(<span style="color:#0ff;font-weight:bold">&#34;agencyName&#34;</span>, agency.<span style="color:#007f7f">name</span>);
 </code></pre></div><p>Apparently, we need to have an agency. That&rsquo;s generally simple enough. You just manually insert an agency into the <code>agency</code> table. After that&rsquo;s done, we finally have a view of the actual application. It&rsquo;s very Bootstrap-y, but that&rsquo;s just fine. The workflow though, is not perfectly intuitive, but I&rsquo;ll talk about that some other day.</p>
 <p>That&rsquo;s not the end of it though, we still have to fix these bugs. The developer obviously didn&rsquo;t have to put up with this when they were working, so what happened? Also, the log is showing some weird things,</p>
-<div class="highlight"><pre style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-text" data-lang="text">~        _            _
+<div class="highlight"><pre tabindex="0" style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-text" data-lang="text">~        _            _
 ~  _ __ | | __ _ _  _| |
 ~ | &#39;_ \| |/ _&#39; | || |_|
 ~ |  __/|_|\____|\__ (_)
@@ -199,7 +199,7 @@ Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
 <h3 id="second-pass">Second Pass</h3>
 <p>So how did you do? First, the error that <code>type Check already defined</code> usually does mean that <code>Check</code> was already defined elsewhere. Looking in the app folder though, there was nothing of the sort. It&rsquo;s the only one there that was <code>Check.java</code>. But remember the secure module? Modules work by providing source files and Play just compiles them all together. Bingo, <code>Check.java</code>. Doing a diff shows nothing was changed. So the solution really was just simply delete <code>Check.java</code> and also <code>Secure.java</code>. No more compilation errors!</p>
 <p>The next question is, how do you get the initial user? There actually is some code that looks like it creates the default admin user,</p>
-<div class="highlight"><pre style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-java" data-lang="java"><span style="color:#fff;font-weight:bold">if</span>(Security.<span style="color:#007f7f">isConnected</span>()) {
+<div class="highlight"><pre tabindex="0" style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-java" data-lang="java"><span style="color:#fff;font-weight:bold">if</span>(Security.<span style="color:#007f7f">isConnected</span>()) {
     ...
     Account account = Account.<span style="color:#007f7f">find</span>(<span style="color:#0ff;font-weight:bold">&#34;username = ?&#34;</span>, Security.<span style="color:#007f7f">connected</span>()).<span style="color:#007f7f">first</span>();
     ...

+ 2 - 2
output/posts/haproxy-charset.html

@@ -2,7 +2,7 @@
 <html lang="en-us">
 <head>
 	<meta charset="utf-8">
-	<meta name="generator" content="Hugo 0.69.2" />
+	<meta name="generator" content="Hugo 0.88.0" />
 	<meta name="viewport" content="width=device-width, initial-scale=1">
 	<link rel="stylesheet" href="/assets/css/theme.css">
 	<link rel="alternate" href="/rss.xml" type="application/rss+xml" title="Pleasant Programmer">
@@ -55,7 +55,7 @@
 <p>By default, we use UTF-8 for text storage and rendering. A problem is that browsers don&rsquo;t assume UTF-8 as the default and you need to have either a <code>&lt;meta charset=&quot;utf-8&quot; /&gt;</code> in the HTML or <code>Content-Type: text/html; charset=utf-8</code> in the headers. A few of our services don&rsquo;t set the <code>Content-Type</code> with the <code>charset=utf-8</code> part so you&rsquo;d get piñata instead of piñata.</p>
 <p>Being lazy, we usually just correct this at the reverse proxy side. It&rsquo;s trivial to do in nginx. You just need to add <code>charset utf-8;</code> to your configuration and you&rsquo;re good. For haproxy though, I couldn&rsquo;t readily find a solution for it and had to go through the docs to see what I could do.</p>
 <p>After a bit of experimenting, I had success with this:</p>
-<div class="highlight"><pre style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-text" data-lang="text"># set content-type to utf-8 if not already
+<div class="highlight"><pre tabindex="0" style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-text" data-lang="text"># set content-type to utf-8 if not already
 acl has_charset hdr_sub(content-type) -i charset=
 rspirep (Content-Type.*) \1;\ charset=utf-8 unless has_charset
 </code></pre></div><p>This is probably not the best way to do it. Arguably, we should just fix our services to have the correct <code>Content-Type</code> in the first place, but I can do that some other time.</p>

+ 2 - 2
output/posts/highways-in-otp.html

@@ -2,7 +2,7 @@
 <html lang="en-us">
 <head>
 	<meta charset="utf-8">
-	<meta name="generator" content="Hugo 0.69.2" />
+	<meta name="generator" content="Hugo 0.88.0" />
 	<meta name="viewport" content="width=device-width, initial-scale=1">
 	<link rel="stylesheet" href="/assets/css/theme.css">
 	<link rel="alternate" href="/rss.xml" type="application/rss+xml" title="Pleasant Programmer">
@@ -56,7 +56,7 @@
 <p>This is just so hilariously wrong. It&rsquo;s much simpler to just walk along Katipunan Avenue.</p>
 <p>OTP couldn&rsquo;t possibly be that dumb though, so there must be something we&rsquo;re doing wrong. If you notice, Katipunan Avenue is colored red compared to the other streets. OTP seems to be avoiding any path that goes along Katipunan Avenue. The problem might have something to do with the &ldquo;road type&rdquo; designated to Katipunan.</p>
 <p>Apparently, by default OTP will consider roads of type <code>trunk</code> to be non-walkable and non-bikable. This is documented in the <a href="http://wiki.openstreetmap.org/wiki/OpenTripPlanner">OpenStreetMap wiki</a> and the <a href="https://github.com/openplans/OpenTripPlanner/wiki/GraphBuilder#permissions-and-bicycle-safety">OTP wiki</a> as well. There are actually multiple ways to go about this then. The first solution that came to mind was to just edit the original OSM XML file.</p>
-<div class="highlight"><pre style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-text" data-lang="text">sed -i .bak s/trunk/primary/g manila.osm
+<div class="highlight"><pre tabindex="0" style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-text" data-lang="text">sed -i .bak s/trunk/primary/g manila.osm
 </code></pre></div><p>And rebuild the graph. It doesn&rsquo;t really matter much because the OSM data isn&rsquo;t used to render the maps. It&rsquo;s just used to build the routing data. This is actually what I did for <a href="http://maps.pleasantprogrammer.com">maps.pleasantprogrammer.com</a>.</p>
 <p>It&rsquo;s also possible to set the default way properties in OTP. Instead of disallowing walking and biking on <code>highway=trunk</code> we could allow that. This is not much better than the <code>sed</code> solution though. It&rsquo;s better since you keep the weighting done by OTP, but you&rsquo;re still saying that all trunks are walkable which might not be the case.</p>
 <p>The most correct way to actually fix this is to go through each of the trunks and specifying <code>foot=yes</code> and <code>bicycle=yes</code> for those trunks that are actually walkable. You could either do this locally with the dumped data, or contribute it directly to OSM. I&rsquo;m not sure on the particulars with updating OSM though.</p>

+ 1 - 1
output/posts/is-my-terminal-window-active.html

@@ -2,7 +2,7 @@
 <html lang="en-us">
 <head>
 	<meta charset="utf-8">
-	<meta name="generator" content="Hugo 0.69.2" />
+	<meta name="generator" content="Hugo 0.88.0" />
 	<meta name="viewport" content="width=device-width, initial-scale=1">
 	<link rel="stylesheet" href="/assets/css/theme.css">
 	<link rel="alternate" href="/rss.xml" type="application/rss+xml" title="Pleasant Programmer">

+ 1 - 1
output/posts/isp-issues.html

@@ -2,7 +2,7 @@
 <html lang="en-us">
 <head>
 	<meta charset="utf-8">
-	<meta name="generator" content="Hugo 0.69.2" />
+	<meta name="generator" content="Hugo 0.88.0" />
 	<meta name="viewport" content="width=device-width, initial-scale=1">
 	<link rel="stylesheet" href="/assets/css/theme.css">
 	<link rel="alternate" href="/rss.xml" type="application/rss+xml" title="Pleasant Programmer">

+ 3 - 3
output/posts/jeep-and-bus-schedules.html

@@ -2,7 +2,7 @@
 <html lang="en-us">
 <head>
 	<meta charset="utf-8">
-	<meta name="generator" content="Hugo 0.69.2" />
+	<meta name="generator" content="Hugo 0.88.0" />
 	<meta name="viewport" content="width=device-width, initial-scale=1">
 	<link rel="stylesheet" href="/assets/css/theme.css">
 	<link rel="alternate" href="/rss.xml" type="application/rss+xml" title="Pleasant Programmer">
@@ -58,11 +58,11 @@
 <p>Ideally, we shouldn&rsquo;t bother inputting the schedule information into GTFS. Only the route data is really important for jeeps and buses. However, the schedule information is required in the GTFS, and routing apps wouldn&rsquo;t work without it. So we have to add a reasonable trip schedule for jeeps and buses.</p>
 <p>The current GTFS data does define these trip schedules. We assume that jeeps and buses operate between 6:00AM and 11:00PM and a new jeep passes by every 10 minutes. Also, jeeps and buses are defined to only operate on weekdays.</p>
 <p>While there might be jeeps who change routes or don&rsquo;t operate on weekends, I&rsquo;m pretty sure that jeeps and buses run on weekends. We&rsquo;ll have to fix it ourselves temporarily since there&rsquo;s no central GTFS feed yet.</p>
-<div class="highlight"><pre style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-sh" data-lang="sh"><span style="color:#007f7f"># 724594 seems to be the service id used by jeeps and buses</span>
+<div class="highlight"><pre tabindex="0" style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-sh" data-lang="sh"><span style="color:#007f7f"># 724594 seems to be the service id used by jeeps and buses</span>
 sed -i .bak <span style="color:#0ff;font-weight:bold">&#39;/^724594/ s/0,0/1,1/&#39;</span> calendar.txt
 </code></pre></div><p>Another thing we could do is to adjust the time between buses, although the improvement is arguable. With the current 10 minutes between jeeps, it might provide some routes a significant advantage just because the timing is right. So you might get differing route suggestions depending on what time you planned the route. This makes sense when you&rsquo;re sure what the times are, so you can minimize the wait, but with jeeps, you never really know how long the wait will actually be.</p>
 <p>If we set the frequency to one minute, it <em>might</em> give better routes by eliminating the timing issue. Or not, it&rsquo;s kind of hard to tell.</p>
-<div class="highlight"><pre style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-sh" data-lang="sh"><span style="color:#007f7f"># jeep and bus route ids tend to start with 72</span>
+<div class="highlight"><pre tabindex="0" style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-sh" data-lang="sh"><span style="color:#007f7f"># jeep and bus route ids tend to start with 72</span>
 sed -i .bak <span style="color:#0ff;font-weight:bold">&#39;/^72/ s/,600/,60/&#39;</span> frequencies.txt
 </code></pre></div><p>Overall, the problems we&rsquo;re having is a symptom of the mismatch between our transit system and the GTFS. It would be great if our transit system gets better and we don&rsquo;t need to do hackish things for it to fit the GTFS, but that&rsquo;s still a dream. For now, all we can really do is fit a triangle into a square hole.</p>
 

+ 1 - 1
output/posts/jeepney-and-bus-routes.html

@@ -2,7 +2,7 @@
 <html lang="en-us">
 <head>
 	<meta charset="utf-8">
-	<meta name="generator" content="Hugo 0.69.2" />
+	<meta name="generator" content="Hugo 0.88.0" />
 	<meta name="viewport" content="width=device-width, initial-scale=1">
 	<link rel="stylesheet" href="/assets/css/theme.css">
 	<link rel="alternate" href="/rss.xml" type="application/rss+xml" title="Pleasant Programmer">

+ 1 - 1
output/posts/one-bus-or-maybe-jeep-away.html

@@ -2,7 +2,7 @@
 <html lang="en-us">
 <head>
 	<meta charset="utf-8">
-	<meta name="generator" content="Hugo 0.69.2" />
+	<meta name="generator" content="Hugo 0.88.0" />
 	<meta name="viewport" content="width=device-width, initial-scale=1">
 	<link rel="stylesheet" href="/assets/css/theme.css">
 	<link rel="alternate" href="/rss.xml" type="application/rss+xml" title="Pleasant Programmer">

+ 1 - 1
output/posts/open-trip-planner.html

@@ -2,7 +2,7 @@
 <html lang="en-us">
 <head>
 	<meta charset="utf-8">
-	<meta name="generator" content="Hugo 0.69.2" />
+	<meta name="generator" content="Hugo 0.88.0" />
 	<meta name="viewport" content="width=device-width, initial-scale=1">
 	<link rel="stylesheet" href="/assets/css/theme.css">
 	<link rel="alternate" href="/rss.xml" type="application/rss+xml" title="Pleasant Programmer">

+ 6 - 6
output/posts/openpreppad.html

@@ -2,7 +2,7 @@
 <html lang="en-us">
 <head>
 	<meta charset="utf-8">
-	<meta name="generator" content="Hugo 0.69.2" />
+	<meta name="generator" content="Hugo 0.88.0" />
 	<meta name="viewport" content="width=device-width, initial-scale=1">
 	<link rel="stylesheet" href="/assets/css/theme.css">
 	<link rel="alternate" href="/rss.xml" type="application/rss+xml" title="Pleasant Programmer">
@@ -77,7 +77,7 @@ to get my bluetooth mouse connected on Linux. The main thing I used then was
 <code>bluetoothctl</code> which is essentially a CLI for managing bluetooth devices so I
 started there.</p>
 <p>I started up <code>bluetoothctl</code> and turned on the Prep Pad. And it showed up!</p>
-<div class="highlight"><pre style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-text" data-lang="text">[bluetooth]# power on
+<div class="highlight"><pre tabindex="0" style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-text" data-lang="text">[bluetooth]# power on
 [CHG] Controller ... Class: 0x00010c
 Changing power on succeeded
 [CHG] Controller ... Powered: yes
@@ -87,7 +87,7 @@ Discovery started
 [CHG] Device 1C:BA:8C:21:7C:BB Name: CHSLEEV_00
 [CHG] Device 1C:BA:8C:21:7C:BB Alias: CHSLEEV_00
 </code></pre></div><p>I then connected to it, which was surprisingly easy.</p>
-<div class="highlight"><pre style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-text" data-lang="text">[bluetooth]# connect 1C:BA:8C:21:7C:BB
+<div class="highlight"><pre tabindex="0" style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-text" data-lang="text">[bluetooth]# connect 1C:BA:8C:21:7C:BB
 Attempting to connect to 1C:BA:8C:21:7C:BB
 [CHG] Device 1C:BA:8C:21:7C:BB Connected: yes
 [CHG] Device 1C:BA:8C:21:7C:BB Name: CH BTScale_00
@@ -99,7 +99,7 @@ those things were at that point.</p>
 <p>After a lot of poking around, I could check the general device information. You
 could get the hardware, software and firmware version. There&rsquo;s also the device
 serial number which was nowhere on the actual physical device.</p>
-<div class="highlight"><pre style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-text" data-lang="text">[CHSLEEV_00]# select-attribute /org/bluez/hci0/dev_1C_BA_8C_21_7C_BB/service0010/char0017
+<div class="highlight"><pre tabindex="0" style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-text" data-lang="text">[CHSLEEV_00]# select-attribute /org/bluez/hci0/dev_1C_BA_8C_21_7C_BB/service0010/char0017
 [CH BTScale_00:/service0010/char0017]# attribute-info
 Characteristic - Firmware Revision String
 	UUID: 00002a26-0000-1000-8000-00805f9b34fb
@@ -124,7 +124,7 @@ Attempting to read /org/bluez/hci0/dev_1C_BA_8C_21_7C_BB/service0010/char0017
 </code></pre></div><p>There was also a service which contained Accel Enable, Accel Range, Accel
 X-Coordinate, Accel Y-Coordinate, and Accel Z-Coordinate. I guess it stands for
 accelerometer, which is probably what it uses to weigh things.</p>
-<div class="highlight"><pre style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-text" data-lang="text">[CHSLEEV_00]# select-attribute /org/bluez/hci0/dev_1C_BA_8C_21_7C_BB/service0023/char0024/desc0026
+<div class="highlight"><pre tabindex="0" style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-text" data-lang="text">[CHSLEEV_00]# select-attribute /org/bluez/hci0/dev_1C_BA_8C_21_7C_BB/service0023/char0024/desc0026
 [CH BTScale_00:/service0023/char0024/desc0026]# read
 Attempting to read /org/bluez/hci0/dev_1C_BA_8C_21_7C_BB/service0023/char0024/desc0026
 [CHG] Attribute /org/bluez/hci0/dev_1C_BA_8C_21_7C_BB/service0023/char0024/desc0026 Value: 0x41
@@ -145,7 +145,7 @@ denied. I could however, notify on them. But that didn&rsquo;t yield anything as
 What I <em>could</em> read was Accel Enable, which was set to 00. I guess that means it
 was off. After writing 01 to Accel Enable, I found I could get values out of
 Accel X-Coordinate! Also, the green LED which was permanently on turned off.</p>
-<div class="highlight"><pre style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-text" data-lang="text">[CHSLEEV_00]# select-attribute /org/bluez/hci0/dev_1C_BA_8C_21_7C_BB/service0023/char0024
+<div class="highlight"><pre tabindex="0" style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-text" data-lang="text">[CHSLEEV_00]# select-attribute /org/bluez/hci0/dev_1C_BA_8C_21_7C_BB/service0023/char0024
 [CH BTScale_00:/service0023/char0024]# write 01
 Attempting to write /org/bluez/hci0/dev_1C_BA_8C_21_7C_BB/service0023/char0024
 [CH BTScale_00:/service0023/char0024]# select-attribute /org/bluez/hci0/dev_1C_BA_8C_21_7C_BB/service0023/char002a

+ 1 - 1
output/posts/philippine-transit-app-challenge.html

@@ -2,7 +2,7 @@
 <html lang="en-us">
 <head>
 	<meta charset="utf-8">
-	<meta name="generator" content="Hugo 0.69.2" />
+	<meta name="generator" content="Hugo 0.88.0" />
 	<meta name="viewport" content="width=device-width, initial-scale=1">
 	<link rel="stylesheet" href="/assets/css/theme.css">
 	<link rel="alternate" href="/rss.xml" type="application/rss+xml" title="Pleasant Programmer">

+ 1 - 1
output/posts/removing-pldtmydslbiz-from-the-zyxel-p-2612hnu.html

@@ -2,7 +2,7 @@
 <html lang="en-us">
 <head>
 	<meta charset="utf-8">
-	<meta name="generator" content="Hugo 0.69.2" />
+	<meta name="generator" content="Hugo 0.88.0" />
 	<meta name="viewport" content="width=device-width, initial-scale=1">
 	<link rel="stylesheet" href="/assets/css/theme.css">
 	<link rel="alternate" href="/rss.xml" type="application/rss+xml" title="Pleasant Programmer">

+ 29 - 29
output/posts/rss.xml

@@ -143,7 +143,7 @@ to get my bluetooth mouse connected on Linux. The main thing I used then was
 &lt;code&gt;bluetoothctl&lt;/code&gt; which is essentially a CLI for managing bluetooth devices so I
 started there.&lt;/p&gt;
 &lt;p&gt;I started up &lt;code&gt;bluetoothctl&lt;/code&gt; and turned on the Prep Pad. And it showed up!&lt;/p&gt;
-&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;[bluetooth]# power on
+&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;[bluetooth]# power on
 [CHG] Controller ... Class: 0x00010c
 Changing power on succeeded
 [CHG] Controller ... Powered: yes
@@ -153,7 +153,7 @@ Discovery started
 [CHG] Device 1C:BA:8C:21:7C:BB Name: CHSLEEV_00
 [CHG] Device 1C:BA:8C:21:7C:BB Alias: CHSLEEV_00
 &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;I then connected to it, which was surprisingly easy.&lt;/p&gt;
-&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;[bluetooth]# connect 1C:BA:8C:21:7C:BB
+&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;[bluetooth]# connect 1C:BA:8C:21:7C:BB
 Attempting to connect to 1C:BA:8C:21:7C:BB
 [CHG] Device 1C:BA:8C:21:7C:BB Connected: yes
 [CHG] Device 1C:BA:8C:21:7C:BB Name: CH BTScale_00
@@ -165,7 +165,7 @@ those things were at that point.&lt;/p&gt;
 &lt;p&gt;After a lot of poking around, I could check the general device information. You
 could get the hardware, software and firmware version. There&amp;rsquo;s also the device
 serial number which was nowhere on the actual physical device.&lt;/p&gt;
-&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;[CHSLEEV_00]# select-attribute /org/bluez/hci0/dev_1C_BA_8C_21_7C_BB/service0010/char0017
+&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;[CHSLEEV_00]# select-attribute /org/bluez/hci0/dev_1C_BA_8C_21_7C_BB/service0010/char0017
 [CH BTScale_00:/service0010/char0017]# attribute-info
 Characteristic - Firmware Revision String
 	UUID: 00002a26-0000-1000-8000-00805f9b34fb
@@ -190,7 +190,7 @@ Attempting to read /org/bluez/hci0/dev_1C_BA_8C_21_7C_BB/service0010/char0017
 &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;There was also a service which contained Accel Enable, Accel Range, Accel
 X-Coordinate, Accel Y-Coordinate, and Accel Z-Coordinate. I guess it stands for
 accelerometer, which is probably what it uses to weigh things.&lt;/p&gt;
-&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;[CHSLEEV_00]# select-attribute /org/bluez/hci0/dev_1C_BA_8C_21_7C_BB/service0023/char0024/desc0026
+&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;[CHSLEEV_00]# select-attribute /org/bluez/hci0/dev_1C_BA_8C_21_7C_BB/service0023/char0024/desc0026
 [CH BTScale_00:/service0023/char0024/desc0026]# read
 Attempting to read /org/bluez/hci0/dev_1C_BA_8C_21_7C_BB/service0023/char0024/desc0026
 [CHG] Attribute /org/bluez/hci0/dev_1C_BA_8C_21_7C_BB/service0023/char0024/desc0026 Value: 0x41
@@ -211,7 +211,7 @@ denied. I could however, notify on them. But that didn&amp;rsquo;t yield anythin
 What I &lt;em&gt;could&lt;/em&gt; read was Accel Enable, which was set to 00. I guess that means it
 was off. After writing 01 to Accel Enable, I found I could get values out of
 Accel X-Coordinate! Also, the green LED which was permanently on turned off.&lt;/p&gt;
-&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;[CHSLEEV_00]# select-attribute /org/bluez/hci0/dev_1C_BA_8C_21_7C_BB/service0023/char0024
+&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;[CHSLEEV_00]# select-attribute /org/bluez/hci0/dev_1C_BA_8C_21_7C_BB/service0023/char0024
 [CH BTScale_00:/service0023/char0024]# write 01
 Attempting to write /org/bluez/hci0/dev_1C_BA_8C_21_7C_BB/service0023/char0024
 [CH BTScale_00:/service0023/char0024]# select-attribute /org/bluez/hci0/dev_1C_BA_8C_21_7C_BB/service0023/char002a
@@ -266,7 +266,7 @@ By default, we use UTF-8 for text storage and rendering. A problem is that brows
 &lt;p&gt;By default, we use UTF-8 for text storage and rendering. A problem is that browsers don&amp;rsquo;t assume UTF-8 as the default and you need to have either a &lt;code&gt;&amp;lt;meta charset=&amp;quot;utf-8&amp;quot; /&amp;gt;&lt;/code&gt; in the HTML or &lt;code&gt;Content-Type: text/html; charset=utf-8&lt;/code&gt; in the headers. A few of our services don&amp;rsquo;t set the &lt;code&gt;Content-Type&lt;/code&gt; with the &lt;code&gt;charset=utf-8&lt;/code&gt; part so you&amp;rsquo;d get piñata instead of piñata.&lt;/p&gt;
 &lt;p&gt;Being lazy, we usually just correct this at the reverse proxy side. It&amp;rsquo;s trivial to do in nginx. You just need to add &lt;code&gt;charset utf-8;&lt;/code&gt; to your configuration and you&amp;rsquo;re good. For haproxy though, I couldn&amp;rsquo;t readily find a solution for it and had to go through the docs to see what I could do.&lt;/p&gt;
 &lt;p&gt;After a bit of experimenting, I had success with this:&lt;/p&gt;
-&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;# set content-type to utf-8 if not already
+&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;# set content-type to utf-8 if not already
 acl has_charset hdr_sub(content-type) -i charset=
 rspirep (Content-Type.*) \1;\ charset=utf-8 unless has_charset
 &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This is probably not the best way to do it. Arguably, we should just fix our services to have the correct &lt;code&gt;Content-Type&lt;/code&gt; in the first place, but I can do that some other time.&lt;/p&gt;
@@ -287,7 +287,7 @@ Now the problem is that Cloudflare can put you behind any IP they own, which is
 &lt;p&gt;A few months after we started beta testing the app, Cloudflare added more IPs to their range. Unfortunately, our server got moved to those new IPs which were not whitelisted yet. Apparently, the telco whitelisting process was incredibly convoluted and time consuming. Our client didn&amp;rsquo;t want to bother asking them to whitelist more IPs. We also tried asking Cloudflare to move us back to the original IP range, but they could only do that if we were in their enterprise tier. We couldn&amp;rsquo;t really afford that, so we looked for other options.&lt;/p&gt;
 &lt;p&gt;Since Cloudflare was essentially just a giant reverse proxy, theoretically there should be no distinction between one IP address from another. The specific IP we get is probably just for load balancing. So we tried accessing the IPs in the range directly and just setting the Host header and it worked! But we get SSL errors because the IP itself doesn&amp;rsquo;t have its own certificate.&lt;/p&gt;
 &lt;p&gt;After more testing, we figured out that you could actually use any Cloudflare backed domain so long as we properly set the Host header. We just needed to find one still in the old range. Coincidentally, 4chan.org was. Which led to this wonderful commit&lt;/p&gt;
-&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-diff&#34; data-lang=&#34;diff&#34;&gt;commit 123456789abcdef
+&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-diff&#34; data-lang=&#34;diff&#34;&gt;commit 123456789abcdef
 Author: ~~~~~~
 Date:   ~~~~~~
 
@@ -334,15 +334,15 @@ Date:   ~~~~~~
 &lt;p&gt;To support TiddlyWiki5, we&amp;rsquo;ll need a version of the wiki which has the TiddlyWeb plugin already installed and configured. After that, some tweaking is necessary to get TiddlyWeb to provide what the wiki requires.&lt;/p&gt;
 &lt;h2 id=&#34;setting-up-tiddlywiki&#34;&gt;Setting Up TiddlyWiki&lt;/h2&gt;
 &lt;p&gt;TiddlyWiki5 provides a command line tool via &lt;code&gt;npm&lt;/code&gt; that allows building custom versions of the wiki. In fact, it comes with templates, called &amp;ldquo;editions&amp;rdquo;, that we can use for our setup. Assuming you already have it installed, create the wiki using&lt;/p&gt;
-&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;tiddlywiki mywiki --init tw5tank          &lt;span style=&#34;color:#007f7f&#34;&gt;# create wiki from template&lt;/span&gt;
+&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;tiddlywiki mywiki --init tw5tank          &lt;span style=&#34;color:#007f7f&#34;&gt;# create wiki from template&lt;/span&gt;
 &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This creates a wiki intended for use with &lt;a href=&#34;https://tank.peermore.com/&#34;&gt;Tank&lt;/a&gt;, which is built on top of TiddlyWeb. From here, you should look in &lt;code&gt;mywiki/tiddlers/system&lt;/code&gt; which contain the entries for &lt;code&gt;SiteTitle&lt;/code&gt;, &lt;code&gt;SiteSubtitle&lt;/code&gt;, &lt;code&gt;DefaultTiddlers&lt;/code&gt;, and &lt;code&gt;tiddlyweb-host&lt;/code&gt;. The first 3 should be configured however you want. These are necessary because they&amp;rsquo;re needed before the wiki can load them from the server. &lt;code&gt;tiddlyweb-host&lt;/code&gt; contains the location of the TiddlyWeb server, this should be &lt;code&gt;http://localhost:8080/&lt;/code&gt; if you&amp;rsquo;re just testing locally. With everything configured, you can build the new wiki by running&lt;/p&gt;
-&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;tiddlywiki mywiki --build
+&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;tiddlywiki mywiki --build
 &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This will output the wiki to &lt;code&gt;mywiki/output/tw5tank.html&lt;/code&gt;. You can now serve it using your favorite local webserver, like &lt;code&gt;python -m http.server&lt;/code&gt;.&lt;/p&gt;
 &lt;h2 id=&#34;setting-up-tiddlyweb&#34;&gt;Setting Up TiddlyWeb&lt;/h2&gt;
 &lt;p&gt;The TiddlyWeb tutorial recommends using &lt;code&gt;tiddlywebwiki&lt;/code&gt; which has all the plugins setup for a nice wiki instance for the old TiddlyWiki. It has a lot of features that aren&amp;rsquo;t really needed, so we won&amp;rsquo;t go with that. So first, we&amp;rsquo;ll need to install TiddlyWeb and any plugins we might want to use.&lt;/p&gt;
-&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;pip install tiddlyweb tiddlywebplugins.status tiddlywebplugins.cherrypy tiddlywebplugins.cors
+&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;pip install tiddlyweb tiddlywebplugins.status tiddlywebplugins.cherrypy tiddlywebplugins.cors
 &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Next, we&amp;rsquo;ll need the tiddlyweb configuration in &lt;code&gt;tiddlywebconfig.py&lt;/code&gt;&lt;/p&gt;
-&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;color:#007f7f&#34;&gt;# A basic configuration.&lt;/span&gt;
+&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;color:#007f7f&#34;&gt;# A basic configuration.&lt;/span&gt;
 &lt;span style=&#34;color:#007f7f&#34;&gt;# `pydoc tiddlyweb.config` for details on configuration items.&lt;/span&gt;
 
 &lt;span style=&#34;color:#fff;font-weight:bold&#34;&gt;import&lt;/span&gt; tiddlywebplugins.status
@@ -351,7 +351,7 @@ config = {
     &lt;span style=&#34;color:#0ff;font-weight:bold&#34;&gt;&amp;#39;system_plugins&amp;#39;&lt;/span&gt;: [&lt;span style=&#34;color:#0ff;font-weight:bold&#34;&gt;&amp;#39;tiddlywebplugins.status&amp;#39;&lt;/span&gt;, &lt;span style=&#34;color:#0ff;font-weight:bold&#34;&gt;&amp;#39;tiddlywebplugins.cors&amp;#39;&lt;/span&gt;],
     &lt;span style=&#34;color:#0ff;font-weight:bold&#34;&gt;&amp;#39;secret&amp;#39;&lt;/span&gt;: &lt;span style=&#34;color:#0ff;font-weight:bold&#34;&gt;&amp;#39;36c98d6d14618c79f0ed2d49cd1b9e272d8d4bd0&amp;#39;&lt;/span&gt;,
     &lt;span style=&#34;color:#0ff;font-weight:bold&#34;&gt;&amp;#39;wsgi_server&amp;#39;&lt;/span&gt;: &lt;span style=&#34;color:#0ff;font-weight:bold&#34;&gt;&amp;#39;tiddlywebplugins.cherrypy&amp;#39;&lt;/span&gt;,
-    &lt;span style=&#34;color:#0ff;font-weight:bold&#34;&gt;&amp;#39;cors.enable_non_simple&amp;#39;&lt;/span&gt;: True
+    &lt;span style=&#34;color:#0ff;font-weight:bold&#34;&gt;&amp;#39;cors.enable_non_simple&amp;#39;&lt;/span&gt;: &lt;span style=&#34;color:#fff;font-weight:bold&#34;&gt;True&lt;/span&gt;
 }
 
 original_gather_data = tiddlywebplugins.status._gather_data
@@ -370,7 +370,7 @@ tiddlywebplugins.status._gather_data = _status_gather_data
 &lt;li&gt;using cors since we&amp;rsquo;re not hosting the wiki itself on the same server&lt;/li&gt;
 &lt;/ul&gt;
 &lt;p&gt;With that, we just need to create the store that will hold our data&lt;/p&gt;
-&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;twanager recipe default &lt;span style=&#34;color:#0ff;font-weight:bold&#34;&gt;&amp;lt;&amp;lt;EOF
+&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;twanager recipe default &lt;span style=&#34;color:#0ff;font-weight:bold&#34;&gt;&amp;lt;&amp;lt;EOF
 &lt;/span&gt;&lt;span style=&#34;color:#0ff;font-weight:bold&#34;&gt;desc: standard TiddlyWebWiki environment
 &lt;/span&gt;&lt;span style=&#34;color:#0ff;font-weight:bold&#34;&gt;policy: {&amp;#34;read&amp;#34;: [], &amp;#34;create&amp;#34;: [], &amp;#34;manage&amp;#34;: [&amp;#34;R:ADMIN&amp;#34;], &amp;#34;accept&amp;#34;: [], &amp;#34;write&amp;#34;: [&amp;#34;R:ADMIN&amp;#34;], &amp;#34;owner&amp;#34;: &amp;#34;administrator&amp;#34;, &amp;#34;delete&amp;#34;: [&amp;#34;R:ADMIN&amp;#34;]}
 &lt;/span&gt;&lt;span style=&#34;color:#0ff;font-weight:bold&#34;&gt;
@@ -381,7 +381,7 @@ twanager bag default &lt;span style=&#34;color:#0ff;font-weight:bold&#34;&gt;&am
 &lt;/span&gt;&lt;span style=&#34;color:#0ff;font-weight:bold&#34;&gt;{&amp;#34;policy&amp;#34;: {&amp;#34;read&amp;#34;: [], &amp;#34;create&amp;#34;: [], &amp;#34;manage&amp;#34;: [&amp;#34;R:ADMIN&amp;#34;], &amp;#34;accept&amp;#34;: [], &amp;#34;write&amp;#34;: [], &amp;#34;owner&amp;#34;: &amp;#34;administrator&amp;#34;, &amp;#34;delete&amp;#34;: []}}
 &lt;/span&gt;&lt;span style=&#34;color:#0ff;font-weight:bold&#34;&gt;EOF&lt;/span&gt;
 &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Finally, we can start the TiddlyWeb server&lt;/p&gt;
-&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;twanager server
+&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;twanager server
 &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;putting-it-all-together&#34;&gt;Putting it all together&lt;/h2&gt;
 &lt;p&gt;Once you have the TiddlyWeb server running, you can just go to wherever you&amp;rsquo;re hosting the wiki html and it should work. You can try creating some posts, and the check mark on the sidebar should be red for a while and then turn black. Once that&amp;rsquo;s done it&amp;rsquo;s saved. You can refresh your browser and your posts should still be there.&lt;/p&gt;
 &lt;p&gt;At this point, you can start customizing your TiddlyWeb instance, by changing your store to something like a database, or adding authorization. You can also tweak the server setup so you won&amp;rsquo;t need CORS anymore.&lt;/p&gt;
@@ -446,10 +446,10 @@ We normally leave the servers on QWERTY. After all, most people start off as QWE
 &lt;p&gt;I googled around for solutions and came across &lt;a href=&#34;http://superuser.com/questions/548234/how-can-i-easily-toggle-between-dvorak-and-qwerty-keyboard-layouts-from-a-linux&#34;&gt;a nice idea&lt;/a&gt;. You could alias &lt;code&gt;asdf&lt;/code&gt; to load the DVORAK mapping and &lt;code&gt;aoeu&lt;/code&gt; (the equivalent to asdf in DVORAK) to load the QWERTY mapping. This actually makes sense since you don&amp;rsquo;t really have to know where the letters are. The only problem is, you once again have to be logged in to change the key mappings.&lt;/p&gt;
 &lt;p&gt;After some further searching, I found &lt;a href=&#34;http://unix.stackexchange.com/questions/2884/toggle-between-dvorak-and-qwerty&#34;&gt;something close to what I wanted&lt;/a&gt;. Apparently, Alt+Up sends a KeyboardSignal keycode to the init process, which can act on that. It also works anywhere, even before being logged in. For SysVinit systems, you can just add a line to your inittab for a command to be run when Alt+Up is pressed.&lt;/p&gt;
 &lt;p&gt;In the office, however, we generally use Arch Linux which uses SystemD. But apparently, it also has a mechanism of accepting the Alt+Up press. It runs the kbrequest target whenever it gets the keypress. &lt;code&gt;kbrequest.target&lt;/code&gt; is normally aliased to run the rescue service though, so you have to manually create the file in &lt;code&gt;/etc/systemd/system/kbrequest.target&lt;/code&gt; and fill it with a description:&lt;/p&gt;
-&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-ini&#34; data-lang=&#34;ini&#34;&gt;&lt;span style=&#34;color:#fff;font-weight:bold&#34;&gt;[Unit]&lt;/span&gt;
+&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-ini&#34; data-lang=&#34;ini&#34;&gt;&lt;span style=&#34;color:#fff;font-weight:bold&#34;&gt;[Unit]&lt;/span&gt;
 &lt;span style=&#34;color:#007f7f&#34;&gt;Description&lt;/span&gt;=&lt;span style=&#34;color:#0ff;font-weight:bold&#34;&gt;kbrequest target&lt;/span&gt;
 &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;We can then add a service to be run whenever the target is called. Something like &lt;code&gt;/etc/systemd/system/keymap-switch.service&lt;/code&gt;:&lt;/p&gt;
-&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-ini&#34; data-lang=&#34;ini&#34;&gt;&lt;span style=&#34;color:#fff;font-weight:bold&#34;&gt;[Unit]&lt;/span&gt;
+&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-ini&#34; data-lang=&#34;ini&#34;&gt;&lt;span style=&#34;color:#fff;font-weight:bold&#34;&gt;[Unit]&lt;/span&gt;
 &lt;span style=&#34;color:#007f7f&#34;&gt;Description&lt;/span&gt;=&lt;span style=&#34;color:#0ff;font-weight:bold&#34;&gt;Keymap Switch Service&lt;/span&gt;
 
 &lt;span style=&#34;color:#fff;font-weight:bold&#34;&gt;[Service]&lt;/span&gt;
@@ -459,7 +459,7 @@ We normally leave the servers on QWERTY. After all, most people start off as QWE
 &lt;span style=&#34;color:#fff;font-weight:bold&#34;&gt;[Install]&lt;/span&gt;
 &lt;span style=&#34;color:#007f7f&#34;&gt;WantedBy&lt;/span&gt;=&lt;span style=&#34;color:#0ff;font-weight:bold&#34;&gt;kbrequest.target&lt;/span&gt;
 &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;After enabling said service, we only need the actual keymap switcher, &lt;code&gt;/usr/local/bin/keymap-switch&lt;/code&gt;. The StackOverflow answer provides different ways of detecting the current keymap so we know which one to switch to. Since we&amp;rsquo;re using SystemD, we can use that instead for managing which keymap we&amp;rsquo;re actually using. It stores the current settings inside &lt;code&gt;/etc/vconsole.conf&lt;/code&gt;. We can also then switch keymaps by using &lt;code&gt;localectl set-keymap&lt;/code&gt;.&lt;/p&gt;
-&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;color:#0f0;font-weight:bold&#34;&gt;#!/bin/sh
+&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;color:#0f0;font-weight:bold&#34;&gt;#!/bin/sh
 &lt;/span&gt;&lt;span style=&#34;color:#0f0;font-weight:bold&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#fff;font-weight:bold&#34;&gt;source&lt;/span&gt; /etc/vconsole.conf
 
 &lt;span style=&#34;color:#fff;font-weight:bold&#34;&gt;if&lt;/span&gt; [ &lt;span style=&#34;color:#0ff;font-weight:bold&#34;&gt;&amp;#34;&lt;/span&gt;$TERM&lt;span style=&#34;color:#0ff;font-weight:bold&#34;&gt;&amp;#34;&lt;/span&gt; = &lt;span style=&#34;color:#0ff;font-weight:bold&#34;&gt;&amp;#34;dumb&amp;#34;&lt;/span&gt; ]; &lt;span style=&#34;color:#fff;font-weight:bold&#34;&gt;then&lt;/span&gt;
@@ -506,11 +506,11 @@ The GTFS spec defines 2 ways of statically specifying trip schedules. You can de
 &lt;p&gt;Ideally, we shouldn&amp;rsquo;t bother inputting the schedule information into GTFS. Only the route data is really important for jeeps and buses. However, the schedule information is required in the GTFS, and routing apps wouldn&amp;rsquo;t work without it. So we have to add a reasonable trip schedule for jeeps and buses.&lt;/p&gt;
 &lt;p&gt;The current GTFS data does define these trip schedules. We assume that jeeps and buses operate between 6:00AM and 11:00PM and a new jeep passes by every 10 minutes. Also, jeeps and buses are defined to only operate on weekdays.&lt;/p&gt;
 &lt;p&gt;While there might be jeeps who change routes or don&amp;rsquo;t operate on weekends, I&amp;rsquo;m pretty sure that jeeps and buses run on weekends. We&amp;rsquo;ll have to fix it ourselves temporarily since there&amp;rsquo;s no central GTFS feed yet.&lt;/p&gt;
-&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;color:#007f7f&#34;&gt;# 724594 seems to be the service id used by jeeps and buses&lt;/span&gt;
+&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;color:#007f7f&#34;&gt;# 724594 seems to be the service id used by jeeps and buses&lt;/span&gt;
 sed -i .bak &lt;span style=&#34;color:#0ff;font-weight:bold&#34;&gt;&amp;#39;/^724594/ s/0,0/1,1/&amp;#39;&lt;/span&gt; calendar.txt
 &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Another thing we could do is to adjust the time between buses, although the improvement is arguable. With the current 10 minutes between jeeps, it might provide some routes a significant advantage just because the timing is right. So you might get differing route suggestions depending on what time you planned the route. This makes sense when you&amp;rsquo;re sure what the times are, so you can minimize the wait, but with jeeps, you never really know how long the wait will actually be.&lt;/p&gt;
 &lt;p&gt;If we set the frequency to one minute, it &lt;em&gt;might&lt;/em&gt; give better routes by eliminating the timing issue. Or not, it&amp;rsquo;s kind of hard to tell.&lt;/p&gt;
-&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;color:#007f7f&#34;&gt;# jeep and bus route ids tend to start with 72&lt;/span&gt;
+&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;color:#007f7f&#34;&gt;# jeep and bus route ids tend to start with 72&lt;/span&gt;
 sed -i .bak &lt;span style=&#34;color:#0ff;font-weight:bold&#34;&gt;&amp;#39;/^72/ s/,600/,60/&amp;#39;&lt;/span&gt; frequencies.txt
 &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Overall, the problems we&amp;rsquo;re having is a symptom of the mismatch between our transit system and the GTFS. It would be great if our transit system gets better and we don&amp;rsquo;t need to do hackish things for it to fit the GTFS, but that&amp;rsquo;s still a dream. For now, all we can really do is fit a triangle into a square hole.&lt;/p&gt;
 </content:encoded>
@@ -530,7 +530,7 @@ OTP couldn&amp;rsquo;t possibly be that dumb though, so there must be something
 &lt;p&gt;This is just so hilariously wrong. It&amp;rsquo;s much simpler to just walk along Katipunan Avenue.&lt;/p&gt;
 &lt;p&gt;OTP couldn&amp;rsquo;t possibly be that dumb though, so there must be something we&amp;rsquo;re doing wrong. If you notice, Katipunan Avenue is colored red compared to the other streets. OTP seems to be avoiding any path that goes along Katipunan Avenue. The problem might have something to do with the &amp;ldquo;road type&amp;rdquo; designated to Katipunan.&lt;/p&gt;
 &lt;p&gt;Apparently, by default OTP will consider roads of type &lt;code&gt;trunk&lt;/code&gt; to be non-walkable and non-bikable. This is documented in the &lt;a href=&#34;http://wiki.openstreetmap.org/wiki/OpenTripPlanner&#34;&gt;OpenStreetMap wiki&lt;/a&gt; and the &lt;a href=&#34;https://github.com/openplans/OpenTripPlanner/wiki/GraphBuilder#permissions-and-bicycle-safety&#34;&gt;OTP wiki&lt;/a&gt; as well. There are actually multiple ways to go about this then. The first solution that came to mind was to just edit the original OSM XML file.&lt;/p&gt;
-&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;sed -i .bak s/trunk/primary/g manila.osm
+&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;sed -i .bak s/trunk/primary/g manila.osm
 &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;And rebuild the graph. It doesn&amp;rsquo;t really matter much because the OSM data isn&amp;rsquo;t used to render the maps. It&amp;rsquo;s just used to build the routing data. This is actually what I did for &lt;a href=&#34;http://maps.pleasantprogrammer.com&#34;&gt;maps.pleasantprogrammer.com&lt;/a&gt;.&lt;/p&gt;
 &lt;p&gt;It&amp;rsquo;s also possible to set the default way properties in OTP. Instead of disallowing walking and biking on &lt;code&gt;highway=trunk&lt;/code&gt; we could allow that. This is not much better than the &lt;code&gt;sed&lt;/code&gt; solution though. It&amp;rsquo;s better since you keep the weighting done by OTP, but you&amp;rsquo;re still saying that all trunks are walkable which might not be the case.&lt;/p&gt;
 &lt;p&gt;The most correct way to actually fix this is to go through each of the trunks and specifying &lt;code&gt;foot=yes&lt;/code&gt; and &lt;code&gt;bicycle=yes&lt;/code&gt; for those trunks that are actually walkable. You could either do this locally with the dumped data, or contribute it directly to OSM. I&amp;rsquo;m not sure on the particulars with updating OSM though.&lt;/p&gt;
@@ -549,7 +549,7 @@ The 5 minute tutorial actually discusses the elevation data briefly, but a more
 &lt;p&gt;One thing I hadn&amp;rsquo;t tested out last time was OTP&amp;rsquo;s support for elevation data. It makes use of this by showing the elevation you have to traverse while walking along the suggested route. It can also take it into account when suggesting bike routes.&lt;/p&gt;
 &lt;p&gt;The &lt;a href=&#34;https://github.com/openplans/OpenTripPlanner/wiki/FiveMinutes&#34;&gt;5 minute tutorial&lt;/a&gt; actually discusses the elevation data briefly, but a more in-depth thing you can look at is the &lt;a href=&#34;https://github.com/openplans/OpenTripPlanner/wiki/GraphBuilder#elevation-data&#34;&gt;GraphBuilder documentation&lt;/a&gt;. It suggests using the ASTER dataset which is free but requires registration. I just opted to use the SRTM data available from the &lt;a href=&#34;http://www.philgis.org/freegisdata.htm&#34;&gt;PhilGIS website&lt;/a&gt;.&lt;/p&gt;
 &lt;p&gt;I don&amp;rsquo;t know about the ASTER dataset, but the PhilGIS data was in the ERDAS img format. OTP only supports GeoTIFF so there was a need to convert it beforehand. You can use &lt;a href=&#34;http://www.gdal.org/&#34;&gt;GDAL&lt;/a&gt; for this. You&amp;rsquo;d just then run,&lt;/p&gt;
-&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;gdal_translate srtm41_90m_phl.img phil.tiff
+&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;gdal_translate srtm41_90m_phl.img phil.tiff
 &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Afterwards, it&amp;rsquo;s just a matter of following the OTP instructions on using a local elevation dataset. The process actually doubled the size of the generated Graph.obj so it might not be ideal if you&amp;rsquo;re running on limited RAM.&lt;/p&gt;
 &lt;p&gt;I&amp;rsquo;ve actually hosted a &lt;a href=&#34;http://maps.pleasantprogrammer.com&#34;&gt;working example&lt;/a&gt;. It&amp;rsquo;s pretty much at the limits of the RAM so it might be slow and unreliable, but you can test it out just for fun. Please don&amp;rsquo;t abuse it though.&lt;/p&gt;
 </content:encoded>
@@ -603,11 +603,11 @@ The phone app is actually quite simple. It allows you to capture a trip, which w
       <guid>https://pleasantprogrammer.com/posts/fare-data.html</guid>
       <description>As part of the data released by the DOTC, we also have the fare matrix for aircon buses, ordinary buses and jeeps. All as wonderful images. The data is also actually available from the LTFRB website. Generally, the fare scheme is represented as &amp;ldquo;pay X pesos for the first Y kilometers, pay Z for every succeeding kilometer.&amp;rdquo; Instead of a table, we can simply represent this as a formula instead,</description>
       <content:encoded>&lt;p&gt;As part of the data released by the DOTC, we also have the &lt;a href=&#34;http://philippine-transit.hackathome.com/dataset-philippines-transit-information-service-gtfs/&#34;&gt;fare matrix&lt;/a&gt; for aircon buses, ordinary buses and jeeps. All as wonderful images. The data is also actually available from the &lt;a href=&#34;http://ltfrb.gov.ph/main/farerates&#34;&gt;LTFRB website&lt;/a&gt;. Generally, the fare scheme is represented as &amp;ldquo;pay &lt;em&gt;X&lt;/em&gt; pesos for the first &lt;em&gt;Y&lt;/em&gt; kilometers, pay &lt;em&gt;Z&lt;/em&gt; for every succeeding kilometer.&amp;rdquo; Instead of a table, we can simply represent this as a formula instead,&lt;/p&gt;
-&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;base_fare + (distance - initial) * per_km
+&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;base_fare + (distance - initial) * per_km
 &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The relevant values for the three services are:&lt;/p&gt;
 &lt;!-- raw HTML omitted --&gt;
 &lt;p&gt;It isn&amp;rsquo;t as simple as that though. Fares are also rounded to the nearest 25 centavos. So we&amp;rsquo;d need to round them off correctly. This can be achieved by doing,&lt;/p&gt;
-&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;round(calculated_fare * 4.0)/4.0
+&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;round(calculated_fare * 4.0)/4.0
 &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;There&amp;rsquo;s also the discounted fare for students, senior citizens and persons with disability. They get 20% off the fare (prior to rounding) and the resulting fare is rounded off as well.&lt;/p&gt;
 &lt;p&gt;Doing just this, we actually do get the same results as the fare matrices in the image for the most part. There are some discrepancies with the discounted jeep fares. I&amp;rsquo;ve tried to resolve it by tweaking around with the formulas, but it really doesn&amp;rsquo;t make sense in any way. I presume these were manually adjusted for one reason or another.&lt;/p&gt;
 &lt;p&gt;Here&amp;rsquo;s a &lt;a href=&#34;../uploads/farematrix.rb&#34;&gt;script&lt;/a&gt; that generates CSVs of all the three fare matrices. If you&amp;rsquo;re too lazy to run it, here are links to the &lt;a href=&#34;../uploads/pub_aircon.csv&#34;&gt;aircon bus&lt;/a&gt;, &lt;a href=&#34;../uploads/pub_ordinary.csv&#34;&gt;ordinary bus&lt;/a&gt; and &lt;a href=&#34;../uploads/puj.csv&#34;&gt;jeep&lt;/a&gt; fare matrices.&lt;/p&gt;
@@ -620,7 +620,7 @@ The phone app is actually quite simple. It allows you to capture a trip, which w
 &lt;p&gt;We also don&amp;rsquo;t know if the jeeps or buses strictly follow the distance-based scheme. After all, if you can get on and off anywhere, you can&amp;rsquo;t really measure distance that exactly. I assume they generally work off the notion of &amp;ldquo;zones&amp;rdquo; than actual distance travelled. In that sense, they work more similarly to the LRT which has fares based on how many stops you pass. For jeeps and buses, your fare is probably based more on how many &amp;ldquo;zones&amp;rdquo; you pass through.&lt;/p&gt;
 &lt;h3 id=&#34;conclusion&#34;&gt;Conclusion&lt;/h3&gt;
 &lt;p&gt;Philip, a co-worker of mine at By Implication, had suggested that we might want to use a different model than what the GTFS proposes. I have to agree with him. At this point, the GTFS doesn&amp;rsquo;t really fit with our system. But I do think that open data and standards are great. In fact, I applaud the developers who made proposals for the fare system, as those are great first steps towards making the GTFS a more universal standard.&lt;/p&gt;
-&lt;p&gt;Side note: I&amp;rsquo;d also actually really like to hear about the DOTC developers&amp;rsquo; experience with the project. It would be nice if they had a devblog.&lt;/p&gt;
+&lt;p&gt;Side note: I&amp;rsquo;d also actually really like to hear about the DOTC developers&#39; experience with the project. It would be nice if they had a devblog.&lt;/p&gt;
 </content:encoded>
     </item>
     
@@ -642,14 +642,14 @@ When I first saw the source of GTFS Editor, I was ecstatic. They used Play frame
 &lt;p&gt;I&amp;rsquo;ll be splitting the next section up into 2 parts. In the first pass, I&amp;rsquo;ll talk about what I did to just get the app to run but I won&amp;rsquo;t try hard to fix any bugs. This generally is what I do when I try to get apps to run. I&amp;rsquo;ll also be dropping enough information so that you can actually figure out what the real problem is. In the second pass, I&amp;rsquo;ll explain what the problems were and how I fixed them.&lt;/p&gt;
 &lt;h3 id=&#34;first-pass&#34;&gt;First Pass&lt;/h3&gt;
 &lt;p&gt;A thing to note about Play (and one of the reasons it&amp;rsquo;s a lovely Java framework) is that you don&amp;rsquo;t need to do manual compilation. Just edit some source files, refresh your browser and it will automatically do the compilation for you. One less argument for using PHP. It even shows you (in the browser!) the source and which line of code caused the compilation error. So that&amp;rsquo;s what I saw, &lt;code&gt;Error: type Check already defined&lt;/code&gt;&lt;/p&gt;
-&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;@Retention(RetentionPolicy.&lt;span style=&#34;color:#007f7f&#34;&gt;RUNTIME&lt;/span&gt;)
+&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;@Retention(RetentionPolicy.&lt;span style=&#34;color:#007f7f&#34;&gt;RUNTIME&lt;/span&gt;)
 @Target({ElementType.&lt;span style=&#34;color:#007f7f&#34;&gt;METHOD&lt;/span&gt;, ElementType.&lt;span style=&#34;color:#007f7f&#34;&gt;TYPE&lt;/span&gt;})
 &lt;span style=&#34;color:#fff;font-weight:bold&#34;&gt;public&lt;/span&gt; @interface Check { &lt;span style=&#34;color:#007f7f&#34;&gt;// error here
 &lt;/span&gt;&lt;span style=&#34;color:#007f7f&#34;&gt;&lt;/span&gt;
     String[] value();
 }
 &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;You also know that typical behavior among programmers where your program doesn&amp;rsquo;t compile, but you keep trying to compile it anyway hoping that it will magically just work. That&amp;rsquo;s what I did, and it actually ran. I couldn&amp;rsquo;t really just let this pass, so I decided to try deleting &lt;code&gt;Check.java&lt;/code&gt;. I got another compilation error, &lt;code&gt;Error: type Secure already defined&lt;/code&gt;&lt;/p&gt;
-&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;&lt;span style=&#34;color:#fff;font-weight:bold&#34;&gt;public&lt;/span&gt; &lt;span style=&#34;color:#fff;font-weight:bold&#34;&gt;class&lt;/span&gt; Secure &lt;span style=&#34;color:#fff;font-weight:bold&#34;&gt;extends&lt;/span&gt; Controller { &lt;span style=&#34;color:#007f7f&#34;&gt;// error here
+&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;&lt;span style=&#34;color:#fff;font-weight:bold&#34;&gt;public&lt;/span&gt; &lt;span style=&#34;color:#fff;font-weight:bold&#34;&gt;class&lt;/span&gt; Secure &lt;span style=&#34;color:#fff;font-weight:bold&#34;&gt;extends&lt;/span&gt; Controller { &lt;span style=&#34;color:#007f7f&#34;&gt;// error here
 &lt;/span&gt;&lt;span style=&#34;color:#007f7f&#34;&gt;&lt;/span&gt;
     @Before(unless={&lt;span style=&#34;color:#0ff;font-weight:bold&#34;&gt;&amp;#34;login&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#0ff;font-weight:bold&#34;&gt;&amp;#34;authenticate&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#0ff;font-weight:bold&#34;&gt;&amp;#34;logout&amp;#34;&lt;/span&gt;})
 
@@ -658,7 +658,7 @@ When I first saw the source of GTFS Editor, I was ecstatic. They used Play frame
 &lt;p&gt;The next problem is a sort of common thing most webapp developers have to solve one way or another. How do you set up the initial admin account? Phrased a different way, how do I login to this thing? The first thing I tried was just add a user into the &lt;code&gt;account&lt;/code&gt; table directly. One problem though was how to set the password correctly. Plaintext obviously wouldn&amp;rsquo;t work.&lt;/p&gt;
 &lt;p&gt;Another note regarding Play 1.x, it provides the &lt;a href=&#34;http://www.playframework.com/documentation/1.2.5/secure&#34;&gt;secure module&lt;/a&gt; which handles logins and keeping state, you simply need to implement the method &lt;code&gt;boolean authenticate(String username, String password)&lt;/code&gt;. It leaves the actual process of verifying the login to the programmer. This can be exploited by just making the method return &lt;code&gt;true&lt;/code&gt; and then any login would work. No need to actually set the password. Excellent.&lt;/p&gt;
 &lt;p&gt;And we&amp;rsquo;re logged in, just in time to encounter a runtime exception. This also works much like compilation errors in Play. It shows a page with the error and the relevant source lines. Now we get, &lt;code&gt;IndexOutOfBoundsException occured : Index: 0, Size: 0&lt;/code&gt;&lt;/p&gt;
-&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;&lt;span style=&#34;color:#fff;font-weight:bold&#34;&gt;if&lt;/span&gt;(session.&lt;span style=&#34;color:#007f7f&#34;&gt;get&lt;/span&gt;(&lt;span style=&#34;color:#0ff;font-weight:bold&#34;&gt;&amp;#34;agencyId&amp;#34;&lt;/span&gt;) == &lt;span style=&#34;color:#fff;font-weight:bold&#34;&gt;null&lt;/span&gt;) {
+&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;&lt;span style=&#34;color:#fff;font-weight:bold&#34;&gt;if&lt;/span&gt;(session.&lt;span style=&#34;color:#007f7f&#34;&gt;get&lt;/span&gt;(&lt;span style=&#34;color:#0ff;font-weight:bold&#34;&gt;&amp;#34;agencyId&amp;#34;&lt;/span&gt;) == &lt;span style=&#34;color:#fff;font-weight:bold&#34;&gt;null&lt;/span&gt;) {
 
     Agency agency = agencies.&lt;span style=&#34;color:#007f7f&#34;&gt;get&lt;/span&gt;(0); &lt;span style=&#34;color:#007f7f&#34;&gt;// error here
 &lt;/span&gt;&lt;span style=&#34;color:#007f7f&#34;&gt;&lt;/span&gt;
@@ -666,7 +666,7 @@ When I first saw the source of GTFS Editor, I was ecstatic. They used Play frame
     session.&lt;span style=&#34;color:#007f7f&#34;&gt;put&lt;/span&gt;(&lt;span style=&#34;color:#0ff;font-weight:bold&#34;&gt;&amp;#34;agencyName&amp;#34;&lt;/span&gt;, agency.&lt;span style=&#34;color:#007f7f&#34;&gt;name&lt;/span&gt;);
 &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Apparently, we need to have an agency. That&amp;rsquo;s generally simple enough. You just manually insert an agency into the &lt;code&gt;agency&lt;/code&gt; table. After that&amp;rsquo;s done, we finally have a view of the actual application. It&amp;rsquo;s very Bootstrap-y, but that&amp;rsquo;s just fine. The workflow though, is not perfectly intuitive, but I&amp;rsquo;ll talk about that some other day.&lt;/p&gt;
 &lt;p&gt;That&amp;rsquo;s not the end of it though, we still have to fix these bugs. The developer obviously didn&amp;rsquo;t have to put up with this when they were working, so what happened? Also, the log is showing some weird things,&lt;/p&gt;
-&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;~        _            _
+&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;~        _            _
 ~  _ __ | | __ _ _  _| |
 ~ | &amp;#39;_ \| |/ _&amp;#39; | || |_|
 ~ |  __/|_|\____|\__ (_)
@@ -777,7 +777,7 @@ Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
 &lt;h3 id=&#34;second-pass&#34;&gt;Second Pass&lt;/h3&gt;
 &lt;p&gt;So how did you do? First, the error that &lt;code&gt;type Check already defined&lt;/code&gt; usually does mean that &lt;code&gt;Check&lt;/code&gt; was already defined elsewhere. Looking in the app folder though, there was nothing of the sort. It&amp;rsquo;s the only one there that was &lt;code&gt;Check.java&lt;/code&gt;. But remember the secure module? Modules work by providing source files and Play just compiles them all together. Bingo, &lt;code&gt;Check.java&lt;/code&gt;. Doing a diff shows nothing was changed. So the solution really was just simply delete &lt;code&gt;Check.java&lt;/code&gt; and also &lt;code&gt;Secure.java&lt;/code&gt;. No more compilation errors!&lt;/p&gt;
 &lt;p&gt;The next question is, how do you get the initial user? There actually is some code that looks like it creates the default admin user,&lt;/p&gt;
-&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;&lt;span style=&#34;color:#fff;font-weight:bold&#34;&gt;if&lt;/span&gt;(Security.&lt;span style=&#34;color:#007f7f&#34;&gt;isConnected&lt;/span&gt;()) {
+&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;&lt;span style=&#34;color:#fff;font-weight:bold&#34;&gt;if&lt;/span&gt;(Security.&lt;span style=&#34;color:#007f7f&#34;&gt;isConnected&lt;/span&gt;()) {
     ...
     Account account = Account.&lt;span style=&#34;color:#007f7f&#34;&gt;find&lt;/span&gt;(&lt;span style=&#34;color:#0ff;font-weight:bold&#34;&gt;&amp;#34;username = ?&amp;#34;&lt;/span&gt;, Security.&lt;span style=&#34;color:#007f7f&#34;&gt;connected&lt;/span&gt;()).&lt;span style=&#34;color:#007f7f&#34;&gt;first&lt;/span&gt;();
     ...

+ 8 - 8
output/posts/tiddlywiki-in-the-sky-or-tiddlyweb-for-tw5.html

@@ -2,7 +2,7 @@
 <html lang="en-us">
 <head>
 	<meta charset="utf-8">
-	<meta name="generator" content="Hugo 0.69.2" />
+	<meta name="generator" content="Hugo 0.88.0" />
 	<meta name="viewport" content="width=device-width, initial-scale=1">
 	<link rel="stylesheet" href="/assets/css/theme.css">
 	<link rel="alternate" href="/rss.xml" type="application/rss+xml" title="Pleasant Programmer">
@@ -57,15 +57,15 @@
 <p>To support TiddlyWiki5, we&rsquo;ll need a version of the wiki which has the TiddlyWeb plugin already installed and configured. After that, some tweaking is necessary to get TiddlyWeb to provide what the wiki requires.</p>
 <h2 id="setting-up-tiddlywiki">Setting Up TiddlyWiki</h2>
 <p>TiddlyWiki5 provides a command line tool via <code>npm</code> that allows building custom versions of the wiki. In fact, it comes with templates, called &ldquo;editions&rdquo;, that we can use for our setup. Assuming you already have it installed, create the wiki using</p>
-<div class="highlight"><pre style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-sh" data-lang="sh">tiddlywiki mywiki --init tw5tank          <span style="color:#007f7f"># create wiki from template</span>
+<div class="highlight"><pre tabindex="0" style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-sh" data-lang="sh">tiddlywiki mywiki --init tw5tank          <span style="color:#007f7f"># create wiki from template</span>
 </code></pre></div><p>This creates a wiki intended for use with <a href="https://tank.peermore.com/">Tank</a>, which is built on top of TiddlyWeb. From here, you should look in <code>mywiki/tiddlers/system</code> which contain the entries for <code>SiteTitle</code>, <code>SiteSubtitle</code>, <code>DefaultTiddlers</code>, and <code>tiddlyweb-host</code>. The first 3 should be configured however you want. These are necessary because they&rsquo;re needed before the wiki can load them from the server. <code>tiddlyweb-host</code> contains the location of the TiddlyWeb server, this should be <code>http://localhost:8080/</code> if you&rsquo;re just testing locally. With everything configured, you can build the new wiki by running</p>
-<div class="highlight"><pre style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-sh" data-lang="sh">tiddlywiki mywiki --build
+<div class="highlight"><pre tabindex="0" style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-sh" data-lang="sh">tiddlywiki mywiki --build
 </code></pre></div><p>This will output the wiki to <code>mywiki/output/tw5tank.html</code>. You can now serve it using your favorite local webserver, like <code>python -m http.server</code>.</p>
 <h2 id="setting-up-tiddlyweb">Setting Up TiddlyWeb</h2>
 <p>The TiddlyWeb tutorial recommends using <code>tiddlywebwiki</code> which has all the plugins setup for a nice wiki instance for the old TiddlyWiki. It has a lot of features that aren&rsquo;t really needed, so we won&rsquo;t go with that. So first, we&rsquo;ll need to install TiddlyWeb and any plugins we might want to use.</p>
-<div class="highlight"><pre style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-sh" data-lang="sh">pip install tiddlyweb tiddlywebplugins.status tiddlywebplugins.cherrypy tiddlywebplugins.cors
+<div class="highlight"><pre tabindex="0" style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-sh" data-lang="sh">pip install tiddlyweb tiddlywebplugins.status tiddlywebplugins.cherrypy tiddlywebplugins.cors
 </code></pre></div><p>Next, we&rsquo;ll need the tiddlyweb configuration in <code>tiddlywebconfig.py</code></p>
-<div class="highlight"><pre style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-python" data-lang="python"><span style="color:#007f7f"># A basic configuration.</span>
+<div class="highlight"><pre tabindex="0" style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-python" data-lang="python"><span style="color:#007f7f"># A basic configuration.</span>
 <span style="color:#007f7f"># `pydoc tiddlyweb.config` for details on configuration items.</span>
 
 <span style="color:#fff;font-weight:bold">import</span> tiddlywebplugins.status
@@ -74,7 +74,7 @@ config = {
     <span style="color:#0ff;font-weight:bold">&#39;system_plugins&#39;</span>: [<span style="color:#0ff;font-weight:bold">&#39;tiddlywebplugins.status&#39;</span>, <span style="color:#0ff;font-weight:bold">&#39;tiddlywebplugins.cors&#39;</span>],
     <span style="color:#0ff;font-weight:bold">&#39;secret&#39;</span>: <span style="color:#0ff;font-weight:bold">&#39;36c98d6d14618c79f0ed2d49cd1b9e272d8d4bd0&#39;</span>,
     <span style="color:#0ff;font-weight:bold">&#39;wsgi_server&#39;</span>: <span style="color:#0ff;font-weight:bold">&#39;tiddlywebplugins.cherrypy&#39;</span>,
-    <span style="color:#0ff;font-weight:bold">&#39;cors.enable_non_simple&#39;</span>: True
+    <span style="color:#0ff;font-weight:bold">&#39;cors.enable_non_simple&#39;</span>: <span style="color:#fff;font-weight:bold">True</span>
 }
 
 original_gather_data = tiddlywebplugins.status._gather_data
@@ -93,7 +93,7 @@ tiddlywebplugins.status._gather_data = _status_gather_data
 <li>using cors since we&rsquo;re not hosting the wiki itself on the same server</li>
 </ul>
 <p>With that, we just need to create the store that will hold our data</p>
-<div class="highlight"><pre style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-sh" data-lang="sh">twanager recipe default <span style="color:#0ff;font-weight:bold">&lt;&lt;EOF
+<div class="highlight"><pre tabindex="0" style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-sh" data-lang="sh">twanager recipe default <span style="color:#0ff;font-weight:bold">&lt;&lt;EOF
 </span><span style="color:#0ff;font-weight:bold">desc: standard TiddlyWebWiki environment
 </span><span style="color:#0ff;font-weight:bold">policy: {&#34;read&#34;: [], &#34;create&#34;: [], &#34;manage&#34;: [&#34;R:ADMIN&#34;], &#34;accept&#34;: [], &#34;write&#34;: [&#34;R:ADMIN&#34;], &#34;owner&#34;: &#34;administrator&#34;, &#34;delete&#34;: [&#34;R:ADMIN&#34;]}
 </span><span style="color:#0ff;font-weight:bold">
@@ -104,7 +104,7 @@ twanager bag default <span style="color:#0ff;font-weight:bold">&lt;&lt;EOF
 </span><span style="color:#0ff;font-weight:bold">{&#34;policy&#34;: {&#34;read&#34;: [], &#34;create&#34;: [], &#34;manage&#34;: [&#34;R:ADMIN&#34;], &#34;accept&#34;: [], &#34;write&#34;: [], &#34;owner&#34;: &#34;administrator&#34;, &#34;delete&#34;: []}}
 </span><span style="color:#0ff;font-weight:bold">EOF</span>
 </code></pre></div><p>Finally, we can start the TiddlyWeb server</p>
-<div class="highlight"><pre style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-sh" data-lang="sh">twanager server
+<div class="highlight"><pre tabindex="0" style="color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-sh" data-lang="sh">twanager server
 </code></pre></div><h2 id="putting-it-all-together">Putting it all together</h2>
 <p>Once you have the TiddlyWeb server running, you can just go to wherever you&rsquo;re hosting the wiki html and it should work. You can try creating some posts, and the check mark on the sidebar should be red for a while and then turn black. Once that&rsquo;s done it&rsquo;s saved. You can refresh your browser and your posts should still be there.</p>
 <p>At this point, you can start customizing your TiddlyWeb instance, by changing your store to something like a database, or adding authorization. You can also tweak the server setup so you won&rsquo;t need CORS anymore.</p>

+ 1 - 1
output/posts/transit-wand.html

@@ -2,7 +2,7 @@
 <html lang="en-us">
 <head>
 	<meta charset="utf-8">
-	<meta name="generator" content="Hugo 0.69.2" />
+	<meta name="generator" content="Hugo 0.88.0" />
 	<meta name="viewport" content="width=device-width, initial-scale=1">
 	<link rel="stylesheet" href="/assets/css/theme.css">
 	<link rel="alternate" href="/rss.xml" type="application/rss+xml" title="Pleasant Programmer">

+ 31 - 31
output/rss.xml

@@ -45,8 +45,8 @@ particularly how well the setting and atmosphere was done. The voice quotes
 whenever you discover a new technology were what really made the game for me and
 I&amp;rsquo;ve included those into the site. I also tried my very best to capture the
 original look and feel from the game using HTML and CSS.&lt;/p&gt;
-&lt;h2 id=&#34;game-n-chat&#34;&gt;Game n&amp;rsquo; Chat&lt;/h2&gt;
-&lt;p&gt;&lt;a href=&#34;https://gamenchat.pleasantprogrammer.com&#34;&gt;Game n&amp;rsquo; Chat&lt;/a&gt; is an online chatroom
+&lt;h2 id=&#34;game-n-chat&#34;&gt;Game n&#39; Chat&lt;/h2&gt;
+&lt;p&gt;&lt;a href=&#34;https://gamenchat.pleasantprogrammer.com&#34;&gt;Game n&#39; Chat&lt;/a&gt; is an online chatroom
 where you can play the Taboo board game. I got the chance to play at a party one
 time and I really enjoyed it. I also remembered having quite a bit of fun
 playing trivia and other games over IRC back in the day, so I decided to build
@@ -181,7 +181,7 @@ to get my bluetooth mouse connected on Linux. The main thing I used then was
 &lt;code&gt;bluetoothctl&lt;/code&gt; which is essentially a CLI for managing bluetooth devices so I
 started there.&lt;/p&gt;
 &lt;p&gt;I started up &lt;code&gt;bluetoothctl&lt;/code&gt; and turned on the Prep Pad. And it showed up!&lt;/p&gt;
-&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;[bluetooth]# power on
+&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;[bluetooth]# power on
 [CHG] Controller ... Class: 0x00010c
 Changing power on succeeded
 [CHG] Controller ... Powered: yes
@@ -191,7 +191,7 @@ Discovery started
 [CHG] Device 1C:BA:8C:21:7C:BB Name: CHSLEEV_00
 [CHG] Device 1C:BA:8C:21:7C:BB Alias: CHSLEEV_00
 &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;I then connected to it, which was surprisingly easy.&lt;/p&gt;
-&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;[bluetooth]# connect 1C:BA:8C:21:7C:BB
+&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;[bluetooth]# connect 1C:BA:8C:21:7C:BB
 Attempting to connect to 1C:BA:8C:21:7C:BB
 [CHG] Device 1C:BA:8C:21:7C:BB Connected: yes
 [CHG] Device 1C:BA:8C:21:7C:BB Name: CH BTScale_00
@@ -203,7 +203,7 @@ those things were at that point.&lt;/p&gt;
 &lt;p&gt;After a lot of poking around, I could check the general device information. You
 could get the hardware, software and firmware version. There&amp;rsquo;s also the device
 serial number which was nowhere on the actual physical device.&lt;/p&gt;
-&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;[CHSLEEV_00]# select-attribute /org/bluez/hci0/dev_1C_BA_8C_21_7C_BB/service0010/char0017
+&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;[CHSLEEV_00]# select-attribute /org/bluez/hci0/dev_1C_BA_8C_21_7C_BB/service0010/char0017
 [CH BTScale_00:/service0010/char0017]# attribute-info
 Characteristic - Firmware Revision String
 	UUID: 00002a26-0000-1000-8000-00805f9b34fb
@@ -228,7 +228,7 @@ Attempting to read /org/bluez/hci0/dev_1C_BA_8C_21_7C_BB/service0010/char0017
 &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;There was also a service which contained Accel Enable, Accel Range, Accel
 X-Coordinate, Accel Y-Coordinate, and Accel Z-Coordinate. I guess it stands for
 accelerometer, which is probably what it uses to weigh things.&lt;/p&gt;
-&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;[CHSLEEV_00]# select-attribute /org/bluez/hci0/dev_1C_BA_8C_21_7C_BB/service0023/char0024/desc0026
+&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;[CHSLEEV_00]# select-attribute /org/bluez/hci0/dev_1C_BA_8C_21_7C_BB/service0023/char0024/desc0026
 [CH BTScale_00:/service0023/char0024/desc0026]# read
 Attempting to read /org/bluez/hci0/dev_1C_BA_8C_21_7C_BB/service0023/char0024/desc0026
 [CHG] Attribute /org/bluez/hci0/dev_1C_BA_8C_21_7C_BB/service0023/char0024/desc0026 Value: 0x41
@@ -249,7 +249,7 @@ denied. I could however, notify on them. But that didn&amp;rsquo;t yield anythin
 What I &lt;em&gt;could&lt;/em&gt; read was Accel Enable, which was set to 00. I guess that means it
 was off. After writing 01 to Accel Enable, I found I could get values out of
 Accel X-Coordinate! Also, the green LED which was permanently on turned off.&lt;/p&gt;
-&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;[CHSLEEV_00]# select-attribute /org/bluez/hci0/dev_1C_BA_8C_21_7C_BB/service0023/char0024
+&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;[CHSLEEV_00]# select-attribute /org/bluez/hci0/dev_1C_BA_8C_21_7C_BB/service0023/char0024
 [CH BTScale_00:/service0023/char0024]# write 01
 Attempting to write /org/bluez/hci0/dev_1C_BA_8C_21_7C_BB/service0023/char0024
 [CH BTScale_00:/service0023/char0024]# select-attribute /org/bluez/hci0/dev_1C_BA_8C_21_7C_BB/service0023/char002a
@@ -304,7 +304,7 @@ By default, we use UTF-8 for text storage and rendering. A problem is that brows
 &lt;p&gt;By default, we use UTF-8 for text storage and rendering. A problem is that browsers don&amp;rsquo;t assume UTF-8 as the default and you need to have either a &lt;code&gt;&amp;lt;meta charset=&amp;quot;utf-8&amp;quot; /&amp;gt;&lt;/code&gt; in the HTML or &lt;code&gt;Content-Type: text/html; charset=utf-8&lt;/code&gt; in the headers. A few of our services don&amp;rsquo;t set the &lt;code&gt;Content-Type&lt;/code&gt; with the &lt;code&gt;charset=utf-8&lt;/code&gt; part so you&amp;rsquo;d get piñata instead of piñata.&lt;/p&gt;
 &lt;p&gt;Being lazy, we usually just correct this at the reverse proxy side. It&amp;rsquo;s trivial to do in nginx. You just need to add &lt;code&gt;charset utf-8;&lt;/code&gt; to your configuration and you&amp;rsquo;re good. For haproxy though, I couldn&amp;rsquo;t readily find a solution for it and had to go through the docs to see what I could do.&lt;/p&gt;
 &lt;p&gt;After a bit of experimenting, I had success with this:&lt;/p&gt;
-&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;# set content-type to utf-8 if not already
+&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;# set content-type to utf-8 if not already
 acl has_charset hdr_sub(content-type) -i charset=
 rspirep (Content-Type.*) \1;\ charset=utf-8 unless has_charset
 &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This is probably not the best way to do it. Arguably, we should just fix our services to have the correct &lt;code&gt;Content-Type&lt;/code&gt; in the first place, but I can do that some other time.&lt;/p&gt;
@@ -325,7 +325,7 @@ Now the problem is that Cloudflare can put you behind any IP they own, which is
 &lt;p&gt;A few months after we started beta testing the app, Cloudflare added more IPs to their range. Unfortunately, our server got moved to those new IPs which were not whitelisted yet. Apparently, the telco whitelisting process was incredibly convoluted and time consuming. Our client didn&amp;rsquo;t want to bother asking them to whitelist more IPs. We also tried asking Cloudflare to move us back to the original IP range, but they could only do that if we were in their enterprise tier. We couldn&amp;rsquo;t really afford that, so we looked for other options.&lt;/p&gt;
 &lt;p&gt;Since Cloudflare was essentially just a giant reverse proxy, theoretically there should be no distinction between one IP address from another. The specific IP we get is probably just for load balancing. So we tried accessing the IPs in the range directly and just setting the Host header and it worked! But we get SSL errors because the IP itself doesn&amp;rsquo;t have its own certificate.&lt;/p&gt;
 &lt;p&gt;After more testing, we figured out that you could actually use any Cloudflare backed domain so long as we properly set the Host header. We just needed to find one still in the old range. Coincidentally, 4chan.org was. Which led to this wonderful commit&lt;/p&gt;
-&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-diff&#34; data-lang=&#34;diff&#34;&gt;commit 123456789abcdef
+&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-diff&#34; data-lang=&#34;diff&#34;&gt;commit 123456789abcdef
 Author: ~~~~~~
 Date:   ~~~~~~
 
@@ -372,15 +372,15 @@ Date:   ~~~~~~
 &lt;p&gt;To support TiddlyWiki5, we&amp;rsquo;ll need a version of the wiki which has the TiddlyWeb plugin already installed and configured. After that, some tweaking is necessary to get TiddlyWeb to provide what the wiki requires.&lt;/p&gt;
 &lt;h2 id=&#34;setting-up-tiddlywiki&#34;&gt;Setting Up TiddlyWiki&lt;/h2&gt;
 &lt;p&gt;TiddlyWiki5 provides a command line tool via &lt;code&gt;npm&lt;/code&gt; that allows building custom versions of the wiki. In fact, it comes with templates, called &amp;ldquo;editions&amp;rdquo;, that we can use for our setup. Assuming you already have it installed, create the wiki using&lt;/p&gt;
-&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;tiddlywiki mywiki --init tw5tank          &lt;span style=&#34;color:#007f7f&#34;&gt;# create wiki from template&lt;/span&gt;
+&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;tiddlywiki mywiki --init tw5tank          &lt;span style=&#34;color:#007f7f&#34;&gt;# create wiki from template&lt;/span&gt;
 &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This creates a wiki intended for use with &lt;a href=&#34;https://tank.peermore.com/&#34;&gt;Tank&lt;/a&gt;, which is built on top of TiddlyWeb. From here, you should look in &lt;code&gt;mywiki/tiddlers/system&lt;/code&gt; which contain the entries for &lt;code&gt;SiteTitle&lt;/code&gt;, &lt;code&gt;SiteSubtitle&lt;/code&gt;, &lt;code&gt;DefaultTiddlers&lt;/code&gt;, and &lt;code&gt;tiddlyweb-host&lt;/code&gt;. The first 3 should be configured however you want. These are necessary because they&amp;rsquo;re needed before the wiki can load them from the server. &lt;code&gt;tiddlyweb-host&lt;/code&gt; contains the location of the TiddlyWeb server, this should be &lt;code&gt;http://localhost:8080/&lt;/code&gt; if you&amp;rsquo;re just testing locally. With everything configured, you can build the new wiki by running&lt;/p&gt;
-&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;tiddlywiki mywiki --build
+&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;tiddlywiki mywiki --build
 &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This will output the wiki to &lt;code&gt;mywiki/output/tw5tank.html&lt;/code&gt;. You can now serve it using your favorite local webserver, like &lt;code&gt;python -m http.server&lt;/code&gt;.&lt;/p&gt;
 &lt;h2 id=&#34;setting-up-tiddlyweb&#34;&gt;Setting Up TiddlyWeb&lt;/h2&gt;
 &lt;p&gt;The TiddlyWeb tutorial recommends using &lt;code&gt;tiddlywebwiki&lt;/code&gt; which has all the plugins setup for a nice wiki instance for the old TiddlyWiki. It has a lot of features that aren&amp;rsquo;t really needed, so we won&amp;rsquo;t go with that. So first, we&amp;rsquo;ll need to install TiddlyWeb and any plugins we might want to use.&lt;/p&gt;
-&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;pip install tiddlyweb tiddlywebplugins.status tiddlywebplugins.cherrypy tiddlywebplugins.cors
+&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;pip install tiddlyweb tiddlywebplugins.status tiddlywebplugins.cherrypy tiddlywebplugins.cors
 &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Next, we&amp;rsquo;ll need the tiddlyweb configuration in &lt;code&gt;tiddlywebconfig.py&lt;/code&gt;&lt;/p&gt;
-&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;color:#007f7f&#34;&gt;# A basic configuration.&lt;/span&gt;
+&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;color:#007f7f&#34;&gt;# A basic configuration.&lt;/span&gt;
 &lt;span style=&#34;color:#007f7f&#34;&gt;# `pydoc tiddlyweb.config` for details on configuration items.&lt;/span&gt;
 
 &lt;span style=&#34;color:#fff;font-weight:bold&#34;&gt;import&lt;/span&gt; tiddlywebplugins.status
@@ -389,7 +389,7 @@ config = {
     &lt;span style=&#34;color:#0ff;font-weight:bold&#34;&gt;&amp;#39;system_plugins&amp;#39;&lt;/span&gt;: [&lt;span style=&#34;color:#0ff;font-weight:bold&#34;&gt;&amp;#39;tiddlywebplugins.status&amp;#39;&lt;/span&gt;, &lt;span style=&#34;color:#0ff;font-weight:bold&#34;&gt;&amp;#39;tiddlywebplugins.cors&amp;#39;&lt;/span&gt;],
     &lt;span style=&#34;color:#0ff;font-weight:bold&#34;&gt;&amp;#39;secret&amp;#39;&lt;/span&gt;: &lt;span style=&#34;color:#0ff;font-weight:bold&#34;&gt;&amp;#39;36c98d6d14618c79f0ed2d49cd1b9e272d8d4bd0&amp;#39;&lt;/span&gt;,
     &lt;span style=&#34;color:#0ff;font-weight:bold&#34;&gt;&amp;#39;wsgi_server&amp;#39;&lt;/span&gt;: &lt;span style=&#34;color:#0ff;font-weight:bold&#34;&gt;&amp;#39;tiddlywebplugins.cherrypy&amp;#39;&lt;/span&gt;,
-    &lt;span style=&#34;color:#0ff;font-weight:bold&#34;&gt;&amp;#39;cors.enable_non_simple&amp;#39;&lt;/span&gt;: True
+    &lt;span style=&#34;color:#0ff;font-weight:bold&#34;&gt;&amp;#39;cors.enable_non_simple&amp;#39;&lt;/span&gt;: &lt;span style=&#34;color:#fff;font-weight:bold&#34;&gt;True&lt;/span&gt;
 }
 
 original_gather_data = tiddlywebplugins.status._gather_data
@@ -408,7 +408,7 @@ tiddlywebplugins.status._gather_data = _status_gather_data
 &lt;li&gt;using cors since we&amp;rsquo;re not hosting the wiki itself on the same server&lt;/li&gt;
 &lt;/ul&gt;
 &lt;p&gt;With that, we just need to create the store that will hold our data&lt;/p&gt;
-&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;twanager recipe default &lt;span style=&#34;color:#0ff;font-weight:bold&#34;&gt;&amp;lt;&amp;lt;EOF
+&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;twanager recipe default &lt;span style=&#34;color:#0ff;font-weight:bold&#34;&gt;&amp;lt;&amp;lt;EOF
 &lt;/span&gt;&lt;span style=&#34;color:#0ff;font-weight:bold&#34;&gt;desc: standard TiddlyWebWiki environment
 &lt;/span&gt;&lt;span style=&#34;color:#0ff;font-weight:bold&#34;&gt;policy: {&amp;#34;read&amp;#34;: [], &amp;#34;create&amp;#34;: [], &amp;#34;manage&amp;#34;: [&amp;#34;R:ADMIN&amp;#34;], &amp;#34;accept&amp;#34;: [], &amp;#34;write&amp;#34;: [&amp;#34;R:ADMIN&amp;#34;], &amp;#34;owner&amp;#34;: &amp;#34;administrator&amp;#34;, &amp;#34;delete&amp;#34;: [&amp;#34;R:ADMIN&amp;#34;]}
 &lt;/span&gt;&lt;span style=&#34;color:#0ff;font-weight:bold&#34;&gt;
@@ -419,7 +419,7 @@ twanager bag default &lt;span style=&#34;color:#0ff;font-weight:bold&#34;&gt;&am
 &lt;/span&gt;&lt;span style=&#34;color:#0ff;font-weight:bold&#34;&gt;{&amp;#34;policy&amp;#34;: {&amp;#34;read&amp;#34;: [], &amp;#34;create&amp;#34;: [], &amp;#34;manage&amp;#34;: [&amp;#34;R:ADMIN&amp;#34;], &amp;#34;accept&amp;#34;: [], &amp;#34;write&amp;#34;: [], &amp;#34;owner&amp;#34;: &amp;#34;administrator&amp;#34;, &amp;#34;delete&amp;#34;: []}}
 &lt;/span&gt;&lt;span style=&#34;color:#0ff;font-weight:bold&#34;&gt;EOF&lt;/span&gt;
 &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Finally, we can start the TiddlyWeb server&lt;/p&gt;
-&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;twanager server
+&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;twanager server
 &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;putting-it-all-together&#34;&gt;Putting it all together&lt;/h2&gt;
 &lt;p&gt;Once you have the TiddlyWeb server running, you can just go to wherever you&amp;rsquo;re hosting the wiki html and it should work. You can try creating some posts, and the check mark on the sidebar should be red for a while and then turn black. Once that&amp;rsquo;s done it&amp;rsquo;s saved. You can refresh your browser and your posts should still be there.&lt;/p&gt;
 &lt;p&gt;At this point, you can start customizing your TiddlyWeb instance, by changing your store to something like a database, or adding authorization. You can also tweak the server setup so you won&amp;rsquo;t need CORS anymore.&lt;/p&gt;
@@ -484,10 +484,10 @@ We normally leave the servers on QWERTY. After all, most people start off as QWE
 &lt;p&gt;I googled around for solutions and came across &lt;a href=&#34;http://superuser.com/questions/548234/how-can-i-easily-toggle-between-dvorak-and-qwerty-keyboard-layouts-from-a-linux&#34;&gt;a nice idea&lt;/a&gt;. You could alias &lt;code&gt;asdf&lt;/code&gt; to load the DVORAK mapping and &lt;code&gt;aoeu&lt;/code&gt; (the equivalent to asdf in DVORAK) to load the QWERTY mapping. This actually makes sense since you don&amp;rsquo;t really have to know where the letters are. The only problem is, you once again have to be logged in to change the key mappings.&lt;/p&gt;
 &lt;p&gt;After some further searching, I found &lt;a href=&#34;http://unix.stackexchange.com/questions/2884/toggle-between-dvorak-and-qwerty&#34;&gt;something close to what I wanted&lt;/a&gt;. Apparently, Alt+Up sends a KeyboardSignal keycode to the init process, which can act on that. It also works anywhere, even before being logged in. For SysVinit systems, you can just add a line to your inittab for a command to be run when Alt+Up is pressed.&lt;/p&gt;
 &lt;p&gt;In the office, however, we generally use Arch Linux which uses SystemD. But apparently, it also has a mechanism of accepting the Alt+Up press. It runs the kbrequest target whenever it gets the keypress. &lt;code&gt;kbrequest.target&lt;/code&gt; is normally aliased to run the rescue service though, so you have to manually create the file in &lt;code&gt;/etc/systemd/system/kbrequest.target&lt;/code&gt; and fill it with a description:&lt;/p&gt;
-&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-ini&#34; data-lang=&#34;ini&#34;&gt;&lt;span style=&#34;color:#fff;font-weight:bold&#34;&gt;[Unit]&lt;/span&gt;
+&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-ini&#34; data-lang=&#34;ini&#34;&gt;&lt;span style=&#34;color:#fff;font-weight:bold&#34;&gt;[Unit]&lt;/span&gt;
 &lt;span style=&#34;color:#007f7f&#34;&gt;Description&lt;/span&gt;=&lt;span style=&#34;color:#0ff;font-weight:bold&#34;&gt;kbrequest target&lt;/span&gt;
 &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;We can then add a service to be run whenever the target is called. Something like &lt;code&gt;/etc/systemd/system/keymap-switch.service&lt;/code&gt;:&lt;/p&gt;
-&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-ini&#34; data-lang=&#34;ini&#34;&gt;&lt;span style=&#34;color:#fff;font-weight:bold&#34;&gt;[Unit]&lt;/span&gt;
+&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-ini&#34; data-lang=&#34;ini&#34;&gt;&lt;span style=&#34;color:#fff;font-weight:bold&#34;&gt;[Unit]&lt;/span&gt;
 &lt;span style=&#34;color:#007f7f&#34;&gt;Description&lt;/span&gt;=&lt;span style=&#34;color:#0ff;font-weight:bold&#34;&gt;Keymap Switch Service&lt;/span&gt;
 
 &lt;span style=&#34;color:#fff;font-weight:bold&#34;&gt;[Service]&lt;/span&gt;
@@ -497,7 +497,7 @@ We normally leave the servers on QWERTY. After all, most people start off as QWE
 &lt;span style=&#34;color:#fff;font-weight:bold&#34;&gt;[Install]&lt;/span&gt;
 &lt;span style=&#34;color:#007f7f&#34;&gt;WantedBy&lt;/span&gt;=&lt;span style=&#34;color:#0ff;font-weight:bold&#34;&gt;kbrequest.target&lt;/span&gt;
 &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;After enabling said service, we only need the actual keymap switcher, &lt;code&gt;/usr/local/bin/keymap-switch&lt;/code&gt;. The StackOverflow answer provides different ways of detecting the current keymap so we know which one to switch to. Since we&amp;rsquo;re using SystemD, we can use that instead for managing which keymap we&amp;rsquo;re actually using. It stores the current settings inside &lt;code&gt;/etc/vconsole.conf&lt;/code&gt;. We can also then switch keymaps by using &lt;code&gt;localectl set-keymap&lt;/code&gt;.&lt;/p&gt;
-&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;color:#0f0;font-weight:bold&#34;&gt;#!/bin/sh
+&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;color:#0f0;font-weight:bold&#34;&gt;#!/bin/sh
 &lt;/span&gt;&lt;span style=&#34;color:#0f0;font-weight:bold&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#fff;font-weight:bold&#34;&gt;source&lt;/span&gt; /etc/vconsole.conf
 
 &lt;span style=&#34;color:#fff;font-weight:bold&#34;&gt;if&lt;/span&gt; [ &lt;span style=&#34;color:#0ff;font-weight:bold&#34;&gt;&amp;#34;&lt;/span&gt;$TERM&lt;span style=&#34;color:#0ff;font-weight:bold&#34;&gt;&amp;#34;&lt;/span&gt; = &lt;span style=&#34;color:#0ff;font-weight:bold&#34;&gt;&amp;#34;dumb&amp;#34;&lt;/span&gt; ]; &lt;span style=&#34;color:#fff;font-weight:bold&#34;&gt;then&lt;/span&gt;
@@ -544,11 +544,11 @@ The GTFS spec defines 2 ways of statically specifying trip schedules. You can de
 &lt;p&gt;Ideally, we shouldn&amp;rsquo;t bother inputting the schedule information into GTFS. Only the route data is really important for jeeps and buses. However, the schedule information is required in the GTFS, and routing apps wouldn&amp;rsquo;t work without it. So we have to add a reasonable trip schedule for jeeps and buses.&lt;/p&gt;
 &lt;p&gt;The current GTFS data does define these trip schedules. We assume that jeeps and buses operate between 6:00AM and 11:00PM and a new jeep passes by every 10 minutes. Also, jeeps and buses are defined to only operate on weekdays.&lt;/p&gt;
 &lt;p&gt;While there might be jeeps who change routes or don&amp;rsquo;t operate on weekends, I&amp;rsquo;m pretty sure that jeeps and buses run on weekends. We&amp;rsquo;ll have to fix it ourselves temporarily since there&amp;rsquo;s no central GTFS feed yet.&lt;/p&gt;
-&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;color:#007f7f&#34;&gt;# 724594 seems to be the service id used by jeeps and buses&lt;/span&gt;
+&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;color:#007f7f&#34;&gt;# 724594 seems to be the service id used by jeeps and buses&lt;/span&gt;
 sed -i .bak &lt;span style=&#34;color:#0ff;font-weight:bold&#34;&gt;&amp;#39;/^724594/ s/0,0/1,1/&amp;#39;&lt;/span&gt; calendar.txt
 &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Another thing we could do is to adjust the time between buses, although the improvement is arguable. With the current 10 minutes between jeeps, it might provide some routes a significant advantage just because the timing is right. So you might get differing route suggestions depending on what time you planned the route. This makes sense when you&amp;rsquo;re sure what the times are, so you can minimize the wait, but with jeeps, you never really know how long the wait will actually be.&lt;/p&gt;
 &lt;p&gt;If we set the frequency to one minute, it &lt;em&gt;might&lt;/em&gt; give better routes by eliminating the timing issue. Or not, it&amp;rsquo;s kind of hard to tell.&lt;/p&gt;
-&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;color:#007f7f&#34;&gt;# jeep and bus route ids tend to start with 72&lt;/span&gt;
+&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;color:#007f7f&#34;&gt;# jeep and bus route ids tend to start with 72&lt;/span&gt;
 sed -i .bak &lt;span style=&#34;color:#0ff;font-weight:bold&#34;&gt;&amp;#39;/^72/ s/,600/,60/&amp;#39;&lt;/span&gt; frequencies.txt
 &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Overall, the problems we&amp;rsquo;re having is a symptom of the mismatch between our transit system and the GTFS. It would be great if our transit system gets better and we don&amp;rsquo;t need to do hackish things for it to fit the GTFS, but that&amp;rsquo;s still a dream. For now, all we can really do is fit a triangle into a square hole.&lt;/p&gt;
 </content:encoded>
@@ -568,7 +568,7 @@ OTP couldn&amp;rsquo;t possibly be that dumb though, so there must be something
 &lt;p&gt;This is just so hilariously wrong. It&amp;rsquo;s much simpler to just walk along Katipunan Avenue.&lt;/p&gt;
 &lt;p&gt;OTP couldn&amp;rsquo;t possibly be that dumb though, so there must be something we&amp;rsquo;re doing wrong. If you notice, Katipunan Avenue is colored red compared to the other streets. OTP seems to be avoiding any path that goes along Katipunan Avenue. The problem might have something to do with the &amp;ldquo;road type&amp;rdquo; designated to Katipunan.&lt;/p&gt;
 &lt;p&gt;Apparently, by default OTP will consider roads of type &lt;code&gt;trunk&lt;/code&gt; to be non-walkable and non-bikable. This is documented in the &lt;a href=&#34;http://wiki.openstreetmap.org/wiki/OpenTripPlanner&#34;&gt;OpenStreetMap wiki&lt;/a&gt; and the &lt;a href=&#34;https://github.com/openplans/OpenTripPlanner/wiki/GraphBuilder#permissions-and-bicycle-safety&#34;&gt;OTP wiki&lt;/a&gt; as well. There are actually multiple ways to go about this then. The first solution that came to mind was to just edit the original OSM XML file.&lt;/p&gt;
-&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;sed -i .bak s/trunk/primary/g manila.osm
+&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;sed -i .bak s/trunk/primary/g manila.osm
 &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;And rebuild the graph. It doesn&amp;rsquo;t really matter much because the OSM data isn&amp;rsquo;t used to render the maps. It&amp;rsquo;s just used to build the routing data. This is actually what I did for &lt;a href=&#34;http://maps.pleasantprogrammer.com&#34;&gt;maps.pleasantprogrammer.com&lt;/a&gt;.&lt;/p&gt;
 &lt;p&gt;It&amp;rsquo;s also possible to set the default way properties in OTP. Instead of disallowing walking and biking on &lt;code&gt;highway=trunk&lt;/code&gt; we could allow that. This is not much better than the &lt;code&gt;sed&lt;/code&gt; solution though. It&amp;rsquo;s better since you keep the weighting done by OTP, but you&amp;rsquo;re still saying that all trunks are walkable which might not be the case.&lt;/p&gt;
 &lt;p&gt;The most correct way to actually fix this is to go through each of the trunks and specifying &lt;code&gt;foot=yes&lt;/code&gt; and &lt;code&gt;bicycle=yes&lt;/code&gt; for those trunks that are actually walkable. You could either do this locally with the dumped data, or contribute it directly to OSM. I&amp;rsquo;m not sure on the particulars with updating OSM though.&lt;/p&gt;
@@ -587,7 +587,7 @@ The 5 minute tutorial actually discusses the elevation data briefly, but a more
 &lt;p&gt;One thing I hadn&amp;rsquo;t tested out last time was OTP&amp;rsquo;s support for elevation data. It makes use of this by showing the elevation you have to traverse while walking along the suggested route. It can also take it into account when suggesting bike routes.&lt;/p&gt;
 &lt;p&gt;The &lt;a href=&#34;https://github.com/openplans/OpenTripPlanner/wiki/FiveMinutes&#34;&gt;5 minute tutorial&lt;/a&gt; actually discusses the elevation data briefly, but a more in-depth thing you can look at is the &lt;a href=&#34;https://github.com/openplans/OpenTripPlanner/wiki/GraphBuilder#elevation-data&#34;&gt;GraphBuilder documentation&lt;/a&gt;. It suggests using the ASTER dataset which is free but requires registration. I just opted to use the SRTM data available from the &lt;a href=&#34;http://www.philgis.org/freegisdata.htm&#34;&gt;PhilGIS website&lt;/a&gt;.&lt;/p&gt;
 &lt;p&gt;I don&amp;rsquo;t know about the ASTER dataset, but the PhilGIS data was in the ERDAS img format. OTP only supports GeoTIFF so there was a need to convert it beforehand. You can use &lt;a href=&#34;http://www.gdal.org/&#34;&gt;GDAL&lt;/a&gt; for this. You&amp;rsquo;d just then run,&lt;/p&gt;
-&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;gdal_translate srtm41_90m_phl.img phil.tiff
+&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;gdal_translate srtm41_90m_phl.img phil.tiff
 &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Afterwards, it&amp;rsquo;s just a matter of following the OTP instructions on using a local elevation dataset. The process actually doubled the size of the generated Graph.obj so it might not be ideal if you&amp;rsquo;re running on limited RAM.&lt;/p&gt;
 &lt;p&gt;I&amp;rsquo;ve actually hosted a &lt;a href=&#34;http://maps.pleasantprogrammer.com&#34;&gt;working example&lt;/a&gt;. It&amp;rsquo;s pretty much at the limits of the RAM so it might be slow and unreliable, but you can test it out just for fun. Please don&amp;rsquo;t abuse it though.&lt;/p&gt;
 </content:encoded>
@@ -641,11 +641,11 @@ The phone app is actually quite simple. It allows you to capture a trip, which w
       <guid>https://pleasantprogrammer.com/posts/fare-data.html</guid>
       <description>As part of the data released by the DOTC, we also have the fare matrix for aircon buses, ordinary buses and jeeps. All as wonderful images. The data is also actually available from the LTFRB website. Generally, the fare scheme is represented as &amp;ldquo;pay X pesos for the first Y kilometers, pay Z for every succeeding kilometer.&amp;rdquo; Instead of a table, we can simply represent this as a formula instead,</description>
       <content:encoded>&lt;p&gt;As part of the data released by the DOTC, we also have the &lt;a href=&#34;http://philippine-transit.hackathome.com/dataset-philippines-transit-information-service-gtfs/&#34;&gt;fare matrix&lt;/a&gt; for aircon buses, ordinary buses and jeeps. All as wonderful images. The data is also actually available from the &lt;a href=&#34;http://ltfrb.gov.ph/main/farerates&#34;&gt;LTFRB website&lt;/a&gt;. Generally, the fare scheme is represented as &amp;ldquo;pay &lt;em&gt;X&lt;/em&gt; pesos for the first &lt;em&gt;Y&lt;/em&gt; kilometers, pay &lt;em&gt;Z&lt;/em&gt; for every succeeding kilometer.&amp;rdquo; Instead of a table, we can simply represent this as a formula instead,&lt;/p&gt;
-&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;base_fare + (distance - initial) * per_km
+&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;base_fare + (distance - initial) * per_km
 &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The relevant values for the three services are:&lt;/p&gt;
 &lt;!-- raw HTML omitted --&gt;
 &lt;p&gt;It isn&amp;rsquo;t as simple as that though. Fares are also rounded to the nearest 25 centavos. So we&amp;rsquo;d need to round them off correctly. This can be achieved by doing,&lt;/p&gt;
-&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;round(calculated_fare * 4.0)/4.0
+&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;round(calculated_fare * 4.0)/4.0
 &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;There&amp;rsquo;s also the discounted fare for students, senior citizens and persons with disability. They get 20% off the fare (prior to rounding) and the resulting fare is rounded off as well.&lt;/p&gt;
 &lt;p&gt;Doing just this, we actually do get the same results as the fare matrices in the image for the most part. There are some discrepancies with the discounted jeep fares. I&amp;rsquo;ve tried to resolve it by tweaking around with the formulas, but it really doesn&amp;rsquo;t make sense in any way. I presume these were manually adjusted for one reason or another.&lt;/p&gt;
 &lt;p&gt;Here&amp;rsquo;s a &lt;a href=&#34;../uploads/farematrix.rb&#34;&gt;script&lt;/a&gt; that generates CSVs of all the three fare matrices. If you&amp;rsquo;re too lazy to run it, here are links to the &lt;a href=&#34;../uploads/pub_aircon.csv&#34;&gt;aircon bus&lt;/a&gt;, &lt;a href=&#34;../uploads/pub_ordinary.csv&#34;&gt;ordinary bus&lt;/a&gt; and &lt;a href=&#34;../uploads/puj.csv&#34;&gt;jeep&lt;/a&gt; fare matrices.&lt;/p&gt;
@@ -658,7 +658,7 @@ The phone app is actually quite simple. It allows you to capture a trip, which w
 &lt;p&gt;We also don&amp;rsquo;t know if the jeeps or buses strictly follow the distance-based scheme. After all, if you can get on and off anywhere, you can&amp;rsquo;t really measure distance that exactly. I assume they generally work off the notion of &amp;ldquo;zones&amp;rdquo; than actual distance travelled. In that sense, they work more similarly to the LRT which has fares based on how many stops you pass. For jeeps and buses, your fare is probably based more on how many &amp;ldquo;zones&amp;rdquo; you pass through.&lt;/p&gt;
 &lt;h3 id=&#34;conclusion&#34;&gt;Conclusion&lt;/h3&gt;
 &lt;p&gt;Philip, a co-worker of mine at By Implication, had suggested that we might want to use a different model than what the GTFS proposes. I have to agree with him. At this point, the GTFS doesn&amp;rsquo;t really fit with our system. But I do think that open data and standards are great. In fact, I applaud the developers who made proposals for the fare system, as those are great first steps towards making the GTFS a more universal standard.&lt;/p&gt;
-&lt;p&gt;Side note: I&amp;rsquo;d also actually really like to hear about the DOTC developers&amp;rsquo; experience with the project. It would be nice if they had a devblog.&lt;/p&gt;
+&lt;p&gt;Side note: I&amp;rsquo;d also actually really like to hear about the DOTC developers&#39; experience with the project. It would be nice if they had a devblog.&lt;/p&gt;
 </content:encoded>
     </item>
     
@@ -680,14 +680,14 @@ When I first saw the source of GTFS Editor, I was ecstatic. They used Play frame
 &lt;p&gt;I&amp;rsquo;ll be splitting the next section up into 2 parts. In the first pass, I&amp;rsquo;ll talk about what I did to just get the app to run but I won&amp;rsquo;t try hard to fix any bugs. This generally is what I do when I try to get apps to run. I&amp;rsquo;ll also be dropping enough information so that you can actually figure out what the real problem is. In the second pass, I&amp;rsquo;ll explain what the problems were and how I fixed them.&lt;/p&gt;
 &lt;h3 id=&#34;first-pass&#34;&gt;First Pass&lt;/h3&gt;
 &lt;p&gt;A thing to note about Play (and one of the reasons it&amp;rsquo;s a lovely Java framework) is that you don&amp;rsquo;t need to do manual compilation. Just edit some source files, refresh your browser and it will automatically do the compilation for you. One less argument for using PHP. It even shows you (in the browser!) the source and which line of code caused the compilation error. So that&amp;rsquo;s what I saw, &lt;code&gt;Error: type Check already defined&lt;/code&gt;&lt;/p&gt;
-&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;@Retention(RetentionPolicy.&lt;span style=&#34;color:#007f7f&#34;&gt;RUNTIME&lt;/span&gt;)
+&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;@Retention(RetentionPolicy.&lt;span style=&#34;color:#007f7f&#34;&gt;RUNTIME&lt;/span&gt;)
 @Target({ElementType.&lt;span style=&#34;color:#007f7f&#34;&gt;METHOD&lt;/span&gt;, ElementType.&lt;span style=&#34;color:#007f7f&#34;&gt;TYPE&lt;/span&gt;})
 &lt;span style=&#34;color:#fff;font-weight:bold&#34;&gt;public&lt;/span&gt; @interface Check { &lt;span style=&#34;color:#007f7f&#34;&gt;// error here
 &lt;/span&gt;&lt;span style=&#34;color:#007f7f&#34;&gt;&lt;/span&gt;
     String[] value();
 }
 &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;You also know that typical behavior among programmers where your program doesn&amp;rsquo;t compile, but you keep trying to compile it anyway hoping that it will magically just work. That&amp;rsquo;s what I did, and it actually ran. I couldn&amp;rsquo;t really just let this pass, so I decided to try deleting &lt;code&gt;Check.java&lt;/code&gt;. I got another compilation error, &lt;code&gt;Error: type Secure already defined&lt;/code&gt;&lt;/p&gt;
-&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;&lt;span style=&#34;color:#fff;font-weight:bold&#34;&gt;public&lt;/span&gt; &lt;span style=&#34;color:#fff;font-weight:bold&#34;&gt;class&lt;/span&gt; Secure &lt;span style=&#34;color:#fff;font-weight:bold&#34;&gt;extends&lt;/span&gt; Controller { &lt;span style=&#34;color:#007f7f&#34;&gt;// error here
+&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;&lt;span style=&#34;color:#fff;font-weight:bold&#34;&gt;public&lt;/span&gt; &lt;span style=&#34;color:#fff;font-weight:bold&#34;&gt;class&lt;/span&gt; Secure &lt;span style=&#34;color:#fff;font-weight:bold&#34;&gt;extends&lt;/span&gt; Controller { &lt;span style=&#34;color:#007f7f&#34;&gt;// error here
 &lt;/span&gt;&lt;span style=&#34;color:#007f7f&#34;&gt;&lt;/span&gt;
     @Before(unless={&lt;span style=&#34;color:#0ff;font-weight:bold&#34;&gt;&amp;#34;login&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#0ff;font-weight:bold&#34;&gt;&amp;#34;authenticate&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#0ff;font-weight:bold&#34;&gt;&amp;#34;logout&amp;#34;&lt;/span&gt;})
 
@@ -696,7 +696,7 @@ When I first saw the source of GTFS Editor, I was ecstatic. They used Play frame
 &lt;p&gt;The next problem is a sort of common thing most webapp developers have to solve one way or another. How do you set up the initial admin account? Phrased a different way, how do I login to this thing? The first thing I tried was just add a user into the &lt;code&gt;account&lt;/code&gt; table directly. One problem though was how to set the password correctly. Plaintext obviously wouldn&amp;rsquo;t work.&lt;/p&gt;
 &lt;p&gt;Another note regarding Play 1.x, it provides the &lt;a href=&#34;http://www.playframework.com/documentation/1.2.5/secure&#34;&gt;secure module&lt;/a&gt; which handles logins and keeping state, you simply need to implement the method &lt;code&gt;boolean authenticate(String username, String password)&lt;/code&gt;. It leaves the actual process of verifying the login to the programmer. This can be exploited by just making the method return &lt;code&gt;true&lt;/code&gt; and then any login would work. No need to actually set the password. Excellent.&lt;/p&gt;
 &lt;p&gt;And we&amp;rsquo;re logged in, just in time to encounter a runtime exception. This also works much like compilation errors in Play. It shows a page with the error and the relevant source lines. Now we get, &lt;code&gt;IndexOutOfBoundsException occured : Index: 0, Size: 0&lt;/code&gt;&lt;/p&gt;
-&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;&lt;span style=&#34;color:#fff;font-weight:bold&#34;&gt;if&lt;/span&gt;(session.&lt;span style=&#34;color:#007f7f&#34;&gt;get&lt;/span&gt;(&lt;span style=&#34;color:#0ff;font-weight:bold&#34;&gt;&amp;#34;agencyId&amp;#34;&lt;/span&gt;) == &lt;span style=&#34;color:#fff;font-weight:bold&#34;&gt;null&lt;/span&gt;) {
+&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;&lt;span style=&#34;color:#fff;font-weight:bold&#34;&gt;if&lt;/span&gt;(session.&lt;span style=&#34;color:#007f7f&#34;&gt;get&lt;/span&gt;(&lt;span style=&#34;color:#0ff;font-weight:bold&#34;&gt;&amp;#34;agencyId&amp;#34;&lt;/span&gt;) == &lt;span style=&#34;color:#fff;font-weight:bold&#34;&gt;null&lt;/span&gt;) {
 
     Agency agency = agencies.&lt;span style=&#34;color:#007f7f&#34;&gt;get&lt;/span&gt;(0); &lt;span style=&#34;color:#007f7f&#34;&gt;// error here
 &lt;/span&gt;&lt;span style=&#34;color:#007f7f&#34;&gt;&lt;/span&gt;
@@ -704,7 +704,7 @@ When I first saw the source of GTFS Editor, I was ecstatic. They used Play frame
     session.&lt;span style=&#34;color:#007f7f&#34;&gt;put&lt;/span&gt;(&lt;span style=&#34;color:#0ff;font-weight:bold&#34;&gt;&amp;#34;agencyName&amp;#34;&lt;/span&gt;, agency.&lt;span style=&#34;color:#007f7f&#34;&gt;name&lt;/span&gt;);
 &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Apparently, we need to have an agency. That&amp;rsquo;s generally simple enough. You just manually insert an agency into the &lt;code&gt;agency&lt;/code&gt; table. After that&amp;rsquo;s done, we finally have a view of the actual application. It&amp;rsquo;s very Bootstrap-y, but that&amp;rsquo;s just fine. The workflow though, is not perfectly intuitive, but I&amp;rsquo;ll talk about that some other day.&lt;/p&gt;
 &lt;p&gt;That&amp;rsquo;s not the end of it though, we still have to fix these bugs. The developer obviously didn&amp;rsquo;t have to put up with this when they were working, so what happened? Also, the log is showing some weird things,&lt;/p&gt;
-&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;~        _            _
+&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;~        _            _
 ~  _ __ | | __ _ _  _| |
 ~ | &amp;#39;_ \| |/ _&amp;#39; | || |_|
 ~ |  __/|_|\____|\__ (_)
@@ -815,7 +815,7 @@ Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
 &lt;h3 id=&#34;second-pass&#34;&gt;Second Pass&lt;/h3&gt;
 &lt;p&gt;So how did you do? First, the error that &lt;code&gt;type Check already defined&lt;/code&gt; usually does mean that &lt;code&gt;Check&lt;/code&gt; was already defined elsewhere. Looking in the app folder though, there was nothing of the sort. It&amp;rsquo;s the only one there that was &lt;code&gt;Check.java&lt;/code&gt;. But remember the secure module? Modules work by providing source files and Play just compiles them all together. Bingo, &lt;code&gt;Check.java&lt;/code&gt;. Doing a diff shows nothing was changed. So the solution really was just simply delete &lt;code&gt;Check.java&lt;/code&gt; and also &lt;code&gt;Secure.java&lt;/code&gt;. No more compilation errors!&lt;/p&gt;
 &lt;p&gt;The next question is, how do you get the initial user? There actually is some code that looks like it creates the default admin user,&lt;/p&gt;
-&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;&lt;span style=&#34;color:#fff;font-weight:bold&#34;&gt;if&lt;/span&gt;(Security.&lt;span style=&#34;color:#007f7f&#34;&gt;isConnected&lt;/span&gt;()) {
+&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#e5e5e5;background-color:#000;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;&lt;span style=&#34;color:#fff;font-weight:bold&#34;&gt;if&lt;/span&gt;(Security.&lt;span style=&#34;color:#007f7f&#34;&gt;isConnected&lt;/span&gt;()) {
     ...
     Account account = Account.&lt;span style=&#34;color:#007f7f&#34;&gt;find&lt;/span&gt;(&lt;span style=&#34;color:#0ff;font-weight:bold&#34;&gt;&amp;#34;username = ?&amp;#34;&lt;/span&gt;, Security.&lt;span style=&#34;color:#007f7f&#34;&gt;connected&lt;/span&gt;()).&lt;span style=&#34;color:#007f7f&#34;&gt;first&lt;/span&gt;();
     ...

+ 37 - 111
output/sitemap.xml

@@ -1,190 +1,116 @@
 <?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
   xmlns:xhtml="http://www.w3.org/1999/xhtml">
-  
   <url>
     <loc>https://pleasantprogrammer.com/posts/isp-issues.html</loc>
     <lastmod>2018-08-16T23:03:05+09:00</lastmod>
-  </url>
-  
-  <url>
+  </url><url>
     <loc>https://pleasantprogrammer.com/</loc>
     <lastmod>2018-08-16T23:03:05+09:00</lastmod>
-  </url>
-  
-  <url>
+  </url><url>
     <loc>https://pleasantprogrammer.com/posts.html</loc>
     <lastmod>2018-08-16T23:03:05+09:00</lastmod>
-  </url>
-  
-  <url>
+  </url><url>
     <loc>https://pleasantprogrammer.com/tags/sysadmin.html</loc>
     <lastmod>2018-08-16T23:03:05+09:00</lastmod>
-  </url>
-  
-  <url>
+  </url><url>
     <loc>https://pleasantprogrammer.com/tags.html</loc>
     <lastmod>2018-08-16T23:03:05+09:00</lastmod>
-  </url>
-  
-  <url>
+  </url><url>
     <loc>https://pleasantprogrammer.com/pages.html</loc>
     <lastmod>2018-02-10T16:47:55+09:00</lastmod>
-  </url>
-  
-  <url>
+  </url><url>
     <loc>https://pleasantprogrammer.com/pages/projects.html</loc>
     <lastmod>2018-02-10T16:47:55+09:00</lastmod>
-  </url>
-  
-  <url>
+  </url><url>
     <loc>https://pleasantprogrammer.com/posts/audventure.html</loc>
     <lastmod>2017-11-19T22:00:00+08:00</lastmod>
-  </url>
-  
-  <url>
+  </url><url>
     <loc>https://pleasantprogrammer.com/tags/games.html</loc>
     <lastmod>2017-11-19T22:00:00+08:00</lastmod>
-  </url>
-  
-  <url>
+  </url><url>
     <loc>https://pleasantprogrammer.com/tags/programming.html</loc>
     <lastmod>2017-11-19T22:00:00+08:00</lastmod>
-  </url>
-  
-  <url>
+  </url><url>
     <loc>https://pleasantprogrammer.com/tags/bluetooth.html</loc>
     <lastmod>2017-01-15T19:31:00+08:00</lastmod>
-  </url>
-  
-  <url>
+  </url><url>
     <loc>https://pleasantprogrammer.com/tags/hardware.html</loc>
     <lastmod>2017-01-15T19:31:00+08:00</lastmod>
-  </url>
-  
-  <url>
+  </url><url>
     <loc>https://pleasantprogrammer.com/posts/openpreppad.html</loc>
     <lastmod>2017-01-15T19:31:00+08:00</lastmod>
-  </url>
-  
-  <url>
+  </url><url>
     <loc>https://pleasantprogrammer.com/tags/haproxy.html</loc>
     <lastmod>2016-06-24T00:00:00+00:00</lastmod>
-  </url>
-  
-  <url>
+  </url><url>
     <loc>https://pleasantprogrammer.com/posts/haproxy-charset.html</loc>
     <lastmod>2016-06-24T00:00:00+00:00</lastmod>
-  </url>
-  
-  <url>
+  </url><url>
     <loc>https://pleasantprogrammer.com/tags/cloudflare.html</loc>
     <lastmod>2015-12-25T00:00:00+00:00</lastmod>
-  </url>
-  
-  <url>
+  </url><url>
     <loc>https://pleasantprogrammer.com/posts/cloudflare-shenanigans.html</loc>
     <lastmod>2015-12-25T00:00:00+00:00</lastmod>
-  </url>
-  
-  <url>
+  </url><url>
     <loc>https://pleasantprogrammer.com/tags/tiddlywiki.html</loc>
     <lastmod>2015-12-24T00:00:00+00:00</lastmod>
-  </url>
-  
-  <url>
+  </url><url>
     <loc>https://pleasantprogrammer.com/posts/tiddlywiki-in-the-sky-or-tiddlyweb-for-tw5.html</loc>
     <lastmod>2015-12-24T00:00:00+00:00</lastmod>
-  </url>
-  
-  <url>
+  </url><url>
     <loc>https://pleasantprogrammer.com/posts/is-my-terminal-window-active.html</loc>
     <lastmod>2015-06-07T00:00:00+00:00</lastmod>
-  </url>
-  
-  <url>
+  </url><url>
     <loc>https://pleasantprogrammer.com/posts/removing-pldtmydslbiz-from-the-zyxel-p-2612hnu.html</loc>
     <lastmod>2013-11-27T00:00:00+00:00</lastmod>
-  </url>
-  
-  <url>
+  </url><url>
     <loc>https://pleasantprogrammer.com/posts/console-keymap-switching.html</loc>
     <lastmod>2013-10-29T00:00:00+00:00</lastmod>
-  </url>
-  
-  <url>
+  </url><url>
     <loc>https://pleasantprogrammer.com/tags/systemd.html</loc>
     <lastmod>2013-10-29T00:00:00+00:00</lastmod>
-  </url>
-  
-  <url>
+  </url><url>
     <loc>https://pleasantprogrammer.com/posts/geocoding-services.html</loc>
     <lastmod>2013-09-25T00:00:00+00:00</lastmod>
-  </url>
-  
-  <url>
+  </url><url>
     <loc>https://pleasantprogrammer.com/tags/philippine-transit-app.html</loc>
     <lastmod>2013-09-25T00:00:00+00:00</lastmod>
-  </url>
-  
-  <url>
+  </url><url>
     <loc>https://pleasantprogrammer.com/posts/jeep-and-bus-schedules.html</loc>
     <lastmod>2013-07-28T00:00:00+00:00</lastmod>
-  </url>
-  
-  <url>
+  </url><url>
     <loc>https://pleasantprogrammer.com/posts/highways-in-otp.html</loc>
     <lastmod>2013-07-24T00:00:00+00:00</lastmod>
-  </url>
-  
-  <url>
+  </url><url>
     <loc>https://pleasantprogrammer.com/posts/elevation-data-in-otp.html</loc>
     <lastmod>2013-07-23T00:00:00+00:00</lastmod>
-  </url>
-  
-  <url>
+  </url><url>
     <loc>https://pleasantprogrammer.com/posts/graphserver.html</loc>
     <lastmod>2013-07-23T00:00:00+00:00</lastmod>
-  </url>
-  
-  <url>
+  </url><url>
     <loc>https://pleasantprogrammer.com/posts/transit-wand.html</loc>
     <lastmod>2013-07-15T00:00:00+00:00</lastmod>
-  </url>
-  
-  <url>
+  </url><url>
     <loc>https://pleasantprogrammer.com/posts/fare-data.html</loc>
     <lastmod>2013-07-13T00:00:00+00:00</lastmod>
-  </url>
-  
-  <url>
+  </url><url>
     <loc>https://pleasantprogrammer.com/posts/gtfs-editor.html</loc>
     <lastmod>2013-07-10T00:00:00+00:00</lastmod>
-  </url>
-  
-  <url>
+  </url><url>
     <loc>https://pleasantprogrammer.com/tags/lets-debug.html</loc>
     <lastmod>2013-07-10T00:00:00+00:00</lastmod>
-  </url>
-  
-  <url>
+  </url><url>
     <loc>https://pleasantprogrammer.com/posts/one-bus-or-maybe-jeep-away.html</loc>
     <lastmod>2013-07-09T00:00:00+00:00</lastmod>
-  </url>
-  
-  <url>
+  </url><url>
     <loc>https://pleasantprogrammer.com/posts/open-trip-planner.html</loc>
     <lastmod>2013-07-09T00:00:00+00:00</lastmod>
-  </url>
-  
-  <url>
+  </url><url>
     <loc>https://pleasantprogrammer.com/posts/jeepney-and-bus-routes.html</loc>
     <lastmod>2013-07-07T00:00:00+00:00</lastmod>
-  </url>
-  
-  <url>
+  </url><url>
     <loc>https://pleasantprogrammer.com/posts/philippine-transit-app-challenge.html</loc>
     <lastmod>2013-07-07T00:00:00+00:00</lastmod>
   </url>
-  
-</urlset>
+</urlset>

+ 1 - 1
output/tags.html

@@ -2,7 +2,7 @@
 <html lang="en-us">
 <head>
 	<meta charset="utf-8">
-	<meta name="generator" content="Hugo 0.69.2" />
+	<meta name="generator" content="Hugo 0.88.0" />
 	<meta name="viewport" content="width=device-width, initial-scale=1">
 	<link rel="stylesheet" href="/assets/css/theme.css">
 	<link rel="alternate" href="/rss.xml" type="application/rss+xml" title="Pleasant Programmer">