the ugly ocaml monstrosity powering my site oppi.li
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

new post: snip snap

Akshay 560a4049 66c2d86d

+407 -75
+29 -29
docs/art/index.html
··· 38 38 <div class="photo-overlay"> 39 39 <div class="photo-text"> 40 40 <div class="photo-title">Wane</div> 41 - <div class="photo-date">02/07 — 2023</div> 41 + <div class="photo-date">01/07 — 2023</div> 42 42 </div> 43 43 </div> 44 44 </div> ··· 82 82 <div class="photo-overlay"> 83 83 <div class="photo-text"> 84 84 <div class="photo-title">Ferris</div> 85 - <div class="photo-date">29/08 — 2022</div> 85 + <div class="photo-date">28/08 — 2022</div> 86 86 </div> 87 87 </div> 88 88 </div> ··· 93 93 <div class="photo-overlay"> 94 94 <div class="photo-text"> 95 95 <div class="photo-title">Locus</div> 96 - <div class="photo-date">09/06 — 2022</div> 96 + <div class="photo-date">08/06 — 2022</div> 97 97 </div> 98 98 </div> 99 99 </div> ··· 104 104 <div class="photo-overlay"> 105 105 <div class="photo-text"> 106 106 <div class="photo-title">Ivory Tower</div> 107 - <div class="photo-date">03/06 — 2022</div> 107 + <div class="photo-date">02/06 — 2022</div> 108 108 </div> 109 109 </div> 110 110 </div> ··· 115 115 <div class="photo-overlay"> 116 116 <div class="photo-text"> 117 117 <div class="photo-title">The Sect</div> 118 - <div class="photo-date">03/06 — 2022</div> 118 + <div class="photo-date">02/06 — 2022</div> 119 119 </div> 120 120 </div> 121 121 </div> ··· 126 126 <div class="photo-overlay"> 127 127 <div class="photo-text"> 128 128 <div class="photo-title">Elephant</div> 129 - <div class="photo-date">21/05 — 2022</div> 129 + <div class="photo-date">20/05 — 2022</div> 130 130 </div> 131 131 </div> 132 132 </div> ··· 137 137 <div class="photo-overlay"> 138 138 <div class="photo-text"> 139 139 <div class="photo-title">2022</div> 140 - <div class="photo-date">13/03 — 2022</div> 140 + <div class="photo-date">12/03 — 2022</div> 141 141 </div> 142 142 </div> 143 143 </div> ··· 148 148 <div class="photo-overlay"> 149 149 <div class="photo-text"> 150 150 <div class="photo-title">Scenes From A Memory</div> 151 - <div class="photo-date">21/12 — 2021</div> 151 + <div class="photo-date">20/12 — 2021</div> 152 152 </div> 153 153 </div> 154 154 </div> ··· 159 159 <div class="photo-overlay"> 160 160 <div class="photo-text"> 161 161 <div class="photo-title">B8</div> 162 - <div class="photo-date">04/10 — 2021</div> 162 + <div class="photo-date">03/10 — 2021</div> 163 163 </div> 164 164 </div> 165 165 </div> ··· 170 170 <div class="photo-overlay"> 171 171 <div class="photo-text"> 172 172 <div class="photo-title">Goat</div> 173 - <div class="photo-date">23/08 — 2021</div> 173 + <div class="photo-date">22/08 — 2021</div> 174 174 </div> 175 175 </div> 176 176 </div> ··· 181 181 <div class="photo-overlay"> 182 182 <div class="photo-text"> 183 183 <div class="photo-title">B6</div> 184 - <div class="photo-date">10/07 — 2021</div> 184 + <div class="photo-date">09/07 — 2021</div> 185 185 </div> 186 186 </div> 187 187 </div> ··· 192 192 <div class="photo-overlay"> 193 193 <div class="photo-text"> 194 194 <div class="photo-title">PV-3</div> 195 - <div class="photo-date">27/06 — 2021</div> 195 + <div class="photo-date">26/06 — 2021</div> 196 196 </div> 197 197 </div> 198 198 </div> ··· 203 203 <div class="photo-overlay"> 204 204 <div class="photo-text"> 205 205 <div class="photo-title">Rekindled</div> 206 - <div class="photo-date">11/06 — 2021</div> 206 + <div class="photo-date">10/06 — 2021</div> 207 207 </div> 208 208 </div> 209 209 </div> ··· 214 214 <div class="photo-overlay"> 215 215 <div class="photo-text"> 216 216 <div class="photo-title">Bison</div> 217 - <div class="photo-date">05/06 — 2021</div> 217 + <div class="photo-date">04/06 — 2021</div> 218 218 </div> 219 219 </div> 220 220 </div> ··· 225 225 <div class="photo-overlay"> 226 226 <div class="photo-text"> 227 227 <div class="photo-title">Notre-Dame</div> 228 - <div class="photo-date">30/05 — 2021</div> 228 + <div class="photo-date">29/05 — 2021</div> 229 229 </div> 230 230 </div> 231 231 </div> ··· 236 236 <div class="photo-overlay"> 237 237 <div class="photo-text"> 238 238 <div class="photo-title">Pineapple</div> 239 - <div class="photo-date">29/05 — 2021</div> 239 + <div class="photo-date">28/05 — 2021</div> 240 240 </div> 241 241 </div> 242 242 </div> ··· 247 247 <div class="photo-overlay"> 248 248 <div class="photo-text"> 249 249 <div class="photo-title">B4</div> 250 - <div class="photo-date">22/05 — 2021</div> 250 + <div class="photo-date">21/05 — 2021</div> 251 251 </div> 252 252 </div> 253 253 </div> ··· 258 258 <div class="photo-overlay"> 259 259 <div class="photo-text"> 260 260 <div class="photo-title">Isopod</div> 261 - <div class="photo-date">22/05 — 2021</div> 261 + <div class="photo-date">21/05 — 2021</div> 262 262 </div> 263 263 </div> 264 264 </div> ··· 269 269 <div class="photo-overlay"> 270 270 <div class="photo-text"> 271 271 <div class="photo-title">Wraith</div> 272 - <div class="photo-date">14/05 — 2021</div> 272 + <div class="photo-date">13/05 — 2021</div> 273 273 </div> 274 274 </div> 275 275 </div> ··· 280 280 <div class="photo-overlay"> 281 281 <div class="photo-text"> 282 282 <div class="photo-title">Antique</div> 283 - <div class="photo-date">08/05 — 2021</div> 283 + <div class="photo-date">07/05 — 2021</div> 284 284 </div> 285 285 </div> 286 286 </div> ··· 291 291 <div class="photo-overlay"> 292 292 <div class="photo-text"> 293 293 <div class="photo-title">Grimoire</div> 294 - <div class="photo-date">06/05 — 2021</div> 294 + <div class="photo-date">05/05 — 2021</div> 295 295 </div> 296 296 </div> 297 297 </div> ··· 302 302 <div class="photo-overlay"> 303 303 <div class="photo-text"> 304 304 <div class="photo-title">Aviator Owl</div> 305 - <div class="photo-date">01/05 — 2021</div> 305 + <div class="photo-date">30/04 — 2021</div> 306 306 </div> 307 307 </div> 308 308 </div> ··· 313 313 <div class="photo-overlay"> 314 314 <div class="photo-text"> 315 315 <div class="photo-title">Beret Beaver</div> 316 - <div class="photo-date">01/05 — 2021</div> 316 + <div class="photo-date">30/04 — 2021</div> 317 317 </div> 318 318 </div> 319 319 </div> ··· 324 324 <div class="photo-overlay"> 325 325 <div class="photo-text"> 326 326 <div class="photo-title">Monocle Rabbit</div> 327 - <div class="photo-date">01/05 — 2021</div> 327 + <div class="photo-date">30/04 — 2021</div> 328 328 </div> 329 329 </div> 330 330 </div> ··· 335 335 <div class="photo-overlay"> 336 336 <div class="photo-text"> 337 337 <div class="photo-title">Ramen Noodles</div> 338 - <div class="photo-date">26/03 — 2021</div> 338 + <div class="photo-date">25/03 — 2021</div> 339 339 </div> 340 340 </div> 341 341 </div> ··· 346 346 <div class="photo-overlay"> 347 347 <div class="photo-text"> 348 348 <div class="photo-title">Shark</div> 349 - <div class="photo-date">22/02 — 2021</div> 349 + <div class="photo-date">21/02 — 2021</div> 350 350 </div> 351 351 </div> 352 352 </div> ··· 357 357 <div class="photo-overlay"> 358 358 <div class="photo-text"> 359 359 <div class="photo-title">Moonshine</div> 360 - <div class="photo-date">25/04 — 2020</div> 360 + <div class="photo-date">24/04 — 2020</div> 361 361 </div> 362 362 </div> 363 363 </div> ··· 368 368 <div class="photo-overlay"> 369 369 <div class="photo-text"> 370 370 <div class="photo-title">Onigiri</div> 371 - <div class="photo-date">09/04 — 2020</div> 371 + <div class="photo-date">08/04 — 2020</div> 372 372 </div> 373 373 </div> 374 374 </div> ··· 379 379 <div class="photo-overlay"> 380 380 <div class="photo-text"> 381 381 <div class="photo-title">The Observer</div> 382 - <div class="photo-date">17/01 — 2020</div> 382 + <div class="photo-date">16/01 — 2020</div> 383 383 </div> 384 384 </div> 385 385 </div>
+18 -18
docs/index.html
··· 40 40 <tr> 41 41 <td class=table-post> 42 42 <div class="date"> 43 - 19/06 — 2023 43 + 08/05 — 2024 44 + </div> 45 + <a href="/posts/snip_snap" class="post-link"> 46 + <span class="post-link">Snip Snap</span> 47 + </a> 48 + </td> 49 + <td class=table-stats> 50 + <span class="stats-number"> 51 + 2.1 52 + </span> 53 + <span class=stats-unit>min</span> 54 + </td> 55 + </tr> 56 + 57 + <tr> 58 + <td class=table-post> 59 + <div class="date"> 60 + 18/06 — 2023 44 61 </div> 45 62 <a href="/posts/plain_text_journaling" class="post-link"> 46 63 <span class="post-link">Plain Text Journaling</span> ··· 66 83 <td class=table-stats> 67 84 <span class="stats-number"> 68 85 9.6 69 - </span> 70 - <span class=stats-unit>min</span> 71 - </td> 72 - </tr> 73 - 74 - <tr> 75 - <td class=table-post> 76 - <div class="date"> 77 - 28/08 — 2022 78 - </div> 79 - <a href="/posts/programming_on_34_keys" class="post-link"> 80 - <span class="post-link">Programming On 34 Keys</span> 81 - </a> 82 - </td> 83 - <td class=table-stats> 84 - <span class="stats-number"> 85 - 6.2 86 86 </span> 87 87 <span class=stats-unit>min</span> 88 88 </td>
+75 -2
docs/index.xml
··· 12 12 <language>en-us</language> 13 13 <copyright>Creative Commons BY-NC-SA 4.0</copyright> 14 14 <item> 15 + <title>Snip Snap</title> 16 + <description>&lt;p&gt;I regularly switch between exactly two things while working, a 17 + “current” and an “alternate” item; a lot of tools I use seem to support 18 + this flow.&lt;/p&gt; 19 + &lt;h4 id="git"&gt;git&lt;/h4&gt; 20 + &lt;p&gt;Pass &lt;code&gt;-&lt;/code&gt; to &lt;code&gt;git-checkout&lt;/code&gt; to switch to the 21 + previously active branch:&lt;/p&gt; 22 + &lt;div class="sourceCode" id="cb1"&gt;&lt;pre 23 + class="sourceCode bash"&gt;&lt;code class="sourceCode bash"&gt;&lt;span id="cb1-1"&gt;&lt;a href="#cb1-1" aria-hidden="true" tabindex="-1"&gt;&lt;/a&gt;&lt;span class="ex"&gt;$&lt;/span&gt; git branch&lt;/span&gt; 24 + &lt;span id="cb1-2"&gt;&lt;a href="#cb1-2" aria-hidden="true" tabindex="-1"&gt;&lt;/a&gt;&lt;span class="ex"&gt;*&lt;/span&gt; foo&lt;/span&gt; 25 + &lt;span id="cb1-3"&gt;&lt;a href="#cb1-3" aria-hidden="true" tabindex="-1"&gt;&lt;/a&gt; &lt;span class="ex"&gt;bar&lt;/span&gt;&lt;/span&gt; 26 + &lt;span id="cb1-4"&gt;&lt;a href="#cb1-4" aria-hidden="true" tabindex="-1"&gt;&lt;/a&gt;&lt;/span&gt; 27 + &lt;span id="cb1-5"&gt;&lt;a href="#cb1-5" aria-hidden="true" tabindex="-1"&gt;&lt;/a&gt;&lt;span class="ex"&gt;$&lt;/span&gt; git checkout bar&lt;/span&gt; 28 + &lt;span id="cb1-6"&gt;&lt;a href="#cb1-6" aria-hidden="true" tabindex="-1"&gt;&lt;/a&gt;&lt;span class="ex"&gt;$&lt;/span&gt; git branch&lt;/span&gt; 29 + &lt;span id="cb1-7"&gt;&lt;a href="#cb1-7" aria-hidden="true" tabindex="-1"&gt;&lt;/a&gt; &lt;span class="ex"&gt;foo&lt;/span&gt;&lt;/span&gt; 30 + &lt;span id="cb1-8"&gt;&lt;a href="#cb1-8" aria-hidden="true" tabindex="-1"&gt;&lt;/a&gt;&lt;span class="ex"&gt;*&lt;/span&gt; bar&lt;/span&gt; 31 + &lt;span id="cb1-9"&gt;&lt;a href="#cb1-9" aria-hidden="true" tabindex="-1"&gt;&lt;/a&gt;&lt;/span&gt; 32 + &lt;span id="cb1-10"&gt;&lt;a href="#cb1-10" aria-hidden="true" tabindex="-1"&gt;&lt;/a&gt;&lt;span class="ex"&gt;$&lt;/span&gt; git checkout &lt;span class="at"&gt;-&lt;/span&gt;&lt;/span&gt; 33 + &lt;span id="cb1-11"&gt;&lt;a href="#cb1-11" aria-hidden="true" tabindex="-1"&gt;&lt;/a&gt;&lt;span class="ex"&gt;$&lt;/span&gt; git branch&lt;/span&gt; 34 + &lt;span id="cb1-12"&gt;&lt;a href="#cb1-12" aria-hidden="true" tabindex="-1"&gt;&lt;/a&gt;&lt;span class="ex"&gt;*&lt;/span&gt; foo&lt;/span&gt; 35 + &lt;span id="cb1-13"&gt;&lt;a href="#cb1-13" aria-hidden="true" tabindex="-1"&gt;&lt;/a&gt; &lt;span class="ex"&gt;bar&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt; 36 + &lt;h4 id="bash---cd"&gt;bash - cd&lt;/h4&gt; 37 + &lt;p&gt;This may not be exclusive to &lt;code&gt;bash&lt;/code&gt;:&lt;/p&gt; 38 + &lt;div class="sourceCode" id="cb2"&gt;&lt;pre 39 + class="sourceCode bash"&gt;&lt;code class="sourceCode bash"&gt;&lt;span id="cb2-1"&gt;&lt;a href="#cb2-1" aria-hidden="true" tabindex="-1"&gt;&lt;/a&gt;&lt;span class="ex"&gt;~/foo&lt;/span&gt; $ cd ~/bar&lt;/span&gt; 40 + &lt;span id="cb2-2"&gt;&lt;a href="#cb2-2" aria-hidden="true" tabindex="-1"&gt;&lt;/a&gt;&lt;span class="ex"&gt;~/bar&lt;/span&gt; $ cd &lt;span class="at"&gt;-&lt;/span&gt;&lt;/span&gt; 41 + &lt;span id="cb2-3"&gt;&lt;a href="#cb2-3" aria-hidden="true" tabindex="-1"&gt;&lt;/a&gt;&lt;span class="ex"&gt;~/foo&lt;/span&gt; $&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt; 42 + &lt;p&gt;This is especially handy in combination with my &lt;a 43 + href="../curing_a_case_of_git-UX/"&gt;git-worktree flow&lt;/a&gt;:&lt;/p&gt; 44 + &lt;div class="sourceCode" id="cb3"&gt;&lt;pre 45 + class="sourceCode bash"&gt;&lt;code class="sourceCode bash"&gt;&lt;span id="cb3-1"&gt;&lt;a href="#cb3-1" aria-hidden="true" tabindex="-1"&gt;&lt;/a&gt;&lt;span class="ex"&gt;~/main-branch&lt;/span&gt; $ gwj feature&lt;/span&gt; 46 + &lt;span id="cb3-2"&gt;&lt;a href="#cb3-2" aria-hidden="true" tabindex="-1"&gt;&lt;/a&gt;&lt;span class="ex"&gt;~/feat-branch&lt;/span&gt; $ cd &lt;span class="at"&gt;-&lt;/span&gt;&lt;/span&gt; 47 + &lt;span id="cb3-3"&gt;&lt;a href="#cb3-3" aria-hidden="true" tabindex="-1"&gt;&lt;/a&gt;&lt;span class="ex"&gt;~/main-branch&lt;/span&gt; $&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt; 48 + &lt;h4 id="bash---jobs"&gt;bash - jobs&lt;/h4&gt; 49 + &lt;p&gt;I often suspend multiple &lt;code&gt;vim&lt;/code&gt; sessions with 50 + &lt;code&gt;Ctrl-Z&lt;/code&gt;:&lt;/p&gt; 51 + &lt;div class="sourceCode" id="cb4"&gt;&lt;pre 52 + class="sourceCode bash"&gt;&lt;code class="sourceCode bash"&gt;&lt;span id="cb4-1"&gt;&lt;a href="#cb4-1" aria-hidden="true" tabindex="-1"&gt;&lt;/a&gt;&lt;span class="ex"&gt;$&lt;/span&gt; jobs&lt;/span&gt; 53 + &lt;span id="cb4-2"&gt;&lt;a href="#cb4-2" aria-hidden="true" tabindex="-1"&gt;&lt;/a&gt;&lt;span class="ex"&gt;[1]+&lt;/span&gt; Stopped vim transpiler/src/transform.rs&lt;/span&gt; 54 + &lt;span id="cb4-3"&gt;&lt;a href="#cb4-3" aria-hidden="true" tabindex="-1"&gt;&lt;/a&gt;&lt;span class="ex"&gt;[2]-&lt;/span&gt; Stopped git commit &lt;span class="at"&gt;--verbose&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt; 55 + &lt;p&gt;In the above example: I suspended &lt;code&gt;vim&lt;/code&gt; when working on 56 + &lt;code&gt;transform.rs&lt;/code&gt;, and then began working on a commit by running 57 + &lt;code&gt;git commit&lt;/code&gt; without a message flag (lets you craft a message 58 + in &lt;code&gt;$EDITOR&lt;/code&gt;). To bring the current job to the foreground, 59 + you can use &lt;code&gt;fg&lt;/code&gt;:&lt;/p&gt; 60 + &lt;div class="sourceCode" id="cb5"&gt;&lt;pre 61 + class="sourceCode bash"&gt;&lt;code class="sourceCode bash"&gt;&lt;span id="cb5-1"&gt;&lt;a href="#cb5-1" aria-hidden="true" tabindex="-1"&gt;&lt;/a&gt;&lt;span class="ex"&gt;$&lt;/span&gt; fg&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt; 62 + &lt;p&gt;With a job identifier:&lt;/p&gt; 63 + &lt;div class="sourceCode" id="cb6"&gt;&lt;pre 64 + class="sourceCode bash"&gt;&lt;code class="sourceCode bash"&gt;&lt;span id="cb6-1"&gt;&lt;a href="#cb6-1" aria-hidden="true" tabindex="-1"&gt;&lt;/a&gt;&lt;span class="ex"&gt;$&lt;/span&gt; fg %2 &lt;span class="co"&gt;# resumes interactive git commit&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt; 65 + &lt;p&gt;Or switch to “last” job, or the second-most-recently-resumed job:&lt;/p&gt; 66 + &lt;div class="sourceCode" id="cb7"&gt;&lt;pre 67 + class="sourceCode bash"&gt;&lt;code class="sourceCode bash"&gt;&lt;span id="cb7-1"&gt;&lt;a href="#cb7-1" aria-hidden="true" tabindex="-1"&gt;&lt;/a&gt;&lt;span class="ex"&gt;$&lt;/span&gt; fg %-&lt;/span&gt; 68 + &lt;span id="cb7-2"&gt;&lt;a href="#cb7-2" aria-hidden="true" tabindex="-1"&gt;&lt;/a&gt;&lt;span class="ex"&gt;$&lt;/span&gt; %- &lt;span class="co"&gt;# shorthand&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt; 69 + &lt;h4 id="vim"&gt;vim&lt;/h4&gt; 70 + &lt;p&gt;Switch to the last active buffer with &lt;code&gt;Ctrl+^&lt;/code&gt;. In 71 + command-mode, &lt;code&gt;#&lt;/code&gt; refers to the last active buffer, you can 72 + use this as an argument to a few commands:&lt;/p&gt; 73 + &lt;pre class="vimscript"&gt;&lt;code&gt;:b# &amp;quot; switch to alternate buffer (same as Ctrl+^) 74 + :vsp# &amp;quot; create a vertical split with the alternate buffer 75 + :read# &amp;quot; read contents of alternate buffer into current buffer 76 + :!wc # &amp;quot; pass file name of alternate buffer to the command `wc`&lt;/code&gt;&lt;/pre&gt; 77 + &lt;p&gt;See &lt;code&gt;:help c_#&lt;/code&gt; for more.&lt;/p&gt; 78 + &lt;h4 id="tmux"&gt;tmux&lt;/h4&gt; 79 + &lt;p&gt;Switch to the last active tmux session with 80 + &lt;code&gt;&amp;lt;prefix&amp;gt;+shift+L&lt;/code&gt;.&lt;/p&gt; 81 + &lt;h4 id="qutebrowser"&gt;qutebrowser&lt;/h4&gt; 82 + &lt;p&gt;Switch to the last active tab with &lt;code&gt;g$&lt;/code&gt;.&lt;/p&gt;</description> 83 + <link>https://peppe.rs/posts/snip_snap/</link> 84 + <pubDate>Wed, 08 May 2024 10:38:00 +0000</pubDate> 85 + <guid>https://peppe.rs/posts/snip_snap/</guid> 86 + </item> 87 + <item> 15 88 <title>Plain Text Journaling</title> 16 89 <description>&lt;p&gt;I cobbled together a journaling system with {neo,}vim, coreutils and 17 90 &lt;a href="http://www.fresse.org/dateutils"&gt;dateutils&lt;/a&gt;. This system is ··· 1014 1087 your dependencies:&lt;/p&gt; 1015 1088 &lt;div class="sourceCode" id="cb21"&gt;&lt;pre 1016 1089 class="sourceCode toml"&gt;&lt;code class="sourceCode toml"&gt;&lt;span id="cb21-1"&gt;&lt;a href="#cb21-1" aria-hidden="true" tabindex="-1"&gt;&lt;/a&gt;&lt;span class="co"&gt;# within Cargo.toml&lt;/span&gt;&lt;/span&gt; 1017 - &lt;span id="cb21-2"&gt;&lt;a href="#cb21-2" aria-hidden="true" tabindex="-1"&gt;&lt;/a&gt;&lt;span class="kw"&gt;[&lt;/span&gt;&lt;span class="dt"&gt;dependencies&lt;/span&gt;&lt;span class="kw"&gt;]&lt;/span&gt;&lt;/span&gt; 1090 + &lt;span id="cb21-2"&gt;&lt;a href="#cb21-2" aria-hidden="true" tabindex="-1"&gt;&lt;/a&gt;&lt;span class="kw"&gt;[dependencies]&lt;/span&gt;&lt;/span&gt; 1018 1091 &lt;span id="cb21-3"&gt;&lt;a href="#cb21-3" aria-hidden="true" tabindex="-1"&gt;&lt;/a&gt;&lt;span class="dt"&gt;tree-sitter&lt;/span&gt; &lt;span class="op"&gt;=&lt;/span&gt; &lt;span class="st"&gt;&amp;quot;0.20&amp;quot;&lt;/span&gt;&lt;/span&gt; 1019 1092 &lt;span id="cb21-4"&gt;&lt;a href="#cb21-4" aria-hidden="true" tabindex="-1"&gt;&lt;/a&gt;&lt;/span&gt; 1020 - &lt;span id="cb21-5"&gt;&lt;a href="#cb21-5" aria-hidden="true" tabindex="-1"&gt;&lt;/a&gt;&lt;span class="kw"&gt;[&lt;/span&gt;&lt;span class="dt"&gt;dependencies&lt;/span&gt;&lt;span class="kw"&gt;.&lt;/span&gt;&lt;span class="dt"&gt;tree-sitter-rust&lt;/span&gt;&lt;span class="kw"&gt;]&lt;/span&gt;&lt;/span&gt; 1093 + &lt;span id="cb21-5"&gt;&lt;a href="#cb21-5" aria-hidden="true" tabindex="-1"&gt;&lt;/a&gt;&lt;span class="kw"&gt;[dependencies.tree-sitter-rust]&lt;/span&gt;&lt;/span&gt; 1021 1094 &lt;span id="cb21-6"&gt;&lt;a href="#cb21-6" aria-hidden="true" tabindex="-1"&gt;&lt;/a&gt;&lt;span class="dt"&gt;git&lt;/span&gt; &lt;span class="op"&gt;=&lt;/span&gt; &lt;span class="st"&gt;&amp;quot;https://github.com/tree-sitter/tree-sitter-rust&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt; 1022 1095 &lt;p&gt;Let’s load in some Rust code to work with. As &lt;a 1023 1096 href="https://en.wikipedia.org/wiki/Self-reference"&gt;an ode to Gödel&lt;/a&gt;
+1 -1
docs/posts/auto-currying_rust_functions/index.html
··· 25 25 ">View Raw</a> 26 26 <div class="separator"></div> 27 27 <div class="date"> 28 - 09/05 — 2020 28 + 08/05 — 2020 29 29 <div class="stats"> 30 30 <span class="stats-number"> 31 31 356.44
+1 -1
docs/posts/bash_harder_with_vim/index.html
··· 25 25 ">View Raw</a> 26 26 <div class="separator"></div> 27 27 <div class="date"> 28 - 31/07 — 2019 28 + 30/07 — 2019 29 29 <div class="stats"> 30 30 <span class="stats-number"> 31 31 24.38
+1 -1
docs/posts/call_to_ARMs/index.html
··· 25 25 ">View Raw</a> 26 26 <div class="separator"></div> 27 27 <div class="date"> 28 - 08/02 — 2020 28 + 07/02 — 2020 29 29 <div class="stats"> 30 30 <span class="stats-number"> 31 31 33.57
+1 -1
docs/posts/color_conundrum/index.html
··· 25 25 ">View Raw</a> 26 26 <div class="separator"></div> 27 27 <div class="date"> 28 - 31/12 — 2019 28 + 30/12 — 2019 29 29 <div class="stats"> 30 30 <span class="stats-number"> 31 31 14.39
+1 -1
docs/posts/font_size_fallacies/index.html
··· 25 25 ">View Raw</a> 26 26 <div class="separator"></div> 27 27 <div class="date"> 28 - 17/03 — 2020 28 + 16/03 — 2020 29 29 <div class="stats"> 30 30 <span class="stats-number"> 31 31 32.37
+29 -12
docs/posts/index.html
··· 27 27 <tr> 28 28 <td class=table-post> 29 29 <div class="date"> 30 - 19/06 — 2023 30 + 08/05 — 2024 31 + </div> 32 + <a href="/posts/snip_snap" class="post-link"> 33 + <span class="post-link">Snip Snap</span> 34 + </a> 35 + </td> 36 + <td class=table-stats> 37 + <span class="stats-number"> 38 + 2.1 39 + </span> 40 + <span class=stats-unit>min</span> 41 + </td> 42 + </tr> 43 + 44 + <tr> 45 + <td class=table-post> 46 + <div class="date"> 47 + 18/06 — 2023 31 48 </div> 32 49 <a href="/posts/plain_text_journaling" class="post-link"> 33 50 <span class="post-link">Plain Text Journaling</span> ··· 214 231 <tr> 215 232 <td class=table-post> 216 233 <div class="date"> 217 - 18/06 — 2020 234 + 17/06 — 2020 218 235 </div> 219 236 <a href="/posts/turing_complete_type_systems" class="post-link"> 220 237 <span class="post-link">Turing Complete Type Systems</span> ··· 231 248 <tr> 232 249 <td class=table-post> 233 250 <div class="date"> 234 - 09/05 — 2020 251 + 08/05 — 2020 235 252 </div> 236 253 <a href="/posts/auto-currying_rust_functions" class="post-link"> 237 254 <span class="post-link">Auto-currying Rust Functions</span> ··· 248 265 <tr> 249 266 <td class=table-post> 250 267 <div class="date"> 251 - 09/04 — 2020 268 + 08/04 — 2020 252 269 </div> 253 270 <a href="/posts/pixel_art_in_GIMP" class="post-link"> 254 271 <span class="post-link">Pixel Art In GIMP</span> ··· 265 282 <tr> 266 283 <td class=table-post> 267 284 <div class="date"> 268 - 01/04 — 2020 285 + 31/03 — 2020 269 286 </div> 270 287 <a href="/posts/rapid_refactoring_with_vim" class="post-link"> 271 288 <span class="post-link">Rapid Refactoring With Vim</span> ··· 282 299 <tr> 283 300 <td class=table-post> 284 301 <div class="date"> 285 - 17/03 — 2020 302 + 16/03 — 2020 286 303 </div> 287 304 <a href="/posts/font_size_fallacies" class="post-link"> 288 305 <span class="post-link">Font Size Fallacies</span> ··· 299 316 <tr> 300 317 <td class=table-post> 301 318 <div class="date"> 302 - 08/03 — 2020 319 + 07/03 — 2020 303 320 </div> 304 321 <a href="/posts/termux_tandem" class="post-link"> 305 322 <span class="post-link">Termux Tandem</span> ··· 316 333 <tr> 317 334 <td class=table-post> 318 335 <div class="date"> 319 - 08/02 — 2020 336 + 07/02 — 2020 320 337 </div> 321 338 <a href="/posts/call_to_ARMs" class="post-link"> 322 339 <span class="post-link">Call To ARMs</span> ··· 333 350 <tr> 334 351 <td class=table-post> 335 352 <div class="date"> 336 - 31/12 — 2019 353 + 30/12 — 2019 337 354 </div> 338 355 <a href="/posts/color_conundrum" class="post-link"> 339 356 <span class="post-link">Color Conundrum</span> ··· 350 367 <tr> 351 368 <td class=table-post> 352 369 <div class="date"> 353 - 23/11 — 2019 370 + 22/11 — 2019 354 371 </div> 355 372 <a href="/posts/static_sites_with_bash" class="post-link"> 356 373 <span class="post-link">Static Sites With Bash</span> ··· 367 384 <tr> 368 385 <td class=table-post> 369 386 <div class="date"> 370 - 07/11 — 2019 387 + 06/11 — 2019 371 388 </div> 372 389 <a href="/posts/my_setup" class="post-link"> 373 390 <span class="post-link">My Setup</span> ··· 435 452 <tr> 436 453 <td class=table-post> 437 454 <div class="date"> 438 - 31/07 — 2019 455 + 30/07 — 2019 439 456 </div> 440 457 <a href="/posts/bash_harder_with_vim" class="post-link"> 441 458 <span class="post-link">Bash Harder With Vim</span>
+2 -2
docs/posts/lightweight_linting/index.html
··· 217 217 your dependencies:</p> 218 218 <div class="sourceCode" id="cb21"><pre 219 219 class="sourceCode toml"><code class="sourceCode toml"><span id="cb21-1"><a href="#cb21-1" aria-hidden="true" tabindex="-1"></a><span class="co"># within Cargo.toml</span></span> 220 - <span id="cb21-2"><a href="#cb21-2" aria-hidden="true" tabindex="-1"></a><span class="kw">[</span><span class="dt">dependencies</span><span class="kw">]</span></span> 220 + <span id="cb21-2"><a href="#cb21-2" aria-hidden="true" tabindex="-1"></a><span class="kw">[dependencies]</span></span> 221 221 <span id="cb21-3"><a href="#cb21-3" aria-hidden="true" tabindex="-1"></a><span class="dt">tree-sitter</span> <span class="op">=</span> <span class="st">&quot;0.20&quot;</span></span> 222 222 <span id="cb21-4"><a href="#cb21-4" aria-hidden="true" tabindex="-1"></a></span> 223 - <span id="cb21-5"><a href="#cb21-5" aria-hidden="true" tabindex="-1"></a><span class="kw">[</span><span class="dt">dependencies</span><span class="kw">.</span><span class="dt">tree-sitter-rust</span><span class="kw">]</span></span> 223 + <span id="cb21-5"><a href="#cb21-5" aria-hidden="true" tabindex="-1"></a><span class="kw">[dependencies.tree-sitter-rust]</span></span> 224 224 <span id="cb21-6"><a href="#cb21-6" aria-hidden="true" tabindex="-1"></a><span class="dt">git</span> <span class="op">=</span> <span class="st">&quot;https://github.com/tree-sitter/tree-sitter-rust&quot;</span></span></code></pre></div> 225 225 <p>Let’s load in some Rust code to work with. As <a 226 226 href="https://en.wikipedia.org/wiki/Self-reference">an ode to Gödel</a>
+1 -1
docs/posts/my_setup/index.html
··· 25 25 ">View Raw</a> 26 26 <div class="separator"></div> 27 27 <div class="date"> 28 - 07/11 — 2019 28 + 06/11 — 2019 29 29 <div class="stats"> 30 30 <span class="stats-number"> 31 31 10.39
+1 -1
docs/posts/pixel_art_in_GIMP/index.html
··· 25 25 ">View Raw</a> 26 26 <div class="separator"></div> 27 27 <div class="date"> 28 - 09/04 — 2020 28 + 08/04 — 2020 29 29 <div class="stats"> 30 30 <span class="stats-number"> 31 31 55.54
+1 -1
docs/posts/plain_text_journaling/index.html
··· 25 25 ">View Raw</a> 26 26 <div class="separator"></div> 27 27 <div class="date"> 28 - 19/06 — 2023 28 + 18/06 — 2023 29 29 <div class="stats"> 30 30 <span class="stats-number"> 31 31 138.66
+1 -1
docs/posts/rapid_refactoring_with_vim/index.html
··· 25 25 ">View Raw</a> 26 26 <div class="separator"></div> 27 27 <div class="date"> 28 - 01/04 — 2020 28 + 31/03 — 2020 29 29 <div class="stats"> 30 30 <span class="stats-number"> 31 31 79.12
+140
docs/posts/snip_snap/index.html
··· 1 + <!DOCTYPE html> 2 + <html lang="en"> 3 + <head> 4 + <link rel="stylesheet" href="/style.css"> 5 + <link rel="stylesheet" href="/syntax.css"> 6 + <meta charset="UTF-8"> 7 + <meta name="viewport" content="initial-scale=1"> 8 + <meta content="#ffffff" name="theme-color"> 9 + <meta name="HandheldFriendly" content="true"> 10 + <meta property="og:title" content="Snip Snap"> 11 + <meta property="og:type" content="website"> 12 + <meta property="og:description" content="a static site {for, by, about} me "> 13 + <meta property="og:url" content="https://peppe.rs"> 14 + <link rel="icon" type="image/x-icon" href="/favicon.png"> 15 + <title>Snip Snap · peppe.rs</title> 16 + <body> 17 + <div class="posts"> 18 + <div class="post"> 19 + <a href="/" class="post-end-link">Home</a> 20 + <span>/</span> 21 + <a href="/posts" class="post-end-link">Posts</a> 22 + <span>/</span> 23 + <a class="post-end-link">Snip Snap</a> 24 + <a class="stats post-end-link" href="https://git.peppe.rs/web/site/plain/posts/snip_snap.md 25 + ">View Raw</a> 26 + <div class="separator"></div> 27 + <div class="date"> 28 + 08/05 — 2024 29 + <div class="stats"> 30 + <span class="stats-number"> 31 + 40.76 32 + </span> 33 + <span class="stats-unit">cm</span> 34 + &nbsp 35 + <span class="stats-number"> 36 + 2.1 37 + </span> 38 + <span class="stats-unit">min</span> 39 + </div> 40 + </div> 41 + <h1> 42 + Snip Snap 43 + </h1> 44 + <div class="post-text"> 45 + <p>I regularly switch between exactly two things while working, a 46 + “current” and an “alternate” item; a lot of tools I use seem to support 47 + this flow.</p> 48 + <h4 id="git">git</h4> 49 + <p>Pass <code>-</code> to <code>git-checkout</code> to switch to the 50 + previously active branch:</p> 51 + <div class="sourceCode" id="cb1"><pre 52 + class="sourceCode bash"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> git branch</span> 53 + <span id="cb1-2"><a href="#cb1-2" aria-hidden="true" tabindex="-1"></a><span class="ex">*</span> foo</span> 54 + <span id="cb1-3"><a href="#cb1-3" aria-hidden="true" tabindex="-1"></a> <span class="ex">bar</span></span> 55 + <span id="cb1-4"><a href="#cb1-4" aria-hidden="true" tabindex="-1"></a></span> 56 + <span id="cb1-5"><a href="#cb1-5" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> git checkout bar</span> 57 + <span id="cb1-6"><a href="#cb1-6" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> git branch</span> 58 + <span id="cb1-7"><a href="#cb1-7" aria-hidden="true" tabindex="-1"></a> <span class="ex">foo</span></span> 59 + <span id="cb1-8"><a href="#cb1-8" aria-hidden="true" tabindex="-1"></a><span class="ex">*</span> bar</span> 60 + <span id="cb1-9"><a href="#cb1-9" aria-hidden="true" tabindex="-1"></a></span> 61 + <span id="cb1-10"><a href="#cb1-10" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> git checkout <span class="at">-</span></span> 62 + <span id="cb1-11"><a href="#cb1-11" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> git branch</span> 63 + <span id="cb1-12"><a href="#cb1-12" aria-hidden="true" tabindex="-1"></a><span class="ex">*</span> foo</span> 64 + <span id="cb1-13"><a href="#cb1-13" aria-hidden="true" tabindex="-1"></a> <span class="ex">bar</span></span></code></pre></div> 65 + <h4 id="bash---cd">bash - cd</h4> 66 + <p>This may not be exclusive to <code>bash</code>:</p> 67 + <div class="sourceCode" id="cb2"><pre 68 + class="sourceCode bash"><code class="sourceCode bash"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="ex">~/foo</span> $ cd ~/bar</span> 69 + <span id="cb2-2"><a href="#cb2-2" aria-hidden="true" tabindex="-1"></a><span class="ex">~/bar</span> $ cd <span class="at">-</span></span> 70 + <span id="cb2-3"><a href="#cb2-3" aria-hidden="true" tabindex="-1"></a><span class="ex">~/foo</span> $</span></code></pre></div> 71 + <p>This is especially handy in combination with my <a 72 + href="../curing_a_case_of_git-UX/">git-worktree flow</a>:</p> 73 + <div class="sourceCode" id="cb3"><pre 74 + class="sourceCode bash"><code class="sourceCode bash"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="ex">~/main-branch</span> $ gwj feature</span> 75 + <span id="cb3-2"><a href="#cb3-2" aria-hidden="true" tabindex="-1"></a><span class="ex">~/feat-branch</span> $ cd <span class="at">-</span></span> 76 + <span id="cb3-3"><a href="#cb3-3" aria-hidden="true" tabindex="-1"></a><span class="ex">~/main-branch</span> $</span></code></pre></div> 77 + <h4 id="bash---jobs">bash - jobs</h4> 78 + <p>I often suspend multiple <code>vim</code> sessions with 79 + <code>Ctrl-Z</code>:</p> 80 + <div class="sourceCode" id="cb4"><pre 81 + class="sourceCode bash"><code class="sourceCode bash"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> jobs</span> 82 + <span id="cb4-2"><a href="#cb4-2" aria-hidden="true" tabindex="-1"></a><span class="ex">[1]+</span> Stopped vim transpiler/src/transform.rs</span> 83 + <span id="cb4-3"><a href="#cb4-3" aria-hidden="true" tabindex="-1"></a><span class="ex">[2]-</span> Stopped git commit <span class="at">--verbose</span></span></code></pre></div> 84 + <p>In the above example: I suspended <code>vim</code> when working on 85 + <code>transform.rs</code>, and then began working on a commit by running 86 + <code>git commit</code> without a message flag (lets you craft a message 87 + in <code>$EDITOR</code>). To bring the current job to the foreground, 88 + you can use <code>fg</code>:</p> 89 + <div class="sourceCode" id="cb5"><pre 90 + class="sourceCode bash"><code class="sourceCode bash"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> fg</span></code></pre></div> 91 + <p>With a job identifier:</p> 92 + <div class="sourceCode" id="cb6"><pre 93 + class="sourceCode bash"><code class="sourceCode bash"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> fg %2 <span class="co"># resumes interactive git commit</span></span></code></pre></div> 94 + <p>Or switch to “last” job, or the second-most-recently-resumed job:</p> 95 + <div class="sourceCode" id="cb7"><pre 96 + class="sourceCode bash"><code class="sourceCode bash"><span id="cb7-1"><a href="#cb7-1" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> fg %-</span> 97 + <span id="cb7-2"><a href="#cb7-2" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> %- <span class="co"># shorthand</span></span></code></pre></div> 98 + <h4 id="vim">vim</h4> 99 + <p>Switch to the last active buffer with <code>Ctrl+^</code>. In 100 + command-mode, <code>#</code> refers to the last active buffer, you can 101 + use this as an argument to a few commands:</p> 102 + <pre class="vimscript"><code>:b# &quot; switch to alternate buffer (same as Ctrl+^) 103 + :vsp# &quot; create a vertical split with the alternate buffer 104 + :read# &quot; read contents of alternate buffer into current buffer 105 + :!wc # &quot; pass file name of alternate buffer to the command `wc`</code></pre> 106 + <p>See <code>:help c_#</code> for more.</p> 107 + <h4 id="tmux">tmux</h4> 108 + <p>Switch to the last active tmux session with 109 + <code>&lt;prefix&gt;+shift+L</code>.</p> 110 + <h4 id="qutebrowser">qutebrowser</h4> 111 + <p>Switch to the last active tab with <code>g$</code>.</p> 112 + 113 + </div> 114 + 115 + <div class="intro"> 116 + Hi. 117 + <div class="hot-links"> 118 + <a href="https://peppe.rs/index.xml" class="feed-button">Subscribe</a> 119 + </div> 120 + <p>I'm Akshay, programmer and pixel-artist.</p> 121 + <p> 122 + I write <a href="https://git.peppe.rs">open-source stuff</a> to pass time. 123 + I also design fonts: 124 + <a href="https://git.peppe.rs/fonts/scientifica/about">scientifica</a>, 125 + <a href="https://git.peppe.rs/fonts/curie/about">curie</a>. 126 + </p> 127 + <p>Send me a mail at nerdy@peppe.rs or a message at np@irc.rizon.net.</p> 128 + </div> 129 + 130 + <a href="/" class="post-end-link">Home</a> 131 + <span>/</span> 132 + <a href="/posts" class="post-end-link">Posts</a> 133 + <span>/</span> 134 + <a class="post-end-link">Snip Snap</a> 135 + <a class="stats post-end-link" href="https://git.peppe.rs/web/site/plain/posts/snip_snap.md 136 + ">View Raw</a> 137 + </div> 138 + </div> 139 + </body> 140 + </html>
+1 -1
docs/posts/static_sites_with_bash/index.html
··· 25 25 ">View Raw</a> 26 26 <div class="separator"></div> 27 27 <div class="date"> 28 - 23/11 — 2019 28 + 22/11 — 2019 29 29 <div class="stats"> 30 30 <span class="stats-number"> 31 31 21.18
+1 -1
docs/posts/termux_tandem/index.html
··· 25 25 ">View Raw</a> 26 26 <div class="separator"></div> 27 27 <div class="date"> 28 - 08/03 — 2020 28 + 07/03 — 2020 29 29 <div class="stats"> 30 30 <span class="stats-number"> 31 31 19.18
+1 -1
docs/posts/turing_complete_type_systems/index.html
··· 25 25 ">View Raw</a> 26 26 <div class="separator"></div> 27 27 <div class="date"> 28 - 18/06 — 2020 28 + 17/06 — 2020 29 29 <div class="stats"> 30 30 <span class="stats-number"> 31 31 9.19
+102
posts/snip_snap.md
··· 1 + I regularly switch between exactly two things while working, 2 + a "current" and an "alternate" item; a lot of tools I use 3 + seem to support this flow. 4 + 5 + #### git 6 + 7 + Pass `-` to `git-checkout` to switch to the previously 8 + active branch: 9 + 10 + ```bash 11 + $ git branch 12 + * foo 13 + bar 14 + 15 + $ git checkout bar 16 + $ git branch 17 + foo 18 + * bar 19 + 20 + $ git checkout - 21 + $ git branch 22 + * foo 23 + bar 24 + ``` 25 + 26 + #### bash - cd 27 + 28 + This may not be exclusive to `bash`: 29 + 30 + ```bash 31 + ~/foo $ cd ~/bar 32 + ~/bar $ cd - 33 + ~/foo $ 34 + ``` 35 + 36 + This is especially handy in combination with my [git-worktree 37 + flow](../curing_a_case_of_git-UX/): 38 + 39 + ```bash 40 + ~/main-branch $ gwj feature 41 + ~/feat-branch $ cd - 42 + ~/main-branch $ 43 + ``` 44 + 45 + #### bash - jobs 46 + 47 + I often suspend multiple `vim` sessions with `Ctrl-Z`: 48 + 49 + ```bash 50 + $ jobs 51 + [1]+ Stopped vim transpiler/src/transform.rs 52 + [2]- Stopped git commit --verbose 53 + ``` 54 + 55 + In the above example: I suspended `vim` when working on 56 + `transform.rs`, and then began working on a commit by 57 + running `git commit` without a message flag (lets you craft 58 + a message in `$EDITOR`). To bring the current job to the 59 + foreground, you can use `fg`: 60 + 61 + ```bash 62 + $ fg 63 + ``` 64 + 65 + With a job identifier: 66 + 67 + ```bash 68 + $ fg %2 # resumes interactive git commit 69 + ``` 70 + 71 + Or switch to "last" job, or the second-most-recently-resumed 72 + job: 73 + 74 + ```bash 75 + $ fg %- 76 + $ %- # shorthand 77 + 78 + ``` 79 + 80 + #### vim 81 + 82 + Switch to the last active buffer with `Ctrl+^`. In 83 + command-mode, `#` refers to the last active buffer, you can 84 + use this as an argument to a few commands: 85 + 86 + ```vimscript 87 + :b# " switch to alternate buffer (same as Ctrl+^) 88 + :vsp# " create a vertical split with the alternate buffer 89 + :read# " read contents of alternate buffer into current buffer 90 + :!wc # " pass file name of alternate buffer to the command `wc` 91 + ``` 92 + 93 + See `:help c_#` for more. 94 + 95 + #### tmux 96 + 97 + Switch to the last active tmux session with 98 + `<prefix>+shift+L`. 99 + 100 + #### qutebrowser 101 + 102 + Switch to the last active tab with `g$`.