-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
459 lines (379 loc) · 16.1 KB
/
index.html
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
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Maxime Buffa</title>
<link
href="https://fonts.googleapis.com/css2?family=Lato:wght@100;300;700&display=swap"
rel="stylesheet">
<link class="stylesheet" rel="stylesheet" href="/main.css" />
<link class="stylesheet" rel="stylesheet" href="/dark.css" />
<meta name="description" content="My personal website with tips and rants." />
</head>
<body class="stylesheet-mode" onload="loadActiveStylesheet()">
<script type="text/javascript">
function getStylesheetModeTags() {
return document.getElementsByClassName("stylesheet-mode");
}
function getStylesheetTogglerTags() {
return document.getElementsByClassName("stylesheet-toggler");
}
function loadActiveStylesheet() {
var activeStylesheet = localStorage.getItem("active-stylesheet");
if (["dark", "light"].indexOf(activeStylesheet) == -1) {
activeStylesheet = "dark";
}
var classes = "stylesheet-mode " + activeStylesheet;
for (elem of getStylesheetModeTags()) {
elem.setAttribute("class", classes);
}
updateGiscusStyle(activeStylesheet);
}
function getIconNameForMode(mode) {
if (mode == "dark") {
return "sunny";
}
return "moon";
}
function sendToIframe(iframe, message, url) {
iframe.contentWindow.postMessage(message, url);
}
function sendToGiscus(message) {
var iframe = document.querySelector("iframe.giscus-frame");
// WORKAROUND:
// If the iframe is loaded, we apply the new theme instantly.
// If it's not, then we delay the loading, so that the default "dark"
// theme won't override it once the iframe is loaded (on first page load).
// SHORTCOMINGS:
// This can display a dark Giscus inside a light page for a few seconds...
// But it prevents displaying a broken form or duplicating the iframe.
if (iframe) {
sendToIframe(iframe, { giscus: message }, "https://giscus.app");
} else {
setTimeout(sendToGiscus, 3000, message)
}
}
function updateGiscusStyle(mode) {
var theme = mode == "dark" ? "dark" : "light";
sendToGiscus({
setConfig: {
theme: theme
}
});
}
function switchStylesheets() {
var activeMode = "dark";
for (elem of getStylesheetModeTags()) {
switch (elem.className) {
case "stylesheet-mode dark":
activeMode = "light";
break;
case "stylesheet-mode light":
activeMode = "dark";
break;
default:
activeMode = "dark";
break;
}
elem.setAttribute("class", "stylesheet-mode " + activeMode);
}
localStorage.setItem("active-stylesheet", activeMode);
updateGiscusStyle(activeMode);
}
</script>
<script type="text/javascript">loadActiveStylesheet();</script>
<div id='stars'></div>
<div id='stars2'></div>
<div id='stars3'></div>
<main class="
m-auto max-w-full h-screen overflow-y-scroll overflow-x-hidden
text-black dark:text-white
">
<div class="w-228 max-w-screen m-auto p-4">
<div class="
sticky h-12 w-11/12 m-auto mt-4 mb-4 p-1 -top-px rounded-md
bg-black bg-opacity-100 shadow-2xl
dark:bg-black dark:bg-opacity-80 dark:shadow-transparent
">
<nav class="h-full w-full relative">
<ul
class="w-full h-full m-auto p-0 flex flex-row flex-nowrap justify-center items-center list-none">
<li>
<a class="
inline-block no-underline p-4 pt-1 pb-1 hover:no-underline border border-solid rounded-md border-transparent
text-white hover:bg-white hover:text-black active:text-black
dark:text-orange-500 dark:hover:bg-orange-500 dark:hover:text-neutral-900 dark:active:text-white"
href="/">Home</a>
</li>
<li>
<a class="
inline-block no-underline p-4 pt-1 pb-1 hover:no-underline border border-solid rounded-md border-transparent
text-white hover:bg-white hover:text-black active:text-black
dark:text-orange-500 dark:hover:bg-orange-500 dark:hover:text-neutral-900 dark:active:text-white"
href="/tutorials">Tutorials</a>
</li>
<li>
<a class="
inline-block no-underline p-4 pt-1 pb-1 hover:no-underline border border-solid rounded-md border-transparent
text-white hover:bg-white hover:text-black active:text-black
dark:text-orange-500 dark:hover:bg-orange-500 dark:hover:text-neutral-900 dark:active:text-white"
href="/tips">Tips</a>
</li>
<li>
<a class="
inline-block no-underline p-4 pt-1 pb-1 hover:no-underline border border-solid rounded-md border-transparent
text-white hover:bg-white hover:text-black active:text-black
dark:text-orange-500 dark:hover:bg-orange-500 dark:hover:text-neutral-900 dark:active:text-white"
href="/demos">Demos</a>
</li>
<li>
<a class="
inline-block no-underline p-4 pt-1 pb-1 hover:no-underline border border-solid rounded-md border-transparent
text-white hover:bg-white hover:text-black active:text-black
dark:text-orange-500 dark:hover:bg-orange-500 dark:hover:text-neutral-900 dark:active:text-white"
href="/tags">Tags</a>
</li>
<li>
<a class="
inline-block no-underline p-4 pt-1 pb-1 hover:no-underline border border-solid rounded-md border-transparent
text-white hover:bg-white hover:text-black active:text-black
dark:text-orange-500 dark:hover:bg-orange-500 dark:hover:text-neutral-900 dark:active:text-white"
href="/contact">Contact</a>
</li>
<li class="ml-auto">
<a class="
inline-block no-underline p-1 hover:no-underline border border-solid rounded-md border-transparent
text-white hover:bg-white hover:text-black active:text-black
dark:text-orange-500 dark:hover:bg-orange-500 dark:hover:text-neutral-900 dark:active:text-white"
onClick="switchStylesheets()">
<ion-icon class="stylesheet-toggler inline-block dark:hidden"
name="moon"></ion-icon>
<ion-icon class="stylesheet-toggler hidden dark:inline-block"
name="sunny"></ion-icon>
</a>
</li>
</ul>
</nav>
</div>
<div class="
w-11/12 m-auto mt-2 p-4
flex justify-center
flex-col flex-wrap
lg:flex-row lg:flex-nowrap
dark:bg-black dark:bg-opacity-60
">
<div class="w-full flex flex-col">
<article class="w-full">
<table class="w-full">
<thead>
<tr>
<th></th>
<th class="text-left">
<h1 class="m-2 p-2 inline-block font-bold text-2xl">Tutorials</h1>
<aside
class="m-2 p-2 inline-block font-normal dark:font-thin dark:text-white text-black">
Guides on specific topics
</aside>
</th>
</tr>
</thead>
<tbody>
<tr class="leading-10">
<td class="w-1/6 p-0.5 pr-2 text-right dark:text-white">2024-01-30</td>
<td class="w-5/6">
<a class="
underline hover:no-underline
dark:text-orange-500 dark:hover:text-orange-500 dark:hover:bg-neutral-900"
href="https://mbuffa.github.io/tutorials/20231212-postgres-autogenerated-fields/">Postgres: Using SQL generated columns</a>
</td>
</tr>
<tr class="leading-10">
<td class="w-1/6 p-0.5 pr-2 text-right dark:text-white">2022-01-22</td>
<td class="w-5/6">
<a class="
underline hover:no-underline
dark:text-orange-500 dark:hover:text-orange-500 dark:hover:bg-neutral-900"
href="https://mbuffa.github.io/tutorials/20220122-kubernetes-operators/">Kubernetes: Creating and using Operators</a>
</td>
</tr>
<tr class="leading-10">
<td class="w-1/6 p-0.5 pr-2 text-right dark:text-white">2021-09-16</td>
<td class="w-5/6">
<a class="
underline hover:no-underline
dark:text-orange-500 dark:hover:text-orange-500 dark:hover:bg-neutral-900"
href="https://mbuffa.github.io/tutorials/20210916-elixir-environment-variables/">Elixir: Using Environment Variables</a>
</td>
</tr>
<tr class="leading-10">
<td class="w-1/6 p-0.5 pr-2 text-right dark:text-white">2021-07-20</td>
<td class="w-5/6">
<a class="
underline hover:no-underline
dark:text-orange-500 dark:hover:text-orange-500 dark:hover:bg-neutral-900"
href="https://mbuffa.github.io/tutorials/20210720-kustomize-environment-variables/">Kustomize: Using Environment Variables</a>
</td>
</tr>
<tr class="leading-10">
<td class="w-1/6 p-0.5 pr-2 text-right dark:text-white">2020-11-11</td>
<td class="w-5/6">
<a class="
underline hover:no-underline
dark:text-orange-500 dark:hover:text-orange-500 dark:hover:bg-neutral-900"
href="https://mbuffa.github.io/tutorials/20201111-elixir-troubleshooting-mnesia/">Elixir: Troubleshooting Mnesia</a>
</td>
</tr>
<tr class="leading-10">
<td class="w-1/6 p-0.5 pr-2 text-right dark:text-white">2020-10-21</td>
<td class="w-5/6">
<a class="
underline hover:no-underline
dark:text-orange-500 dark:hover:text-orange-500 dark:hover:bg-neutral-900"
href="https://mbuffa.github.io/tutorials/20201022-elixir-clustering-on-kubernetes/">Elixir: Clustering on Kubernetes</a>
</td>
</tr>
<tr class="leading-10">
<td class="w-1/6 p-0.5 pr-2 text-right dark:text-white">2020-08-16</td>
<td class="w-5/6">
<a class="
underline hover:no-underline
dark:text-orange-500 dark:hover:text-orange-500 dark:hover:bg-neutral-900"
href="https://mbuffa.github.io/tutorials/20200816-developing-on-wsl/">Developing on WSL</a>
</td>
</tr>
</tbody>
</table>
</article>
<article class="w-full">
<table class="w-full">
<thead>
<tr>
<th></th>
<th class="text-left">
<h1 class="m-2 p-2 inline-block font-bold text-2xl">Tips</h1>
<aside
class="m-2 p-2 inline-block font-normal dark:font-thin dark:text-white text-black">
Very short guides on very specific topics
</aside>
</th>
</tr>
</thead>
<tbody>
<tr class="leading-10">
<td class="w-1/6 p-0.5 pr-2 text-right dark:text-white">2021-12-20</td>
<td class="w-5/6">
<a class="
underline hover:no-underline
dark:text-orange-500 dark:hover:text-orange-500 dark:hover:bg-neutral-900"
href="https://mbuffa.github.io/tips/20211220-kubectl-shortcuts/">Kubectl: Useful shortcuts</a>
</td>
</tr>
<tr class="leading-10">
<td class="w-1/6 p-0.5 pr-2 text-right dark:text-white">2021-10-29</td>
<td class="w-5/6">
<a class="
underline hover:no-underline
dark:text-orange-500 dark:hover:text-orange-500 dark:hover:bg-neutral-900"
href="https://mbuffa.github.io/tips/20211029-homebrew-bundles/">MacOS: Saving and restoring your Homebrew packages</a>
</td>
</tr>
<tr class="leading-10">
<td class="w-1/6 p-0.5 pr-2 text-right dark:text-white">2021-07-06</td>
<td class="w-5/6">
<a class="
underline hover:no-underline
dark:text-orange-500 dark:hover:text-orange-500 dark:hover:bg-neutral-900"
href="https://mbuffa.github.io/tips/20210706-postgres-filtering-with-count/">Postgres: Filtering with COUNT()</a>
</td>
</tr>
<tr class="leading-10">
<td class="w-1/6 p-0.5 pr-2 text-right dark:text-white">2020-08-15</td>
<td class="w-5/6">
<a class="
underline hover:no-underline
dark:text-orange-500 dark:hover:text-orange-500 dark:hover:bg-neutral-900"
href="https://mbuffa.github.io/tips/20200815-rails-deprecate-activerecord-attribute/">Rails: Deprecate an ActiveRecord attribute</a>
</td>
</tr>
</tbody>
</table>
</article>
<article class="w-full">
<table class="w-full">
<thead>
<tr>
<th></th>
<th class="text-left">
<h1 class="m-2 p-2 inline-block font-bold text-2xl">Demos</h1>
<aside
class="m-2 p-2 inline-block font-normal dark:font-thin dark:text-white text-black">
A few projects and WASM prototypes
</aside>
</th>
</tr>
</thead>
<tbody>
<tr class="leading-10">
<td class="w-1/6 p-0.5 pr-2 text-right dark:text-white">2023-01-26</td>
<td class="w-5/6">
<a class="
underline hover:no-underline
dark:text-orange-500 dark:hover:text-orange-500 dark:hover:bg-neutral-900"
href="https://mbuffa.github.io/demos/20230126-spell-it/">Spell It</a>
</td>
</tr>
<tr class="leading-10">
<td class="w-1/6 p-0.5 pr-2 text-right dark:text-white">2022-11-20</td>
<td class="w-5/6">
<a class="
underline hover:no-underline
dark:text-orange-500 dark:hover:text-orange-500 dark:hover:bg-neutral-900"
href="https://mbuffa.github.io/demos/20221120-astar-live-demo/">A* (A Star) Live Demo</a>
</td>
</tr>
<tr class="leading-10">
<td class="w-1/6 p-0.5 pr-2 text-right dark:text-white">2022-11-20</td>
<td class="w-5/6">
<a class="
underline hover:no-underline
dark:text-orange-500 dark:hover:text-orange-500 dark:hover:bg-neutral-900"
href="https://mbuffa.github.io/demos/20221120-turrets/">Turrets</a>
</td>
</tr>
<tr class="leading-10">
<td class="w-1/6 p-0.5 pr-2 text-right dark:text-white">2022-09-10</td>
<td class="w-5/6">
<a class="
underline hover:no-underline
dark:text-orange-500 dark:hover:text-orange-500 dark:hover:bg-neutral-900"
href="https://mbuffa.github.io/demos/20220910-dino-jump/">Dino Jump</a>
</td>
</tr>
</tbody>
</table>
</article>
</div>
</div>
<footer class="mt-20 p-4 text-center text-xs font-normal">
<span>
Written with <a
class="dark:text-orange-500 dark:hover:text-orange-500 dark:hover:bg-neutral-900"
href="https://www.getzola.org/" target="_blank">Zola</a> and <a
class="dark:text-orange-500 dark:hover:text-orange-500 dark:hover:bg-neutral-900"
href="https://tailwindcss.com/" target="_blank">Tailwind</a>
</span>
</footer>
</div>
<!-- Fix to avoid scrolling "under the overflow break" when using a ToC link.
<br>
</main>
<!-- Heap Analytics loader -->
<script type="text/javascript">
window.heap = window.heap || [], heap.load = function (e, t) { window.heap.appid = e, window.heap.config = t = t || {}; var r = document.createElement("script"); r.type = "text/javascript", r.async = !0, r.src = "https://cdn.heapanalytics.com/js/heap-" + e + ".js"; var a = document.getElementsByTagName("script")[0]; a.parentNode.insertBefore(r, a); for (var n = function (e) { return function () { heap.push([e].concat(Array.prototype.slice.call(arguments, 0))) } }, p = ["addEventProperties", "addUserProperties", "clearEventProperties", "identify", "resetIdentity", "removeEventProperty", "setEventProperties", "track", "unsetEventProperty"], o = 0; o < p.length; o++)heap[p[o]] = n(p[o]) };
heap.load("4008293954");
</script>
<script
src="https://unpkg.com/ionicons@5.2.3/dist/ionicons/ionicons.js"></script>
<script type="module"
src="https://unpkg.com/ionicons@5.2.3/dist/ionicons/ionicons.esm.js"></script>
</body>
</html>