-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.xml
509 lines (509 loc) · 67.1 KB
/
index.xml
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
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
<?xml version="1.0" encoding="utf-8" standalone="yes"?><?xml-stylesheet href="/feed.xsl" type="text/xsl"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Andy's Cafe</title><link>
https://blog.andylu.dev/</link><description>
Recent content in Andy's Cafe</description><generator>
Built with Hugo -- gohugo.io</generator><language>
en-us</language><copyright>Copyright © 2024, Andy Lu.</copyright><lastBuildDate>
Tue, 17 Sep 2024 21:59:52 -0400</lastBuildDate><atom:link href="https://blog.andylu.dev/index.xml" rel="self" type="application/xml"/><item><title>Tailscale and VLC</title><link>https://blog.andylu.dev/cappucchino/tailscale-and-vlc/</link><pubDate>Tue, 17 Sep 2024 21:53:34 -0400</pubDate><guid>https://blog.andylu.dev/cappucchino/tailscale-and-vlc/</guid><description><p>I have videos sitting on one computer and I want to stream it from another computer.</p>
<p>Thankfully they are both connected by Tailscale.</p>
<p>So on the server, I can run</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-shell" data-lang="shell"><span style="display:flex;"><span>tailscale serve --bg /path/to/my/directory/of/videos
</span></span></code></pre></div><p>And then from a client using something like VLC, I can connect to</p>
<pre tabindex="0"><code>https://red.panda-gopher.ts.net/Video1.mp4
</code></pre><p>But wait, there&rsquo;s more!</p>
<p>It turns out that <code>https://red.panda-gopher.ts.net/</code> is an index of all of the
files you&rsquo;re serving. So you could just copy the links right from that page to
paste into VLC.</p></description></item><item><title>Reviving a 2013 Macbook Pro</title><link>https://blog.andylu.dev/cappucchino/reviving-a-2013-macbook-pro/</link><pubDate>Mon, 16 Sep 2024 21:20:06 -0400</pubDate><guid>https://blog.andylu.dev/cappucchino/reviving-a-2013-macbook-pro/</guid><description><p>I have a Late 2013 Macbook Pro Retina, but it&rsquo;s been gathering dust in the closet for years because
the charging cable is losing more and more of its rubber sheath. And every time I plug it in, I get
more and more concerned that I&rsquo;m going to shock myself.</p>
<p>So I&rsquo;ve avoided using this laptop until very recently. I discovered that people make adapters to
MagSafe2 - the proprietary cable type that Apple puts (used to put?) in their laptops.</p></description></item><item><title>Hugo Debugging</title><link>https://blog.andylu.dev/cortado/hugo-debugging/</link><pubDate>Mon, 16 Sep 2024 20:04:49 -0400</pubDate><guid>https://blog.andylu.dev/cortado/hugo-debugging/</guid><description><p>Maybe I&rsquo;ve just been out of the game for too long, but I don&rsquo;t remember debugging to be as easy as</p>
<pre tabindex="0"><code>&lt;p&gt; {{ debug.Dump site.Thing.I.Want.To.Inspect }} &lt;/p&gt;
</code></pre><p><a href="https://gohugo.io/functions/debug/dump/">Source</a></p></description></item><item><title>SICP JS Chapter 2 Exercise 2.2 and 2.3</title><link>https://blog.andylu.dev/cappucchino/sicp-js-chapter-2-exercise-2.2-and-2.3/</link><pubDate>Sat, 13 Jul 2024 15:25:32 -0400</pubDate><guid>https://blog.andylu.dev/cappucchino/sicp-js-chapter-2-exercise-2.2-and-2.3/</guid><description><p>Here&rsquo;s my solution to exercise 2.2 and 2.3.</p>
<p>I wrote them in this online editor, <a href="https://sourceacademy.org/playground">source academy</a>, because
they provide the functions that the book considers primatives.</p>
<p>Exercise 2.2</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-javascript" data-lang="javascript"><span style="display:flex;"><span><span style="color:#75715e">/**
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"> * @param {Point} start
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"> * @param {Point} end
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"> */</span>
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">function</span> <span style="color:#a6e22e">make_segment</span> (<span style="color:#a6e22e">start</span>, <span style="color:#a6e22e">end</span>) {
</span></span><span style="display:flex;"><span> <span style="color:#66d9ef">return</span> <span style="color:#a6e22e">pair</span>(<span style="color:#a6e22e">start</span>, <span style="color:#a6e22e">end</span>);
</span></span><span style="display:flex;"><span>}
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#75715e">/**
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"> * @returns {Point}
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"> */</span>
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">function</span> <span style="color:#a6e22e">start_segment</span> (<span style="color:#a6e22e">s</span>) {
</span></span><span style="display:flex;"><span> <span style="color:#66d9ef">return</span> <span style="color:#a6e22e">head</span>(<span style="color:#a6e22e">s</span>);
</span></span><span style="display:flex;"><span>}
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#75715e">/**
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"> * @returns {Point}
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"> */</span>
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">function</span> <span style="color:#a6e22e">end_segment</span> (<span style="color:#a6e22e">s</span>) {
</span></span><span style="display:flex;"><span> <span style="color:#66d9ef">return</span> <span style="color:#a6e22e">tail</span>(<span style="color:#a6e22e">s</span>);
</span></span><span style="display:flex;"><span>}
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#75715e">/**
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"> * @param {int} x
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"> * @param {int} y
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"> */</span>
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">function</span> <span style="color:#a6e22e">make_point</span> (<span style="color:#a6e22e">x</span>, <span style="color:#a6e22e">y</span>) {
</span></span><span style="display:flex;"><span> <span style="color:#66d9ef">return</span> <span style="color:#a6e22e">pair</span>(<span style="color:#a6e22e">x</span>, <span style="color:#a6e22e">y</span>);
</span></span><span style="display:flex;"><span>}
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#75715e">/**
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"> * @param {Point} s
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"> * @returns {int}
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"> */</span>
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">function</span> <span style="color:#a6e22e">x_point</span> (<span style="color:#a6e22e">s</span>) {
</span></span><span style="display:flex;"><span> <span style="color:#66d9ef">return</span> <span style="color:#a6e22e">head</span>(<span style="color:#a6e22e">s</span>);
</span></span><span style="display:flex;"><span>}
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#75715e">/**
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"> * @param {Point} s
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"> * @returns {int}
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"> */</span>
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">function</span> <span style="color:#a6e22e">y_point</span> (<span style="color:#a6e22e">s</span>) {
</span></span><span style="display:flex;"><span> <span style="color:#66d9ef">return</span> <span style="color:#a6e22e">tail</span>(<span style="color:#a6e22e">s</span>);
</span></span><span style="display:flex;"><span>}
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#75715e">/**
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"> * @param {Point} s
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"> * @returns {int}
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"> */</span>
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">function</span> <span style="color:#a6e22e">midpoint_segment</span> (<span style="color:#a6e22e">s</span>) {
</span></span><span style="display:flex;"><span> <span style="color:#66d9ef">const</span> <span style="color:#a6e22e">start</span> <span style="color:#f92672">=</span> <span style="color:#a6e22e">start_segment</span>(<span style="color:#a6e22e">s</span>);
</span></span><span style="display:flex;"><span> <span style="color:#66d9ef">const</span> <span style="color:#a6e22e">end</span> <span style="color:#f92672">=</span> <span style="color:#a6e22e">end_segment</span>(<span style="color:#a6e22e">s</span>);
</span></span><span style="display:flex;"><span> <span style="color:#66d9ef">const</span> <span style="color:#a6e22e">x1</span> <span style="color:#f92672">=</span> <span style="color:#a6e22e">x_point</span>(<span style="color:#a6e22e">start</span>);
</span></span><span style="display:flex;"><span> <span style="color:#66d9ef">const</span> <span style="color:#a6e22e">y1</span> <span style="color:#f92672">=</span> <span style="color:#a6e22e">y_point</span>(<span style="color:#a6e22e">start</span>);
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span> <span style="color:#66d9ef">const</span> <span style="color:#a6e22e">x2</span> <span style="color:#f92672">=</span> <span style="color:#a6e22e">x_point</span>(<span style="color:#a6e22e">end</span>);
</span></span><span style="display:flex;"><span> <span style="color:#66d9ef">const</span> <span style="color:#a6e22e">y2</span> <span style="color:#f92672">=</span> <span style="color:#a6e22e">y_point</span>(<span style="color:#a6e22e">end</span>);
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span> <span style="color:#66d9ef">return</span> <span style="color:#a6e22e">make_point</span>( (<span style="color:#a6e22e">x2</span><span style="color:#f92672">-</span><span style="color:#a6e22e">x1</span>)<span style="color:#f92672">/</span><span style="color:#ae81ff">2</span> ,
</span></span><span style="display:flex;"><span> (<span style="color:#a6e22e">y2</span><span style="color:#f92672">-</span><span style="color:#a6e22e">y1</span>)<span style="color:#f92672">/</span><span style="color:#ae81ff">2</span> );
</span></span><span style="display:flex;"><span>}
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">function</span> <span style="color:#a6e22e">print_point</span>(<span style="color:#a6e22e">p</span>) {
</span></span><span style="display:flex;"><span> <span style="color:#66d9ef">return</span> <span style="color:#a6e22e">display</span>(<span style="color:#e6db74">&#34;(&#34;</span> <span style="color:#f92672">+</span> <span style="color:#a6e22e">stringify</span>(<span style="color:#a6e22e">x_point</span>(<span style="color:#a6e22e">p</span>)) <span style="color:#f92672">+</span> <span style="color:#e6db74">&#34;, &#34;</span>
</span></span><span style="display:flex;"><span> <span style="color:#f92672">+</span> <span style="color:#a6e22e">stringify</span>(<span style="color:#a6e22e">y_point</span>(<span style="color:#a6e22e">p</span>)) <span style="color:#f92672">+</span> <span style="color:#e6db74">&#34;)&#34;</span>);
</span></span><span style="display:flex;"><span>}
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">const</span> <span style="color:#a6e22e">origin</span> <span style="color:#f92672">=</span> <span style="color:#a6e22e">make_point</span>(<span style="color:#ae81ff">0</span>, <span style="color:#ae81ff">0</span>);
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">const</span> <span style="color:#a6e22e">unit_x</span> <span style="color:#f92672">=</span> <span style="color:#a6e22e">make_point</span>(<span style="color:#ae81ff">1</span>, <span style="color:#ae81ff">0</span>);
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">const</span> <span style="color:#a6e22e">unit_y</span> <span style="color:#f92672">=</span> <span style="color:#a6e22e">make_point</span>(<span style="color:#ae81ff">0</span>, <span style="color:#ae81ff">1</span>);
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">const</span> <span style="color:#a6e22e">two_x</span> <span style="color:#f92672">=</span> <span style="color:#a6e22e">make_point</span>(<span style="color:#ae81ff">2</span>, <span style="color:#ae81ff">0</span>);
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">const</span> <span style="color:#a6e22e">two_y</span> <span style="color:#f92672">=</span> <span style="color:#a6e22e">make_point</span>(<span style="color:#ae81ff">0</span>, <span style="color:#ae81ff">2</span>);
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#a6e22e">print_point</span>( <span style="color:#a6e22e">midpoint_segment</span>( <span style="color:#a6e22e">make_segment</span>( <span style="color:#a6e22e">origin</span>, <span style="color:#a6e22e">two_x</span> ) ) );
</span></span><span style="display:flex;"><span><span style="color:#75715e">// &#34;(1, 0)&#34;
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"></span><span style="color:#a6e22e">print_point</span>( <span style="color:#a6e22e">midpoint_segment</span>( <span style="color:#a6e22e">make_segment</span>( <span style="color:#a6e22e">origin</span>, <span style="color:#a6e22e">two_y</span> ) ) );
</span></span><span style="display:flex;"><span><span style="color:#75715e">// &#34;(0, 1)&#34;
</span></span></span></code></pre></div><p>Adding to this code, here&rsquo;s what I wrote for Exercise 2.3</p></description></item><item><title>Better Elisp Evaluation With Cider</title><link>https://blog.andylu.dev/cortado/better-elisp-evaluation-with-cider/</link><pubDate>Sat, 13 Jul 2024 15:09:36 -0400</pubDate><guid>https://blog.andylu.dev/cortado/better-elisp-evaluation-with-cider/</guid><description><p>By stealing <code>cider</code>&rsquo;s overlay function, I don&rsquo;t have to look down to the message line anymore. But
it&rsquo;s cool to have the usual output in the message line and in an overlay.</p>
<p><a href="https://endlessparentheses.com/eval-result-overlays-in-emacs-lisp.html">https://endlessparentheses.com/eval-result-overlays-in-emacs-lisp.html</a></p></description></item><item><title>Coffee</title><link>https://blog.andylu.dev/coffee/</link><pubDate>Mon, 10 Jun 2024 09:30:17 -0500</pubDate><guid>https://blog.andylu.dev/coffee/</guid><description><h1 id="elixr">Elixr</h1>
<h2 id="juan-peña">Juan Peña</h2>
<p>Notes:</p>
<ul>
<li>Tart</li>
</ul></description></item><item><title>Emacs Allows elisp in Find Replaces</title><link>https://blog.andylu.dev/cappucchino/emacs-allows-elisp-in-find-replaces/</link><pubDate>Fri, 24 May 2024 16:17:18 -0400</pubDate><guid>https://blog.andylu.dev/cappucchino/emacs-allows-elisp-in-find-replaces/</guid><description><h2 id="problem">Problem</h2>
<p>You have a massive list of tuples (like 800 tuples) and you need to increment the number of one slot in the tuple.</p>
<p>Start with this:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-elisp" data-lang="elisp"><span style="display:flex;"><span>(<span style="color:#ae81ff">1</span><span style="color:#f92672">,</span> a)<span style="color:#f92672">,</span> (<span style="color:#ae81ff">2</span><span style="color:#f92672">,</span> b)<span style="color:#f92672">,</span> (<span style="color:#ae81ff">3</span><span style="color:#f92672">,</span> c)<span style="color:#f92672">,</span> (<span style="color:#ae81ff">4</span><span style="color:#f92672">,</span> d)<span style="color:#f92672">,</span> (<span style="color:#ae81ff">5</span><span style="color:#f92672">,</span> e) <span style="color:#960050;background-color:#1e0010">…</span> (<span style="color:#ae81ff">400</span><span style="color:#f92672">,</span> aaabbbccc)
</span></span></code></pre></div><p>But you want:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-elisp" data-lang="elisp"><span style="display:flex;"><span>(<span style="color:#ae81ff">2</span><span style="color:#f92672">,</span> a)<span style="color:#f92672">,</span> (<span style="color:#ae81ff">3</span><span style="color:#f92672">,</span> b)<span style="color:#f92672">,</span> (<span style="color:#ae81ff">4</span><span style="color:#f92672">,</span> c)<span style="color:#f92672">,</span> (<span style="color:#ae81ff">5</span><span style="color:#f92672">,</span> d)<span style="color:#f92672">,</span> (<span style="color:#ae81ff">6</span><span style="color:#f92672">,</span> e) <span style="color:#960050;background-color:#1e0010">…</span> (<span style="color:#ae81ff">401</span><span style="color:#f92672">,</span> aaabbbccc)
</span></span></code></pre></div><h2 id="solution">Solution</h2>
<p><code>query-replace-regexp</code> in emacs allows you to run any elisp you want on the match.</p>
<p><code>M-x query-replace-regex</code> from <code>(\([0-9]+\)</code> to <code>(\,(+ 1 (string-to-number \1))</code>
emacs is backwards from every other regex engine. <code>(</code> is match a literal paren. <code>\( … \)</code> is a capture group.</p></description></item><item><title>Clojure Named Anonymous Functions</title><link>https://blog.andylu.dev/cortado/clojure-named-anonymous-functions/</link><pubDate>Mon, 13 May 2024 22:50:21 -0400</pubDate><guid>https://blog.andylu.dev/cortado/clojure-named-anonymous-functions/</guid><description><p><a href="https://github.com/ptaoussanis">Peter Taoussanis</a> said something like:</p>
<blockquote>
<p>when using annonymous functions, add a name to it so that where it errors, you
leave a breadcrumb back to the annonymous function in the stacktrace</p>
</blockquote>
<p>Credit: <a href="https://www.youtube.com/watch?v=q65T6P4xVVQ">https://www.youtube.com/watch?v=q65T6P4xVVQ</a></p></description></item><item><title>Mandatory Visual Emacs Settings on macOS</title><link>https://blog.andylu.dev/cortado/mandatory-visual-emacs-settings-on-macos/</link><pubDate>Mon, 13 May 2024 22:50:21 -0400</pubDate><guid>https://blog.andylu.dev/cortado/mandatory-visual-emacs-settings-on-macos/</guid><description><p>MacOS emacs needs to set the following:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-elisp" data-lang="elisp"><span style="display:flex;"><span>(add-to-list <span style="color:#e6db74">&#39;default-frame-alist</span> <span style="color:#f92672">&#39;</span>(ns-transparent-titlebar <span style="color:#f92672">.</span> <span style="color:#66d9ef">t</span>))
</span></span><span style="display:flex;"><span>(add-to-list <span style="color:#e6db74">&#39;default-frame-alist</span> <span style="color:#f92672">&#39;</span>(ns-appearance <span style="color:#f92672">.</span> dark))
</span></span></code></pre></div><p>I commented the old value right above it in case things went south, but it seems fine for now</p></description></item><item><title>Prettier Docker Ps</title><link>https://blog.andylu.dev/cortado/prettier-docker-ps/</link><pubDate>Mon, 13 May 2024 22:50:21 -0400</pubDate><guid>https://blog.andylu.dev/cortado/prettier-docker-ps/</guid><description><p>Today I learned you can select the columns you want displayed by <code>docker ps</code></p>
<pre tabindex="0"><code>docker ps --format &#34;table {{ .Names }}\t{{ .Status }}\t{{ .Ports }}&#34;
</code></pre><p>This is way less noisy</p></description></item><item><title>New Music From Coheed: The Joke</title><link>https://blog.andylu.dev/cortado/new-music-from-coheed-the-joke/</link><pubDate>Thu, 09 May 2024 09:43:25 -0400</pubDate><guid>https://blog.andylu.dev/cortado/new-music-from-coheed-the-joke/</guid><description><p>I saw in an email that Coheed put out a new single and rereleased Deranged.</p>
<p>I agree with the band that the single doesn&rsquo;t fit with the last album - it&rsquo;s too
synthy. I&rsquo;m not a huge fan of the new song right now. But maybe it will grow on
me after another listen.</p>
<p>Deranged is a trip down memory lane though and I will never be tired of that song</p></description></item><item><title>Use `rg` for Find and Replace</title><link>https://blog.andylu.dev/cappucchino/use-rg-for-find-and-replace/</link><pubDate>Fri, 03 May 2024 10:00:40 -0400</pubDate><guid>https://blog.andylu.dev/cappucchino/use-rg-for-find-and-replace/</guid><description><h2 id="how-to-do-the-thing">How to do the thing</h2>
<ol>
<li>Include a <code>-o</code> to limit the output to things that match</li>
<li>Use any number of capture groups in your search string</li>
<li>Include a <code>-r 'my-replacement-string'</code> and use <code>$x</code> in <code>my-replacement-string</code> to reference your capture groups
<ul>
<li><code>$x</code> starts at 1</li>
</ul>
</li>
</ol>
<h2 id="example">Example</h2>
<p>Say you have a log file and want to just match the date at the start of the line.</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>cat my-file-to-search <span style="color:#ae81ff">\
</span></span></span><span style="display:flex;"><span><span style="color:#ae81ff"></span> | rg -o <span style="color:#e6db74">&#39;^(\d+-\d+-\d+).*&#39;</span> <span style="color:#ae81ff">\
</span></span></span><span style="display:flex;"><span><span style="color:#ae81ff"></span> -r <span style="color:#e6db74">&#39;$1&#39;</span>
</span></span></code></pre></div><p>I didn&rsquo;t actually test this, but it should work.</p></description></item><item><title>Adding Newlines to One Line Files</title><link>https://blog.andylu.dev/cappucchino/adding-newlines-to-one-line-files/</link><pubDate>Wed, 24 Apr 2024 12:27:47 -0400</pubDate><guid>https://blog.andylu.dev/cappucchino/adding-newlines-to-one-line-files/</guid><description><h2 id="problem">Problem</h2>
<p>I have a directory of files and need to find all of the one liners and add newlines to them</p>
<h2 id="solution">Solution</h2>
<ul>
<li>mark every file in dired (not sure if there is a fast way to do this) by holding <code>m</code> from the top</li>
<li><code>!</code> (<code>dired-do-shell-command</code>)</li>
<li><code>wc -l</code></li>
<li><code>M-x sort-lines</code> ine the shell output buffer</li>
</ul>
<p>The sorting was just useful because it grouped the one liners at the top of the
buffer. But then I could cross reference names and open files from dired and
make the change I wanted to make.</p></description></item><item><title>Customizing Forgejo</title><link>https://blog.andylu.dev/cappucchino/customizing-forgejo/</link><pubDate>Sun, 07 Apr 2024 16:37:11 -0500</pubDate><guid>https://blog.andylu.dev/cappucchino/customizing-forgejo/</guid><description><p>I spent a good chunk of time today iterating on customizing Forgejo to have a
different logo, favicon, and start page. The docs say that the repo is not going
try to be backwards compatible in this area, so I want to write this down
because I&rsquo;ll probably have to do it again.</p>
<p>Here are the doc links:</p>
<ul>
<li><a href="https://forgejo.org/docs/next/admin/customization/">Forgejo - Interface customization</a> <sup id="fnref:1"><a href="#fn:1" class="footnote-ref" role="doc-noteref">1</a></sup></li>
</ul>
<blockquote>
<p>Setting a custom logo for your instance, serving custom public files or
modifying pages shown by Forgejo (such as the homepage) is possible. However,
they impose an additional maintenance burden on administrators and, most
importantly, are unsupported.</p></description></item><item><title>Setup Elfeed</title><link>https://blog.andylu.dev/cortado/setup-elfeed/</link><pubDate>Mon, 18 Mar 2024 22:02:47 -0400</pubDate><guid>https://blog.andylu.dev/cortado/setup-elfeed/</guid><description><p>I started doing this a while ago, but didn&rsquo;t really make it that far. It doesn&rsquo;t
cover my mobile reading experience, but maybe I don&rsquo;t care for now. I would also
love to sync this with bookmarks.andylu.dev and pull stuff from there so that
things actually get read.</p></description></item><item><title>Rust My Keyboard</title><link>https://blog.andylu.dev/cortado/rust-my-keyboard/</link><pubDate>Mon, 18 Mar 2024 21:51:33 -0400</pubDate><guid>https://blog.andylu.dev/cortado/rust-my-keyboard/</guid><description><p>2024 is the year that I explore rust. I think the most engaging way to do that
is to use it to compile QMK into some rust-ified executible and run my daily
driver keyboard off of it.</p>
<p>Obviously, I shouldn&rsquo;t brick my main keyboard to start. But thankfully, the
previous keyboard I used daily is also using the same microprocessor. So I
already have a playground or two, I just need to tweak emacs to get to work.</p></description></item><item><title>Webmention Myself</title><link>https://blog.andylu.dev/cappucchino/webmention-myself/</link><pubDate>Sun, 17 Mar 2024 21:03:48 -0400</pubDate><guid>https://blog.andylu.dev/cappucchino/webmention-myself/</guid><description><div class="h-entry">
<p>
in reply to:
<a class="u-in-reply-to"
href="https://blog.andylu.dev/cappucchino/webmention-test/">
@andylu
</a>
</p>
<p class="e-content">
Trying to render some webmentions on this site
</p>
</div></description></item><item><title>About</title><link>https://blog.andylu.dev/about/</link><pubDate>Fri, 15 Mar 2024 23:10:57 -0400</pubDate><guid>https://blog.andylu.dev/about/</guid><description><p>This is my about page</p>
<p>You can subscribe to updates.</p>
<p><a href="https://blog.andylu.dev/index.xml">Subscribe via RSS</a></p></description></item><item><title>Setting Up Mbsync</title><link>https://blog.andylu.dev/cappucchino/setting-up-mbsync/</link><pubDate>Mon, 22 Jan 2024 21:54:56 -0500</pubDate><guid>https://blog.andylu.dev/cappucchino/setting-up-mbsync/</guid><description><p>
Install</p>
<div class="src src-shell">
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-shell" data-lang="shell"><span style="display:flex;"><span> sudo apt install isync</span></span></code></pre></div>
</div>
<p>
Set up the config file</p>
<div class="src src-shell">
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-shell" data-lang="shell"><span style="display:flex;"><span> touch ~/.mbsyncrc</span></span></code></pre></div>
</div></description></item><item><title>Linux Man Pages</title><link>https://blog.andylu.dev/cappucchino/linux-man-pages/</link><pubDate>Mon, 22 Jan 2024 20:04:24 -0500</pubDate><guid>https://blog.andylu.dev/cappucchino/linux-man-pages/</guid><description><p>
I just learned I have a ton of pages in <code class="verbatim">/usr/local/share/man/man1</code>.</p>
<p>
And if you download a man page like <a href="https://manpages.opensuse.org/Tumbleweed/eza/eza.1.en.gz">this one for eza</a>, you can install it at
<code class="verbatim">/usr/local/share/man/man1/eza.1</code>.</p>
<p>
Then <code class="verbatim">man eza</code> just works</p></description></item><item><title>Leiningen Local Installs</title><link>https://blog.andylu.dev/cappucchino/leiningen-local-installs/</link><pubDate>Thu, 18 Jan 2024 20:27:06 -0500</pubDate><guid>https://blog.andylu.dev/cappucchino/leiningen-local-installs/</guid><description><p>
You can quickly create a new library with <code class="verbatim">lein new default my-library-name</code>.</p>
<p>
But if you add a <code class="verbatim">group-id</code> to that, <code class="verbatim">lein</code> is smart enought to just use the <code class="verbatim">artifact-id</code> for the
directory name, but the full maven id when installing to your local repository.</p>
<p>
I thought I was having issues with using <code class="verbatim">my-library-name</code> vs. <code class="verbatim">dev.andylu/my-library-name</code>, but I
can&#39;t reproduce the weird behavior now.</p>
<p>
So I&#39;m going to chalk it up to the usual &#34;I don&#39;t own the <code class="verbatim">~/.m2</code> folder&#34; and just run <code class="verbatim">sudo chown
-R &#34;$USER&#34;:&#34;$USER&#34; ~/.m2</code> and forget about it.</p></description></item><item><title>Bash HISTTIMEFORMAT</title><link>https://blog.andylu.dev/cappucchino/bash-histtimeformat/</link><pubDate>Mon, 08 Jan 2024 16:00:31 -0500</pubDate><guid>https://blog.andylu.dev/cappucchino/bash-histtimeformat/</guid><description><p>
I have this line in my <code class="verbatim">bashrc</code></p>
<div class="src src-bash">
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span> <span style="color:#75715e"># Prepend history entries with timestamps</span>
</span></span><span style="display:flex;"><span> export HISTTIMEFORMAT<span style="color:#f92672">=</span><span style="color:#e6db74">&#39;%FT%T%z &#39;</span></span></span></code></pre></div>
</div>
<p>
I just learned that <code class="verbatim">~/.bash_history</code> does not have these timestamps, and neither does the menu presented to you in <code class="verbatim">fzf</code>.</p>
<p>
But you do see it if you look in the output of the <code class="verbatim">history</code> command.</p></description></item><item><title>Projects I'm Watching</title><link>https://blog.andylu.dev/cappucchino/projects-i-m-watching/</link><pubDate>Sun, 31 Dec 2023 13:32:21 -0500</pubDate><guid>https://blog.andylu.dev/cappucchino/projects-i-m-watching/</guid><description><div id="outline-container-headline-1" class="outline-2">
<h2 id="headline-1">
Monica
</h2>
<div id="outline-text-headline-1" class="outline-text-2">
<p>
I like the thought of building this little database of info. But it does sound like a lot of work to
actually enter this information. I&#39;m waiting for the next version of the app to release because
right now the self-hosted app hosts one account.</p>
<ul>
<li><a href="https://github.com/monicahq/monica">https://github.com/monicahq/monica</a></li>
</ul>
</div>
</div>
<div id="outline-container-headline-2" class="outline-2">
<h2 id="headline-2">
Stalwart
</h2>
<div id="outline-text-headline-2" class="outline-text-2">
<p>
I tried setting this up already, but hit some snags getting outbound SMTP working on Oracle Cloud.
It&#39;s weird because I was able to manually use <code class="verbatim">telnet</code> to get to an external relay service, but
<code class="verbatim">stalwart</code> could not do the same thing. I will pick this up again another day.</p></description></item><item><title>Blogs to Look Through</title><link>https://blog.andylu.dev/cappucchino/blogs-to-look-through/</link><pubDate>Fri, 29 Dec 2023 11:49:06 -0500</pubDate><guid>https://blog.andylu.dev/cappucchino/blogs-to-look-through/</guid><description><p>
Here are some blogs I like to look through for inspiration:</p>
<ul>
<li><a href="https://notes.andymatuschak.org/About_these_notes">https://notes.andymatuschak.org/About_these_notes</a></li>
<li><a href="https://maggieappleton.com/garden">https://maggieappleton.com/garden</a></li>
<li><a href="https://www.reddit.com/user/Nicolas-Rougier/submitted/?sort=new">https://www.reddit.com/user/Nicolas-Rougier/submitted/?sort=new</a></li>
</ul></description></item><item><title>How to Write a Handwritten Page</title><link>https://blog.andylu.dev/cappucchino/how-to-write-a-handwritten-page/</link><pubDate>Thu, 21 Dec 2023 19:36:47 -0500</pubDate><guid>https://blog.andylu.dev/cappucchino/how-to-write-a-handwritten-page/</guid><description><p>
I lean on two shortcodes to create these pages.</p>
<p>
The <code class="verbatim">figure</code> code</p>
<div class="src src-go">
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-go" data-lang="go"><span style="display:flex;"><span> {{&lt;
</span></span><span style="display:flex;"><span> <span style="color:#a6e22e">figure</span>
</span></span><span style="display:flex;"><span> <span style="color:#a6e22e">src</span>=<span style="color:#e6db74">&#34;/IMG_0193.jpg&#34;</span>
</span></span><span style="display:flex;"><span> &gt;}}</span></span></code></pre></div>
</div>
<p>
And if I need links, the <code class="verbatim">hand-link</code> code</p>
<div class="src src-go">
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-go" data-lang="go"><span style="display:flex;"><span> {{&lt;
</span></span><span style="display:flex;"><span> <span style="color:#a6e22e">hand</span><span style="color:#f92672">-</span><span style="color:#a6e22e">link</span>
</span></span><span style="display:flex;"><span> <span style="color:#a6e22e">href</span>=<span style="color:#e6db74">&#34;https://google.com&#34;</span>
</span></span><span style="display:flex;"><span> <span style="color:#a6e22e">style</span>=<span style="color:#e6db74">`
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74"> left: 13.332134292565947%;
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74"> top: 55.21739130434783%;
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74"> width: 17.206235011990408%;
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74"> height: 17.536231884057973%;
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74"> `</span>
</span></span><span style="display:flex;"><span> &gt;}}</span></span></code></pre></div>
</div>
<p>
To generate the CSS for the links,</p>
<ul>
<li>upload the image to <a href="https://pixspy.com/">https://pixspy.com/</a></li>
<li>right click to make a selection for where the link should go</li>
<li>open the dev console and paste the following code</li>
</ul>
<div class="src src-js">
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-js" data-lang="js"><span style="display:flex;"><span> <span style="color:#66d9ef">var</span> [<span style="color:#a6e22e">_</span>, <span style="color:#a6e22e">ix</span>, <span style="color:#a6e22e">iy</span>] <span style="color:#f92672">=</span> <span style="color:#a6e22e">$</span>(<span style="color:#e6db74">&#39;.FileDetails-details&#39;</span>)[<span style="color:#ae81ff">0</span>].<span style="color:#a6e22e">textContent</span>.<span style="color:#a6e22e">match</span>(<span style="color:#e6db74">/(\d+) x (\d+)/</span>);
</span></span><span style="display:flex;"><span> <span style="color:#66d9ef">var</span> [<span style="color:#a6e22e">_</span>, <span style="color:#a6e22e">dx</span>, <span style="color:#a6e22e">dy</span>, <span style="color:#a6e22e">sx</span>, <span style="color:#a6e22e">sy</span>] <span style="color:#f92672">=</span> <span style="color:#a6e22e">$</span>(<span style="color:#e6db74">&#39;.Selection-summary&#39;</span>)[<span style="color:#ae81ff">0</span>].<span style="color:#a6e22e">textContent</span>.<span style="color:#a6e22e">match</span>(<span style="color:#e6db74">/(\d+) x (\d+) @ \((\d+), (\d+)\)/</span>);
</span></span><span style="display:flex;"><span> [<span style="color:#a6e22e">ix</span>, <span style="color:#a6e22e">iy</span>, <span style="color:#a6e22e">sx</span>, <span style="color:#a6e22e">sy</span>, <span style="color:#a6e22e">dx</span>, <span style="color:#a6e22e">dy</span>] <span style="color:#f92672">=</span> [<span style="color:#a6e22e">ix</span>, <span style="color:#a6e22e">iy</span>, <span style="color:#a6e22e">sx</span>, <span style="color:#a6e22e">sy</span>, <span style="color:#a6e22e">dx</span>, <span style="color:#a6e22e">dy</span>].<span style="color:#a6e22e">map</span>(<span style="color:#a6e22e">x</span> =&gt; parseInt(<span style="color:#a6e22e">x</span>));
</span></span><span style="display:flex;"><span> <span style="color:#a6e22e">console</span>.<span style="color:#a6e22e">log</span>(<span style="color:#e6db74">`left: </span><span style="color:#e6db74">${</span>(<span style="color:#ae81ff">100</span> <span style="color:#f92672">*</span> <span style="color:#a6e22e">sx</span> <span style="color:#f92672">/</span> <span style="color:#a6e22e">ix</span>) <span style="color:#f92672">+</span> <span style="color:#ae81ff">3.5</span><span style="color:#e6db74">}</span><span style="color:#e6db74">%; top: </span><span style="color:#e6db74">${</span><span style="color:#ae81ff">100</span> <span style="color:#f92672">*</span> <span style="color:#a6e22e">sy</span> <span style="color:#f92672">/</span> <span style="color:#a6e22e">iy</span><span style="color:#e6db74">}</span><span style="color:#e6db74">%; width: </span><span style="color:#e6db74">${</span><span style="color:#ae81ff">100</span> <span style="color:#f92672">*</span> <span style="color:#a6e22e">dx</span> <span style="color:#f92672">/</span> <span style="color:#a6e22e">ix</span><span style="color:#e6db74">}</span><span style="color:#e6db74">%; height: </span><span style="color:#e6db74">${</span><span style="color:#ae81ff">100</span> <span style="color:#f92672">*</span> <span style="color:#a6e22e">dy</span> <span style="color:#f92672">/</span> <span style="color:#a6e22e">iy</span><span style="color:#e6db74">}</span><span style="color:#e6db74">%;`</span>)</span></span></code></pre></div>
</div></description></item><item><title>Webmention Test</title><link>https://blog.andylu.dev/cappucchino/webmention-test/</link><pubDate>Mon, 11 Dec 2023 20:14:31 -0500</pubDate><guid>https://blog.andylu.dev/cappucchino/webmention-test/</guid><description><div class="h-entry">
<p>
in reply to:
<a class="u-in-reply-to"
href="https://aaronparecki.com/2018/06/30/11/your-first-webmention">
@aaronpk
</a>
</p>
<p class="e-content">
Trying out this guide to sending webmentions
</p>
</div></description></item><item><title>This is an Org Post</title><link>https://blog.andylu.dev/cappucchino/this-is-an-org-post/</link><pubDate>Mon, 11 Dec 2023 15:52:40 -0500</pubDate><guid>https://blog.andylu.dev/cappucchino/this-is-an-org-post/</guid><description><p>
Today I learned that <code class="verbatim">hugo</code> has support for org-mode files.</p>
<p>
I knew that <a href="https://ox-hugo.scripter.co/">ox-hugo</a> is a thing, but this is different. And I never thought to dig into the docs to
figure out if I can author posts in org-mode and have it work.</p></description></item><item><title>Org Mode Is Better Glue Code Than Bash</title><link>https://blog.andylu.dev/cappucchino/org-mode-is-better-glue-code-than-bash/</link><pubDate>Mon, 04 Dec 2023 21:47:32 -0500</pubDate><guid>https://blog.andylu.dev/cappucchino/org-mode-is-better-glue-code-than-bash/</guid><description><h1 id="tldr">TLDR</h1>
<p>This post is just to document a scenario I put myself in. But I wanted to write it down in case I
need to use it again in the future.</p>
<h1 id="problem">Problem</h1>
<ul>
<li>
<p>You have a CSV file from your bank with some expenses listed.</p>
</li>
<li>
<p>You want to generate an PDF invoice file to send to someone and collect some money.</p>
</li>
</ul>
<h1 id="solution">Solution</h1>
<p>I think the solution is to</p>
<ol>
<li>import the CSV into an org table</li>
<li>use your favorite programming language to format the data</li>
<li>use <a href="https://github.com/maaslalani/invoice/tree/0fb2e9d84385c6393ca6925bc6d25a89555b0b2d">maaslalani/invoice</a> to quickly make a PDF</li>
</ol>
<h2 id="deep-dive">Deep Dive</h2>
<p>When I&rsquo;m dealing with CSV files, I often reach for <code>org-mode</code> in <code>emacs</code> just to make the file
easier to read.</p></description></item><item><title>Python Packaging</title><link>https://blog.andylu.dev/cappucchino/python-packaging/</link><pubDate>Fri, 01 Dec 2023 12:13:04 -0500</pubDate><guid>https://blog.andylu.dev/cappucchino/python-packaging/</guid><description><p>I didn&rsquo;t know what to use between <code>poetry</code> and <code>hatch</code>.</p>
<p>I just followed the guide <a href="https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#">from the Packaging Guide</a>.</p>
<p>It ended with me having the following directory structure</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-text" data-lang="text"><span style="display:flex;"><span>.
</span></span><span style="display:flex;"><span>├── pyproject.toml
</span></span><span style="display:flex;"><span>├── README.org
</span></span><span style="display:flex;"><span>├── src
</span></span><span style="display:flex;"><span>│ └── andy_aoc_2023
</span></span><span style="display:flex;"><span>│ ├── day1.py
</span></span><span style="display:flex;"><span>│ └── __init__.py
</span></span><span style="display:flex;"><span>└── tests
</span></span></code></pre></div><p>Which isn&rsquo;t too crazy I guess.</p></description></item><item><title>Magit: Multiple Push Remotes</title><link>https://blog.andylu.dev/cappucchino/magit-multiple-push-remotes/</link><pubDate>Fri, 01 Dec 2023 11:06:44 -0500</pubDate><guid>https://blog.andylu.dev/cappucchino/magit-multiple-push-remotes/</guid><description><p>I wanted to do the equivalent of this, but in magit</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-shell" data-lang="shell"><span style="display:flex;"><span>git remote rename origin github
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>git remote add codeberg https://codeberg.org/jkreeftmeijer/ox-md-title.el.git
</span></span><span style="display:flex;"><span>git remote add origin https://codeberg.org/jkreeftmeijer/ox-md-title.el.git
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>git remote set-url --add --push origin https://codeberg.org/jkreeftmeijer/ox-md-title.el.git
</span></span><span style="display:flex;"><span>git remote set-url --add --push origin https://github.com/jeffkreeftmeijer/ox-md-title.el
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>git remote show origin
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>* remote origin
</span></span><span style="display:flex;"><span> Fetch URL: https://codeberg.org/jkreeftmeijer/ox-md-title.el.git
</span></span><span style="display:flex;"><span> Push URL: https://codeberg.org/jkreeftmeijer/ox-md-title.el.git
</span></span><span style="display:flex;"><span> Push URL: https://github.com/jeffkreeftmeijer/ox-md-title.el
</span></span><span style="display:flex;"><span> HEAD branch: main
</span></span><span style="display:flex;"><span> Remote branch:
</span></span><span style="display:flex;"><span> main new <span style="color:#f92672">(</span>next fetch will store in remotes/origin<span style="color:#f92672">)</span>
</span></span><span style="display:flex;"><span> Local ref configured <span style="color:#66d9ef">for</span> <span style="color:#e6db74">&#39;git push&#39;</span>:
</span></span><span style="display:flex;"><span> main pushes to main <span style="color:#f92672">(</span>up to date<span style="color:#f92672">)</span>
</span></span></code></pre></div><p><a href="https://jeffkreeftmeijer.com/git-multiple-remotes/">Source</a></p></description></item><item><title>Self Hosting Email</title><link>https://blog.andylu.dev/cappucchino/self-hosting-email/</link><pubDate>Thu, 30 Nov 2023 17:03:01 -0500</pubDate><guid>https://blog.andylu.dev/cappucchino/self-hosting-email/</guid><description><p>I&rsquo;ve made a couple attempts at this so far.</p>
<p>The software I&rsquo;ve been looking at is:</p>
<ul>
<li><a href="https://stalw.art/">https://stalw.art/</a></li>
<li><a href="https://www.cyrusimap.org/">https://www.cyrusimap.org/</a></li>
</ul>
<p>I didn&rsquo;t really give Cyrus a good go because I got Stalwart in a spot where I could receive messages
through IMAP.</p>
<p>I didn&rsquo;t get far at all with sending messages. Oracle is my currently cloud provider and port 25 is
blocked on my account.</p>
<p>The feature that drew me to both of these projects is JMAP support. I heard about it while talking
to a few people at a recent Philly JS meetup.</p></description></item><item><title>Bash `while` loops</title><link>https://blog.andylu.dev/cappucchino/bash-while-loops/</link><pubDate>Mon, 27 Nov 2023 15:54:59 -0500</pubDate><guid>https://blog.andylu.dev/cappucchino/bash-while-loops/</guid><description><p>Here&rsquo;s a bash snippet I can see myself using one day</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span><span style="color:#66d9ef">while</span> :; <span style="color:#66d9ef">do</span> ls -lh <span style="color:#e6db74">&#34;</span><span style="color:#66d9ef">$(</span> ls -t1 /tmp/tmp* | head -n <span style="color:#ae81ff">1</span> <span style="color:#66d9ef">)</span><span style="color:#e6db74">&#34;</span>; sleep 10; <span style="color:#66d9ef">done</span>
</span></span></code></pre></div><ul>
<li><code>&quot;$( ls -t1 /tmp/tmp* | head -n 1 )&quot;</code>: Get a file name
<ul>
<li><code>ls -t1 /tmp/tmp*</code>: List the files in <code>/tmp/tmp*</code> ordered by most recently updated</li>
<li><code>head -n 1</code>: Get the first one</li>
</ul>
</li>
<li><code>ls -lh &lt;one-file&gt;</code>: Get the long listing of just one file</li>
<li>The rest of it is just to do it over and over so that I can see changes in the file size</li>
</ul></description></item><item><title>Archive</title><link>https://blog.andylu.dev/old-now/archive/</link><pubDate>Thu, 16 Nov 2023 00:00:00 -0500</pubDate><guid>https://blog.andylu.dev/old-now/archive/</guid><description><p>See my <a href="https://blog.andylu.dev/now">now</a> page for my latest updates.</p>
<h1 id="archived-on-2024-07-13">Archived on 2024-07-13</h1>
<h1 id="reading">Reading</h1>
<p>I picked up and started some books</p>
<ul>
<li><a href="https://bookshop.org/p/books/the-mythical-man-month-essays-on-software-engineering-anniversary-edition-frederick-brooks/9437212?ean=9780201835953">The Mythical Man-Month</a></li>
<li><a href="https://bookshop.org/p/books/the-mythical-man-month-essays-on-software-engineering-anniversary-edition-frederick-brooks/9437212?ean=9780201835953">A Short Treatise Inviting the Reader to Discover the Subtle Art of Go</a></li>
</ul>
<h1 id="go">Go</h1>
<p>I downloaded this app to play more games. And I&rsquo;ve been kicking the weak AI&rsquo;s butt. But the less weak bots give me trouble still</p>
<h1 id="archived-on-2024-05-02">Archived on 2024-05-02</h1>
<h2 id="self-hosting-stuff">Self Hosting stuff</h2>
<p>I&rsquo;m working on my tech independence and putting my tech skills to the test.</p></description></item><item><title>Now</title><link>https://blog.andylu.dev/now/</link><pubDate>Thu, 16 Nov 2023 00:00:00 -0500</pubDate><guid>https://blog.andylu.dev/now/</guid><description><p>This is <a href="https://nownownow.com/about">a now page</a>. For stuff that used to be here, check out the
<a href="https://blog.andylu.dev/old-now/archive">archive</a>.</p>
<h1 id="reading">Reading</h1>
<p>I picked up <a href="https://mitpress.mit.edu/9780262543231/structure-and-interpretation-of-computer-programs/">SICP JS</a> again.</p>
<p>I even wrote up <a href="https://blog.andylu.dev/cappucchino/sicp-js-chapter-2-exercise-2.2-and-2.3">my solutions to a few exercises</a></p>
<h1 id="apps">Apps</h1>
<p>I discovered that <a href="https://anytype.io/">anytype</a> recently released their multiplayer feature, so I&rsquo;m
going to try and switch off of Notion for some things and move to Anytype.</p></description></item><item><title>My Babashka Cookbook</title><link>https://blog.andylu.dev/cappucchino/my-babashka-cookbook/</link><pubDate>Sun, 29 Oct 2023 23:26:22 -0400</pubDate><guid>https://blog.andylu.dev/cappucchino/my-babashka-cookbook/</guid><description><p>
This post is the one I want to reference when I do something in `babashka` and forget syntax or
something.</p>
<div id="outline-container-headline-1" class="outline-2">
<h2 id="headline-1">
Capture a process&#39;s `STDOUT` and process the string after
</h2>
<div id="outline-text-headline-1" class="outline-text-2">
<div class="src src-clojure">
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-clojure" data-lang="clojure"><span style="display:flex;"><span> (<span style="color:#a6e22e">require</span> <span style="color:#f92672">&#39;</span>[babashka.process <span style="color:#e6db74">:as</span> bp])
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span> (-&gt; (<span style="color:#a6e22e">bp/shell</span> {<span style="color:#e6db74">:out</span> <span style="color:#e6db74">:string</span>} <span style="color:#e6db74">&#34;do-the-thing&#34;</span>)
</span></span><span style="display:flex;"><span> <span style="color:#e6db74">:out</span>
</span></span><span style="display:flex;"><span> (<span style="color:#a6e22e">clojure.string/split</span> <span style="color:#f92672">#</span><span style="color:#e6db74">&#34;\n&#34;</span>))</span></span></code></pre></div>
</div>
</div>
</div>
<div id="outline-container-headline-2" class="outline-2">
<h2 id="headline-2">
Import a local library
</h2>
<div id="outline-text-headline-2" class="outline-text-2">
<div id="outline-container-headline-3" class="outline-3">
<h3 id="headline-3">
Dynamically
</h3>
<div id="outline-text-headline-3" class="outline-text-3">
<p>
You can add deps as one of the first steps in your scripts.</p>
<div class="src src-clojure">
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-clojure" data-lang="clojure"><span style="display:flex;"><span> (<span style="color:#a6e22e">require</span> <span style="color:#f92672">&#39;</span>[babashka.deps <span style="color:#e6db74">:as</span> deps])
</span></span><span style="display:flex;"><span> (<span style="color:#a6e22e">deps/add-deps</span>
</span></span><span style="display:flex;"><span> <span style="color:#f92672">&#39;</span>{<span style="color:#e6db74">:deps</span> {io.github.lispyclouds/bblgum {<span style="color:#e6db74">:git/sha</span> <span style="color:#e6db74">&#34;1d4de3d49b84f64d1b71930fa1161f8d2622a4d9&#34;</span>}
</span></span><span style="display:flex;"><span> dev.andylu/clj-lipgloss {<span style="color:#e6db74">:local/root</span> <span style="color:#e6db74">&#34;/home/andy/git/clj-lipgloss&#34;</span>}}})
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span> (<span style="color:#a6e22e">require</span> <span style="color:#f92672">&#39;</span>[bblgum.core <span style="color:#e6db74">:as</span> b])
</span></span><span style="display:flex;"><span> (<span style="color:#a6e22e">require</span> <span style="color:#f92672">&#39;</span>[clj-lipgloss.core <span style="color:#e6db74">:as</span> lg <span style="color:#e6db74">:use</span> [log-info log-warn log-debug]])</span></span></code></pre></div>
</div>
</div>
</div>
<div id="outline-container-headline-4" class="outline-3">
<h3 id="headline-4">
Statically
</h3>
<div id="outline-text-headline-4" class="outline-text-3">
<p>
Put this in a `bb.edn`</p></description></item><item><title>Biff Tutorial</title><link>https://blog.andylu.dev/cappucchino/biff-tutorial/</link><pubDate>Tue, 17 Oct 2023 19:48:08 -0400</pubDate><guid>https://blog.andylu.dev/cappucchino/biff-tutorial/</guid><description><p>Here are my notes as I go through <a href="https://biffweb.com/docs/tutorial/build-a-chat-app/">the Biff tutorial</a>.</p>
<p>I&rsquo;ve made a <a href="https://github.com/luandy64/biff-tutorial">github repo here</a>.</p>
<p>I spotted something that didn&rsquo;t work quite right. So I opened an issue and PR on the main repo. Here
are those links: <a href="https://github.com/jacobobryant/eelchat/issues/2">issue</a> and <a href="https://github.com/jacobobryant/eelchat/pull/3">PR</a>.</p>
<p>So I got to a point where the tutorial wanted me to hook up an email sending service to get login
information sent out to users. I knew I already had a Resend account, so I opted to hook that up
instead.</p></description></item><item><title>Babashka Datetime</title><link>https://blog.andylu.dev/cappucchino/babashka-datetime/</link><pubDate>Sun, 15 Oct 2023 14:39:22 -0400</pubDate><guid>https://blog.andylu.dev/cappucchino/babashka-datetime/</guid><description><p>If I need a datetime in Python, I reach for</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-python" data-lang="python"><span style="display:flex;"><span><span style="color:#f92672">from</span> datetime <span style="color:#f92672">import</span> datetime
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>datetime<span style="color:#f92672">.</span>now()
</span></span></code></pre></div><p>So I need something as quick for clojure.</p>
<p>Apparently, it&rsquo;s just</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-clojure" data-lang="clojure"><span style="display:flex;"><span>(-&gt; (<span style="color:#a6e22e">java.time.LocalDate/now</span>)
</span></span><span style="display:flex;"><span> str)
</span></span><span style="display:flex;"><span><span style="color:#75715e">;; =&gt; &#34;2023-10-15&#34;</span>
</span></span></code></pre></div></description></item><item><title>Future Blog Ideas</title><link>https://blog.andylu.dev/cappucchino/future-blog-ideas/</link><pubDate>Sat, 14 Oct 2023 21:48:09 -0400</pubDate><guid>https://blog.andylu.dev/cappucchino/future-blog-ideas/</guid><description><p>Here&rsquo;s just a running list of things I want to write down thoughts about.</p>
<ul>
<li><code>babashka</code> CLI design</li>
<li><code>traefik</code> as a reverse proxy for tailscale services</li>
<li>apps and tools I use</li>
</ul></description></item><item><title>Terminal Logging With Color</title><link>https://blog.andylu.dev/cappucchino/terminal-logging-with-color/</link><pubDate>Sat, 14 Oct 2023 21:25:56 -0400</pubDate><guid>https://blog.andylu.dev/cappucchino/terminal-logging-with-color/</guid><description><p>These days I&rsquo;ve been writing a lot of babashka instead of reaching for bash or python to do minor
scripting tasks at work.</p>
<p>I am also a big fan of the work done at <a href="https://charm.sh">charm</a> and the relevant products in this case are
<a href="https://github.com/charmbracelet/gum">gum</a> and <a href="https://github.com/charmbracelet/lipgloss">lipgloss</a>.</p>
<p>Using <code>gum style</code> I can log any text in basically any color I want. And while there&rsquo;s not a ton of
functional benefits to this, I think there&rsquo;s something to be said about adding color into the logs
we write.</p></description></item><item><title>Git Submodules</title><link>https://blog.andylu.dev/cappucchino/git-submodules/</link><pubDate>Tue, 08 Nov 2022 23:00:56 -0500</pubDate><guid>https://blog.andylu.dev/cappucchino/git-submodules/</guid><description><p>The first time I learned about <code>git submodules</code> was actually from working with
<a href="https://gohugo.io/">hugo</a>.</p>
<p><a href="https://github.com/gohugoio/hugo/blob/e48ffb763572814a3788780bb9653dfa2daeae22/content/en/hosting-and-deployment/hosting-on-github.md#step-by-step-instructions">The documentation used to</a> describe how you can have your main branch live
in a directory that points to a diffent origin than your current branch.</p>
<p>It&rsquo;s a cool feature that I never remember how to use, so here are notes I took
after rediscovering it recently.</p>
<hr>
<p>To add a submodule</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-shell" data-lang="shell"><span style="display:flex;"><span>git submodule add https://github.com/some-other-repo
</span></span></code></pre></div><p>To clone a submodule locally</p></description></item><item><title>TIL: Silica Gel can make Dried Bouquet</title><link>https://blog.andylu.dev/cappucchino/til-silica-gel/</link><pubDate>Tue, 08 Nov 2022 16:41:06 -0500</pubDate><guid>https://blog.andylu.dev/cappucchino/til-silica-gel/</guid><description><p>Was in a flower shop today and the cashier was trying to describe how a big carton of silica gel can
be used to dry out flowers.</p>
<p>I chuckled because I&rsquo;m not entirely sure where to get a bunch of silica gel, but then thought it&rsquo;s
time to start hoarding &ldquo;Do not eat&rdquo; packets.</p></description></item><item><title>KAllan's Telephone and Answering Machine Notes</title><link>https://blog.andylu.dev/cappucchino/docker-practice/</link><pubDate>Sun, 11 Apr 2021 00:00:00 -0500</pubDate><guid>https://blog.andylu.dev/cappucchino/docker-practice/</guid><description><h2 id="setup">Setup</h2>
<h3 id="installing-docker">Installing <code>docker</code></h3>
<p>I always like the DigitalOcean tutorials, so that&rsquo;s what I followed here. <a href="https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-20-04">Installing Docker on
Ubuntu 20.04</a></p>
<p>One note: I had to restart my computer instead of just logging out in order to get the docker group
update to take effect.</p>
<h3 id="clone-the-repos">Clone the repos</h3>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-shell" data-lang="shell"><span style="display:flex;"><span>git clone git@github.com:KAllan357/answering-machine.git
</span></span><span style="display:flex;"><span>git clone git@github.com:KAllan357/telephone.git
</span></span></code></pre></div><p>Nothing special here.</p>
<h3 id="install-go">Install Go</h3>
<p>I just <a href="https://golang.org/doc/install">followed these instructions</a>.</p>
<h2 id="do-the-thing">Do the thing</h2>
<h3 id="start-the-answering-machine-outside-of-docker">Start the answering machine outside of <code>docker</code></h3>
<p>Running <code>go run main.go</code> seems to do a thing. And we get the <code>200</code> like the instructions say if you
<code>curl</code> it. Great, so it seems like we can expect the app to hang and just wait for requests. And to
log them when it handles them.</p></description></item><item><title>Clojurescript Project Setup</title><link>https://blog.andylu.dev/cappucchino/clojurescript-project-setup/</link><pubDate>Mon, 06 Jul 2020 07:52:15 -0500</pubDate><guid>https://blog.andylu.dev/cappucchino/clojurescript-project-setup/</guid><description><h4 id="outcomes">Outcomes</h4>
<p>By the end of this post, you will be able to setup a new <code>clojurescript</code>
project, setup <code>emacs</code> to be your development environment, and deploy your
app to Github Pages</p>
<h4 id="background">Background</h4>
<p>I&rsquo;ve written two clojurescript projects now, <a href="https://blog.andylu.dev/sundial">Sundial</a> and
<a href="https://blog.andylu.dev/databooze">DataBooze</a>, and I want to document the set up process. The first time
was a massive undertaking because it was my first time. But frustrating
enough, so was the second time, even though I thought I nailed down the
process and took notes on it. The process didn&rsquo;t work and the notes don&rsquo;t
exist, so here we are today.</p></description></item></channel></rss>