-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
439 lines (310 loc) · 13.8 KB
/
index.html
File metadata and controls
439 lines (310 loc) · 13.8 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
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Android Zero</title>
<style>
html { padding: 0; margin: 0 auto; max-width: 700px; line-height: 1.6; }
pre { overflow: auto; background: #eef; padding: 1rem; }
code { font-size: 1rem; background: #eef; }
</style>
</head>
<body>
<a href="#">home</a> //
<a href="https://mastodon.social/@jonesangga">mastodon</a> //
<a href="https://codeberg.org/androidzero">codeberg</a> //
<a href="https://github.com/android-0">github</a> //
<a href="https://git.sr.ht/~androidzero">sourcehut</a> //
<a href="links.html">links</a>
<p><b>Contents</b>
<ol>
<li> <a href="#vim-commands">Useful Vim Commands</a>
<li> <a href="#testing">Testing</a>
<li> <a href="#rewrite-plain-html">Rewrite in Plain HTML</a>
<li> <a href="#ssg">SSG</a>
<li> <a href="#yt-channel">My Youtube Channel</a>
<li> <a href="#porting-old-sketches">Porting Old Sketches</a>
<li> <a href="#computer-graphics-from-scratch">Finished Computer Graphics from Scratch</a>
<li> <a href="#i3-config">My i3 Config</a>
<li> <a href="#journaling">Reminder for Journaling</a>
<li> <a href="#blog-attempt">Another Attempt to Create a Blog</a>
</ol>
<hr><!-- ========================================================= -->
<h1 id="vim-commands">Useful Vim Commands</h1>
<p>Posted: Mon, 06-04-2026.
<p>I use these frequently. I excluded trivial commands like <code>j</code>, <code>d</code>, etc.
<dl>
<dt> <code>jk</code> mapped to <code><Esc></code>
<dd> Exit to Normal mode. Cancel command.
<dt> <code><Space>n</code> mapped to <code>:tabe</code>
<dd> Open new tab after the current one.
<dt> <code>gt</code>
<dd> Go to the next tab.
<dt> <code>gT</code>
<dd> Go to the previous tab.
<dt> <code><Space>t</code> mapped to <code>:Lex</code>
<dd> Toggle directory browser netrw.
<dt> <code><C-w><C-w></code>
<dd> Cycle to the next window.
<dt> <code>*</code>
<dd> Search word nearest to the cursor.
<dt> <code>''</code>
<dd> Jump to the position before the latest jump.
<dt> <code>o</code> in Visual mode
<dd> Move cursor to the other end.
<dt> <code>ggVG=</code>
<dd> Reindent the whole file. I know the common way is <code>gg=G</code>.
I prefer my way because the visual selection gives clear feedback.
<dt> <code>zt</code>
<dd> Place current line at the top of window.
<dt> <code>zz</code>
<dd> Place current line at the center of window.
<dt> <code>di"</code>
<dd> Delete everything inside the nearest double quotes.
<dt> <code><Space>s</code>
<dd> Toggle syntax highlight. This is the mapping:
<pre><code>nnoremap <expr> <leader>s exists('g:syntax_on') ? ':syntax off<CR>' : ':syntax on<CR>'
</code></pre>
</dl>
<hr><!-- ========================================================= -->
<h1 id="testing">Testing</h1>
<p>Posted: Fri, 27-03-2026.
<p>From The Art of Unit Testing book:
<ul>
<li> Criteria of good test: readable, maintainable, trustworthy.
<li> Technically, one the biggest benefits of TDD is that by seeing a test fail, and then seeing it pass without
changing the test, you are basically testing the test itself.
<li> Don't use beforeEach and afterEach. Reason: scroll fatigue.
</ul>
<p>From <a href="https://henrikwarne.com/2014/09/04/a-response-to-why-most-unit-testing-is-waste/">this</a>:
<ul>
<li> When testing the complete application, it is an advantage to use well-tested parts.
<li> When you design the building blocks of your system to be unit tested,
you automatically separate the different pieces as much as possible.
<li> You get feedback immediately if you make a mistake.
<li> Most unit testing is waste if you only look at it from the point of view of ensuring application quality.
It’s not at all waste if you look at unit tests as a development tool.
</ul>
<p>Name your unit tests clearly and consistently.
<p>Spurious test failures will damage morale and ultimately the quality of the test suite and thus the software.
<hr><!-- ========================================================= -->
<h1 id="rewrite-plain-html">Rewrite in Plain HTML</h1>
<p>Posted: Sat, 31-01-2026.
<p>I abandon my previous SSG and now just use plain HTML.
I made this source code as readable as possible. Look at the source.
I omitted p and li closing tags. I just learned that I can do that. See the
<a href="https://html.spec.whatwg.org/multipage/syntax.html#optional-tags">spec</a>.
<p>I plan to have 2 pages: home and links. For projects, I just put it on the menu.
<hr><!-- ========================================================= -->
<h1 id="ssg">SSG</h1>
<p>Posted: Tue, 22-10-2025.
<p>Suddenly I wanted to redesign my blog into one long page.
I made really simple static site generator in python.
This is the first time I used uv.
I write blog posts in markdown and place them inside md directory.
For all files in md directory, if there is no corresponding html file in tmp directory
or it is newer, I will convert it using markdown library to html and place it in tmp directory.
Then I join all html files inside tmp directory into single HTML.
<hr><!-- ========================================================= -->
<h1 id="yt-channel">My Youtube Channel</h1>
<p>Posted: Tue, 17-11-2024.
<p>I made a youtube channel and posted my first video.
Link <a href="https://www.youtube.com/@jonesangga">here</a>.
I always fail to verify my phone number.
So I cannot post videos longer than 15 minutes for now.
<p>My first video is about creating a vim plugin <a href="https://codeberg.org/jonesangga/fsticky/">fsticky</a>.
I recorded with obs-studio and then reduced the file size using ffmpeg with the following command
<pre><code>ffmpeg -i input.mp4 -vcodec libx264 -crf 24 output.mp4
</code></pre>
<p>This is not intended as tutorial.
I just record what I think interesting.
I don't record with my own voice because my pronounciation is bad.
Also I don't have a good setup for recording audio.
But I will use text to speech voice.
The one I use is <a href="https://github.com/rhasspy/piper">piper</a>.
a fast, local neural text to speech system.
Actually this is what my next video about. I will write a wrapper
around piper. So I can call that inside vim and passing curently selected
text to say.
<hr><!-- ========================================================= -->
<h1 id="porting-old-sketches">Porting Old Sketches</h1>
<p>Posted: Tue, 26-11-2024.
<p>I used processing in 2022 and p5 in 2023.
Many of my sketches are just static designs.
Now I port that to vanila javascript with html canvas.
This is part of my new project Element of Creative Coding (EoCC) where I try
to categorize, implement, and document aspects and techniques in creative coding
as I am learning.
Here is the link: <a href="https://jonesangga.codeberg.page/eocc">eocc</a>.
<p>I try to minimize dependecies.
Every sketch will have exactly two files: sketch-name.html and sketch-name.js.
There are no separate js files for helper functions. No CSS.
I want it to be easy to copy and run individual sketch on others machine.
<p>This project has no rigid plan and no deadline. Any time I find something
intresting I try to build that and add to this collection with some explanations.
More about this project on future post.
<hr><!-- ========================================================= -->
<h1 id="computer-graphics-from-scratch">Finished Computer Graphics from Scratch</h1>
<p>Posted: Sun, 17-11-2024.
<p>I followed Computer Graphics from Scratch book by Gabriel Gambetta.
Here is the <a href="https://gabrielgambetta.com/computer-graphics-from-scratch/">online version</a>
I port the provided demo code from javascript to c. This is by far my biggest c project.
See <a href="https://codeberg.org/jonesangga/c-computer-graphics-from-scratch">here</a>.
<p>I don't use external libraries. The image result is in ppm format.
File ppm.h on the root is used for managing ppm image.
I open the image using feh:
<pre><code>feh --force-aliasing filename.ppm
</code></pre>
<p>Some chapters has more than one demo but here I combine them per chapter.
I should refactor them.
<p>I found that I improved more by just searching and learning the particular thing I need
than reading the whole book.
<hr><!-- ========================================================= -->
<h1 id="i3-config">My i3 Config</h1>
<p>Posted: Sun, 22-09-2024. Edited: Sun, 24-11-2024.
<p>First, I ran this to generate the config file:
<pre><code>$ i3-config-wizard
</code></pre>
<p>Here I chose Windows key as my mod key.
<p>I made bindings to adjust volume and brightness.
<pre><code>bindsym $mod+F1 exec amixer sset 'Master' toggle
bindsym $mod+F3 exec amixer sset 'Master' 5%-
bindsym $mod+Shift+F3 exec amixer sset 'Master' 5%+
bindsym $mod+F5 exec xbacklight -0.5
bindsym $mod+Shift+F5 exec xbacklight +0.5
</code></pre>
<p>I increased the font size for window title and bar.
<pre><code>font pango:monospace 10
</code></pre>
<p>I added wallpaper.
<pre><code>exec_always feh --bg-fill +0+0 ~/Pictures/wallpaper.jpg
</code></pre>
<p>I changed tab bar font color because it is hard to see.
<pre><code>client.unfocused #333333 #444444 #ffffff #292d2e #222222
</code></pre>
<p>I changed the background color of bar.
<pre><code>colors {
background #282A2E
}
</code></pre>
<p>Disable mouse wheel on bar.
<pre><code>bindsym button4 nop
bindsym button5 nop
</code></pre>
<p>My keyboard seldom not working properly and I cannot exit i3.
This is my temporary solution.
<pre><code>bindsym --release button3 exec "i3-nagbar -t warning -m 'Do you really want to exit i3?' -B 'Yes, exit i3' 'i3-msg exit'"
</code></pre>
<p>I set the default terminal to alacritty.
<pre><code>bindsym $mod+Return exec alacritty
</code></pre>
<p>I added binding to scrot (screen capture).
<pre><code>bindsym $mod+F11 exec scrot -F ~/Pictures/SS/'%Y-%m-%d-%H%M%S.png'
</code></pre>
<p>For i3status, I set the color to false and set the interval to 5 second.
<pre><code>general {
colors = false
interval = 5
}
</code></pre>
<p>I used these modules: battery, memory, volume, and tztime.
<hr><!-- ========================================================= -->
<h1 id="journaling">Reminder for Journaling</h1>
<p>Posted: Sun, 14-07-2024. Edited: Mon, 13-10-2025.
<p>I keep forgeting to write my journal. My solution is to create a program that checks and reminds
me if I haven't filled my journal whenever I open a terminal.
<p>I only use txt file on vim for journaling. Nothing fancy. I don't like note taking app like
obsidian and notion, because too many buttons and many features that I will never use.
I use a subset of markdown syntax for organizing my journal:
<pre><code># Journal
## 2024
### 07-11-24
- Some interesting events.
- Today I learned ....
### 06-11-24
- Finished chapter 1 of "insert book name"
- Tried installing new OS.
</code></pre>
<p>So, here is the code:
<a href="https://codeberg.org/jonesangga/dotfiles/src/branch/main/utils/journalreminder.c">journalreminder.c</a>
<p>First, it checks the last modified date of a given filename argument, in this case my journal.txt file.
And subtract that to today's date. Then it prints a message if the date difference is not zero.
<p>To run that everytime I open a terminal I added the following line to my <code>.bashrc</code> file:
<pre><code>~/.dotfiles/utils/journalreminder ~/Meta/journal.txt
</code></pre>
<p>One of its limitation is if I forgot to write journal for, say 5 days, and now I write it but
only for today's date, it will not show the message again. Though that also what I intended:
if I forget to write for one day, the reason might be there is nothing interesting to
write that day.
<hr><!-- ========================================================= -->
<h1 id="blog-attempt">Another Attempt to Create a Blog</h1>
<p>Posted: Thu, 11-07-2024. Edited: Mon, 13-10-2025.
<p>Let's start with my list of failed blog/web projects:
<ul>
<li> 2019: My first local landing page following Indian youtube tutorial.
<li> 2020: Tried a free hosting 000webhost, doing php and mysql.
<li> 2020: Tried some obscure free hostings.
<li> 2020: Bought a domain, only last 3 months.
<li> 2021: Github pages: math calculator/solver.
<li> 2021: Blogspot posting math and pascal programming.
<li> 2022: Jekyll.
<li> 2023: Github pages: showcase creative coding.
<li> 2024: Hugo.
<li> 2024: Cloudflare pages: math calculator/solver.
<li> 2024: neocities + my own static site generator + github action.
</ul>
<p>In this attempt, I made the following principles:
<ul>
<li> No JS.
<li> No favicon.
<li> Minimal CSS, one for all.
<li> No id and class attributes.
<li> No menu bar.
<li> No comment section.
<li> No footer.
<li> Only float left.
<li> Use CDN for images.
</ul>
<p>Blog tree:
<pre><code>- index.html
- style.css
- posts/
- post1.html
- post2.html
- ...
</code></pre>
<p>I will stick to this structure for every post:
<ul>
<li> meta charset.
<li> meta viewport.
<li> link css.
<li> Link to home.
<li> title.
<li> h1 title.
<li> Author.
<li> Posted.
<li> Last edited.
<li> tldr.
<li> hr.
<li> Text post.
</ul>
<p>For my coping, I call this HTML meditation.
I write the layout once and never change it. So, in 10 years it will look nostalgic.
I am writing this on vim.
I decided to less worried about my English. I am bad at writing English.
I will mostly write bullet list because it is easier than paragraph.
<p>Some inspirations:
<ul>
<li> <a href="https://bearblog.dev/discover">bearblog.dev/discover</a>
<li> <a href="https://neocities.org/browse">neocities.org/browse</a>
<li> <a href="https://no-js.club">no-js.club</a>
<li> <a href="https://250kb.club">250kb.club</a>
<li> <a href="https://512kb.club">512kb.club</a>
<li> <a href="https://1mb.club">1mb.club</a>
<li> <a href="https://motherfuckingwebsite.com">motherfuckingwebsite.com</a>
</ul>
<hr><!-- ========================================================= -->
<p>End.
</body>
</html>