-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy path404.html
More file actions
353 lines (269 loc) · 13.1 KB
/
Copy path404.html
File metadata and controls
353 lines (269 loc) · 13.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
<!DOCTYPE html>
<html lang="en">
<head>
<script>
// GitHub Pages doesn't strip trailing slashes from extensionless
// URLs: /articles/foo serves foo.html, but /articles/foo/ 404s.
// When the 404 page loads, check whether the slash-less form
// exists (HEAD) and redirect there. Body is hidden during the
// check to avoid flashing 404 content before the redirect.
(function() {
var path = location.pathname;
if (path === '/' || !path.endsWith('/')) return;
var style = document.createElement('style');
style.textContent = 'body { visibility: hidden; }';
document.head.appendChild(style);
var target = path.replace(/\/+$/, '');
function reveal() { style.remove(); }
fetch(target, { method: 'HEAD' }).then(function(r) {
if (r.ok) {
location.replace(target + location.search + location.hash);
} else {
reveal();
}
}).catch(reveal);
})();
</script>
<script>
// Immediate theme application to prevent flash of white
(function() {
const theme = localStorage.getItem('theme') ||
(window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light');
if (theme === 'dark') {
document.documentElement.setAttribute('data-theme', 'dark');
}
})();
</script>
<!-- Google tag (gtag.js) — skipped on localhost so dev browsing doesn't skew stats -->
<script>
if (location.hostname === 'curtispoe.org' || location.hostname.endsWith('.curtispoe.org')) {
const gaTag = document.createElement('script');
gaTag.async = true;
gaTag.src = 'https://www.googletagmanager.com/gtag/js?id=G-BVDP76N9NB';
document.head.appendChild(gaTag);
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-BVDP76N9NB');
}
</script>
<!-- Facebook -->
<meta property="fb:app_id" content="329861788447703">
<meta property="og:image" content="https://curtispoe.org/static/images/facebook/ovid-facebook.jpg">
<meta property="og:image:alt" content="A black and white image of the author, Curtis “Ovid” Poe.">
<meta property="og:type" content="article">
<meta property="og:url" content="https://curtispoe.org/404">
<meta property="og:title" content="404 — Page Not Found">
<meta property="og:description" content="That page could not be found. It may never have existed, or it may have moved. Search or browse the articles and blog archive instead.">
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<link rel="manifest" href="/site.webmanifest">
<link rel="canonical" href="https://curtispoe.org/404">
<!-- Basic Page Needs -->
<meta charset="utf-8">
<title>404 — Page Not Found</title>
<meta name="description" content="That page could not be found. It may never have existed, or it may have moved. Search or browse the articles and blog archive instead.">
<meta name="author" content="Curtis Poe">
<link rel="alternate" type="application/rss+xml" title="Subscribe to my technical blog" href="https://curtispoe.org/article.rss">
<link rel="alternate" type="application/rss+xml" title="Subscribe to my personal blog" href="https://curtispoe.org/blog.rss">
<!-- Mobile Specific Metas -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- FONT -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Archivo:wght@400;500;600&family=JetBrains+Mono:wght@400;500&family=Newsreader:ital,opsz,wght@0,6..72,300;0,6..72,400;0,6..72,500;0,6..72,600;1,6..72,300;1,6..72,400&display=swap" rel="stylesheet">
<!-- CSS -->
<link rel="stylesheet" href="/static/css/normalize.css">
<link rel="stylesheet" href="/static/css/skeleton.css">
<link rel="stylesheet" href="/static/css/main.css">
<link rel="stylesheet" href="/static/css/dialog.css">
<link rel="stylesheet" href="/static/css/image.css">
<link rel="stylesheet" href="/static/css/collapsible.css">
<link rel="stylesheet" href="/static/css/dark-mode.css">
<script src="/static/js/dark-mode.js" defer></script>
<script src="/static/js/code-scroll.js" defer></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
</head>
<body>
<a class="skip-link" href="#content">Skip to content</a>
<header class="masthead">
<div class="wrap">
<div class="masthead-row">
<a class="wordmark" href="/">Curtis “Ovid” Poe <i>— AI, programming, and prose</i></a>
<div class="masthead-tools">
<span id="wasm_search"></span>
<!-- Note the usage of `type=module` here as this is an ES6 module -->
<script type="module">
// Use ES module import syntax to import functionality from the module
// that we have compiled.
//
// Note that the `default` import is an initialization function which
// will "boot" the module and make it ready to use. Currently browsers
// don't support natively imported WebAssembly as an ES module, but
// eventually the manual initialization won't be required!
// import { search, default as init } from './tinysearch_engine.js';
import { search, default as init } from '/static/js/search/tinysearch_engine.js';
window.search = search;
async function run() {
// First up we need to actually load the wasm file, so we use the
// default export to inform it where the wasm file is located on the
// server, and then we wait on the returned promise to wait for the
// wasm to be loaded.
//
// Note that instead of a string here you can also pass in an instance
// of `WebAssembly.Module` which allows you to compile your own module.
// Also note that the promise, when resolved, yields the wasm module's
// exports which is the same as importing the `*_bg` module in other
// modes
await init({ module_or_path: '/static/js/search/tinysearch_engine_bg.wasm' });
}
run();
</script>
<script>
// And afterwards we can use all the functionality defined in wasm.
function doSearch() {
let value = document.getElementById("demo").value;
console.log(`Search query: ${value}`);
const results = search(value, 5);
console.log(`Results: ${results}`);
let ul = document.getElementById("results");
ul.innerHTML = "";
for (i = 0; i < results.length; i++) {
var li = document.createElement("li");
let [title, url] = results[i];
let elemlink = document.createElement('a');
elemlink.innerHTML = title;
elemlink.setAttribute('href', url);
li.appendChild(elemlink);
ul.appendChild(li);
}
}
// https://stackoverflow.com/questions/47879864/how-can-i-check-if-a-browser-supports-webassembly#:~:text=There%20are%20a%20few%20ways,js).
const wasm_supported = (() => {
try {
if (typeof WebAssembly === "object"
&& typeof WebAssembly.instantiate === "function") {
const module = new WebAssembly.Module(Uint8Array.of(0x0, 0x61, 0x73, 0x6d, 0x01, 0x00, 0x00, 0x00));
if (module instanceof WebAssembly.Module)
return new WebAssembly.Instance(module) instanceof WebAssembly.Instance;
}
} catch (e) {
}
return false;
})();
if (!wasm_supported) {
// don't even show them the search box if they don't have web assembly
// document.getElementById("wasm_search").innerHTML = "Your browser does not support WebAssembly. Please use a modern browser.";
}
else {
document.getElementById("wasm_search").innerHTML = '<div id="search"><label class="visually-hidden" for="demo">Search this site</label><input type="search" id="demo" placeholder="Search" autocomplete="off" onkeyup="doSearch()"><ul id="results" aria-live="polite"></ul></div>';
}
</script>
<button id="theme-toggle" aria-label="Toggle Dark Mode">
<i class="fa fa-moon-o" aria-hidden="true"></i>
</button>
</div>
</div>
<nav class="site-nav" aria-label="Main">
<details class="nav-disclosure">
<summary class="nav-toggle">Menu</summary>
<ul class="nav-links">
<li><a href="/">Home</a></li>
<li><a href="/articles">Articles</a><a class="nav-feed" href="/article.rss" aria-label="Articles RSS feed">RSS</a></li>
<li><a href="/blog">Blog</a><a class="nav-feed" href="/blog.rss" aria-label="Blog RSS feed">RSS</a></li>
<li><a href="/projects">Projects</a></li>
<li><a href="/videos">Talks</a></li>
<li><a href="/wildagile">WildAgile</a></li>
<li><a href="/paad/">Learn PAAD</a></li>
<li><a href="/about">About</a></li>
</ul>
</details>
</nav>
</div>
</header>
<div class="wrap"> <div class="opener">
<div class="dateblock">
<span class="dateblock-meta">
</span>
</div>
<div class="opener-title">
<h1>404 — Page Not Found</h1>
</div>
</div>
<div class="page-body">
<aside class="marginalia">
</aside>
<main class="prose" id="content">
<aside class="global-message">
<p>Read <a href="/paad/">the new tutorial on writing <em>production-quality</em> software with AI</a>.</p>
</aside>
<article id="article">
<p>The page you were looking for has been
<code>undef</code>ined. Either I never wrote it, I moved it, or
the URL slipped past a regex that forgot to anchor with <code>\z</code>.</p>
<p><code>SELECT * FROM pages WHERE url = ?</code> returned zero
rows. As discussed in <a href="/articles/death-by-database">Death
by Database</a>, this is a feature, not a bug.</p>
<p>A few things you can try:</p>
<ul>
<li>Head back to the <a href="/">homepage</a>.</li>
<li>Browse the <a href="/articles">articles</a> or the <a href="/blog">blog</a>.</li>
<li>Search above — the search box runs on WebAssembly and is offended that you can't find what you wanted.</li>
<li>If you arrived here from a link on this site, please <a href="mailto:curtis.poe@gmail.com">email me</a> so I can fix it.</li>
</ul>
</article>
<p>If you'd like top-notch consulting or training, <a
href="mailto:curtis.poe@gmail.com">email me</a> and let's discuss
how I can help you. Read <a href="/about">more about me</a>
to learn more about my background.</p>
<div id="disqus_thread"></div>
</main><!-- /.prose -->
</div><!-- /.page-body -->
</div><!-- /.wrap -->
<footer class="site-footer">
<div class="wrap">
<div class="shelf">
<a href="https://www.amazon.com/Perl-Hacks-Programming-Debugging-Surviving/dp/0596526741/" target="_blank"><img src="/static/images/perl-hacks.jpg" alt="The cover of the “Perl Hacks” book"></a>
<a href="https://www.amazon.com/Beginning-Perl-Curtis-Poe/dp/1118013840/" target="_blank"><img src="/static/images/beginning-perl.jpg" alt="The cover of the “Beginning Perl” book"></a>
<p class="shelf-note">
<b>About the author</b>
Curtis “Ovid” Poe wrote <em>Beginning Perl</em> and co-wrote <em>Perl Hacks</em>.
Available for consulting and training — <a href="/about">read more about me</a>.
</p>
</div>
<strong>Tags</strong>
<ul class="cloud tags-scrollable" role="navigation" aria-label="Tag cloud for Ovid's site">
<li><a href="/tags/programming" data-weight="9">Software</a></li>
<li><a href="/tags/ai" data-weight="6">AI</a></li>
<li><a href="/tags/business" data-weight="6">Business</a></li>
<li><a href="/tags/corinna" data-weight="4">Corinna</a></li>
<li><a href="/tags/oop" data-weight="4">OOP</a></li>
<li><a href="/tags/perl" data-weight="4">Perl</a></li>
<li><a href="/tags/writing" data-weight="4">Writing</a></li>
<li><a href="/tags/politics" data-weight="3">Politics</a></li>
<li><a href="/tags/databases" data-weight="2">Databases</a></li>
<li><a href="/tags/math" data-weight="2">Math</a></li>
<li><a href="/tags/personal" data-weight="2">Personal</a></li>
<li><a href="/tags/science" data-weight="2">Science</a></li>
<li><a href="/tags/space" data-weight="2">Space</a></li>
<li><a href="/tags/expat" data-weight="1">Moving Abroad</a></li>
<li><a href="/tags/family" data-weight="1">Family</a></li>
</ul>
<div class="colophon">
<span>© 2018–2026 Curtis “Ovid” Poe</span>
<span class="colophon-links">
<a href="https://www.linkedin.com/in/curtispoe/">LinkedIn</a>
<a href="https://github.com/Ovid/">GitHub</a>
<a href="https://fosstodon.org/@ovid" rel="me">Mastodon</a>
<a href="https://bsky.app/profile/ovid.bsky.social">Bluesky</a>
<a href="/article.rss">Articles RSS</a>
<a href="/blog.rss">Blog RSS</a>
</span>
</div>
</div>
</footer>
<a href="#top" class="arrow" aria-label="Back to top"><button id="scrollToTopButton" type="button">↑</button></a>
<script src="/static/js/collapsible.js"></script>
</body>
</html>