aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/favicon.pngbin621 -> 618 bytes
-rw-r--r--docs/index.html17
-rw-r--r--docs/posts/WPA_woes/index.html21
-rw-r--r--docs/posts/bash_harder_with_vim/index.html9
-rw-r--r--docs/posts/bye_bye_BDFs/index.html3
-rw-r--r--docs/posts/call_to_ARMs/index.html131
-rw-r--r--docs/posts/color_conundrum/index.html5
-rw-r--r--docs/posts/get_better_at_yanking_and_putting_in_vim/index.html19
-rw-r--r--docs/posts/hold_position!/index.html7
-rw-r--r--docs/posts/my_setup/index.html5
-rw-r--r--docs/posts/onivim_sucks/index.html11
-rw-r--r--docs/posts/static_sites_with_bash/index.html27
-rw-r--r--docs/style.css4
-rw-r--r--post.esh1
-rw-r--r--posts/call_to_ARMs.md84
15 files changed, 295 insertions, 49 deletions
diff --git a/docs/favicon.png b/docs/favicon.png
index 311ce53..030ef01 100644
--- a/docs/favicon.png
+++ b/docs/favicon.png
Binary files differ
diff --git a/docs/index.html b/docs/index.html
index c400f7e..1021db6 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -23,6 +23,23 @@
23 <tr> 23 <tr>
24 <td class=table-post> 24 <td class=table-post>
25 <div class="date"> 25 <div class="date">
26 09/02 — 2020
27 </div>
28 <a href="/posts/call_to_ARMs" class="post-link">
29 <span class="post-link">Call To ARMs</span>
30 </a>
31 </td>
32 <td class=table-stats>
33 <span class="stats-number">
34 2.2
35 </span>
36 <span class=stats-unit>min</span>
37 </td>
38 </tr>
39
40 <tr>
41 <td class=table-post>
42 <div class="date">
26 31/12 — 2019 43 31/12 — 2019
27 </div> 44 </div>
28 <a href="/posts/color_conundrum" class="post-link"> 45 <a href="/posts/color_conundrum" class="post-link">
diff --git a/docs/posts/WPA_woes/index.html b/docs/posts/WPA_woes/index.html
index a4ef973..a676210 100644
--- a/docs/posts/WPA_woes/index.html
+++ b/docs/posts/WPA_woes/index.html
@@ -10,6 +10,7 @@
10 <meta property="og:type" content="website"> 10 <meta property="og:type" content="website">
11 <meta property="og:description" content="a static site {for, by, about} me "> 11 <meta property="og:description" content="a static site {for, by, about} me ">
12 <meta property="og:url" content="https://peppe.rs"> 12 <meta property="og:url" content="https://peppe.rs">
13 <link rel="icon" type="image/x-icon" href="/favicon.png">
13 <title>WPA Woes - peppe.rs</title> 14 <title>WPA Woes - peppe.rs</title>
14 <body> 15 <body>
15 <div class="posts"> 16 <div class="posts">
@@ -36,16 +37,16 @@
36 WPA Woes 37 WPA Woes
37 </span> 38 </span>
38 <div class="post-text"> 39 <div class="post-text">
39 <p>I finally got around to installing Void GNU/Linux on my main 40 <p>I finally got around to installing Void GNU&#47;Linux on my main
40computer. Rolling release, non-systemd, need I say more?</p> 41computer. Rolling release, non-systemd, need I say more?</p>
41 42
42<p>As with all GNU/Linux distributions, wireless networks had 43<p>As with all GNU&#47;Linux distributions, wireless networks had
43me in a fix. If you can see this post, it means I&#8217;ve managed 44me in a fix. If you can see this post, it means I&#39;ve managed
44to get online. It turns out, <code>wpa_supplicant</code> was detecting the 45to get online. It turns out, <code>wpa_supplicant</code> was detecting the
45wrong interface by default (does it ever select the right 46wrong interface by default (does it ever select the right
46one?). Let us fix that:</p> 47one?). Let us fix that:</p>
47 48
48<pre><code>$ sudo rm -r /var/service/wpa_supplicant 49<pre><code>$ sudo rm -r &#47;var&#47;service&#47;wpa_supplicant
49$ sudo killall dhcpcd 50$ sudo killall dhcpcd
50</code></pre> 51</code></pre>
51 52
@@ -60,7 +61,7 @@ $ sudo killall dhcpcd
60<p>Aha! Let us run <code>wpa_supplicant</code> on that interface, as a 61<p>Aha! Let us run <code>wpa_supplicant</code> on that interface, as a
61background process:</p> 62background process:</p>
62 63
63<pre><code>$ sudo wpa_supplicant -B -i wlp2s0 -c /etc/wpa_supplicant/wpa_supplicant.conf 64<pre><code>$ sudo wpa_supplicant -B -i wlp2s0 -c &#47;etc&#47;wpa_supplicant&#47;wpa_supplicant.conf
64$ sudo dhcpcd -B wlp2s0 65$ sudo dhcpcd -B wlp2s0
65$ ping google.com 66$ ping google.com
66PING ... 67PING ...
@@ -69,12 +70,12 @@ PING ...
69<p>Yay! Make those changes perpetual by enabling the service:</p> 70<p>Yay! Make those changes perpetual by enabling the service:</p>
70 71
71<pre><code>------------------------------------------------------ 72<pre><code>------------------------------------------------------
72# Add these to /etc/wpa_supplicant/wpa_supplicant.conf 73# Add these to &#47;etc&#47;wpa_supplicant&#47;wpa_supplicant.conf
73OPTS=&quot;-B&quot; 74OPTS=&#34;-B&#34;
74WPA_INTERFACE=&quot;wlp2s0&quot; 75WPA_INTERFACE=&#34;wlp2s0&#34;
75------------------------------------------------------ 76------------------------------------------------------
76$ sudo ln -s /etc/sv/wpa_supplicant /var/service/ 77$ sudo ln -s &#47;etc&#47;sv&#47;wpa_supplicant &#47;var&#47;service&#47;
77$ sudo ln -s /etc/sv/dhcpcd /var/service/ 78$ sudo ln -s &#47;etc&#47;sv&#47;dhcpcd &#47;var&#47;service&#47;
78$ sudo sv restart wpa_supplicant 79$ sudo sv restart wpa_supplicant
79$ sudo sv restart dhcpcd 80$ sudo sv restart dhcpcd
80</code></pre> 81</code></pre>
diff --git a/docs/posts/bash_harder_with_vim/index.html b/docs/posts/bash_harder_with_vim/index.html
index 7d6d7b3..c9303a6 100644
--- a/docs/posts/bash_harder_with_vim/index.html
+++ b/docs/posts/bash_harder_with_vim/index.html
@@ -10,6 +10,7 @@
10 <meta property="og:type" content="website"> 10 <meta property="og:type" content="website">
11 <meta property="og:description" content="a static site {for, by, about} me "> 11 <meta property="og:description" content="a static site {for, by, about} me ">
12 <meta property="og:url" content="https://peppe.rs"> 12 <meta property="og:url" content="https://peppe.rs">
13 <link rel="icon" type="image/x-icon" href="/favicon.png">
13 <title>Bash Harder With Vim - peppe.rs</title> 14 <title>Bash Harder With Vim - peppe.rs</title>
14 <body> 15 <body>
15 <div class="posts"> 16 <div class="posts">
@@ -36,7 +37,7 @@
36 Bash Harder With Vim 37 Bash Harder With Vim
37 </span> 38 </span>
38 <div class="post-text"> 39 <div class="post-text">
39 <p>Bash is tricky, don&#8217;t let your editor get in your way. Here&#8217;s a couple of neat 40 <p>Bash is tricky, don&#39;t let your editor get in your way. Here&#39;s a couple of neat
40additions you could make to your <code>vimrc</code> for a better shell programming 41additions you could make to your <code>vimrc</code> for a better shell programming
41experience.</p> 42experience.</p>
42 43
@@ -44,7 +45,7 @@ experience.</p>
44 45
45<p>Source this script to get started: </p> 46<p>Source this script to get started: </p>
46 47
47<pre><code>runtime ftplugin/man.vim 48<pre><code>runtime ftplugin&#47;man.vim
48</code></pre> 49</code></pre>
49 50
50<p>Now, you can open manpages inside vim with <code>:Man</code>! It adds nicer syntax highlighting 51<p>Now, you can open manpages inside vim with <code>:Man</code>! It adds nicer syntax highlighting
@@ -61,7 +62,7 @@ and the ability to jump around with <code>Ctrl-]</code> and <code>Ctrl-T</code>.
61a sample from the script used to generate this site: </p> 62a sample from the script used to generate this site: </p>
62 63
63<pre><code># a substitution to convert snake_case to Title Case With Spaces 64<pre><code># a substitution to convert snake_case to Title Case With Spaces
64echo &quot;$1&quot; | sed -E -e &quot;s/\..+$//g&quot; -e &quot;s/_(.)/ \u\1/g&quot; -e &quot;s/^(.)/\u\1/g&quot; 65echo &#34;$1&#34; | sed -E -e &#34;s&#47;\..+$&#47;&#47;g&#34; -e &#34;s&#47;_(.)&#47; \u\1&#47;g&#34; -e &#34;s&#47;^(.)&#47;\u\1&#47;g&#34;
65</code></pre> 66</code></pre>
66 67
67<p>Instead of dropping into a new shell, just test it out directly from vim!</p> 68<p>Instead of dropping into a new shell, just test it out directly from vim!</p>
@@ -80,7 +81,7 @@ echo &quot;$1&quot; | sed -E -e &quot;s/\..+$//g&quot; -e &quot;s/_(.)/ \u\1/g&
80<pre><code>syntax off # previously run commands 81<pre><code>syntax off # previously run commands
81edit index.html # in a buffer! 82edit index.html # in a buffer!
82w | so % 83w | so %
83!echo &quot;new_post.md&quot; | sed -E -e &quot;s/\..+$//g&quot; --snip-- 84!echo &#34;new_post.md&#34; | sed -E -e &#34;s&#47;\..+$&#47;&#47;g&#34; --snip--
84^--- note the use of &#39;!&#39; 85^--- note the use of &#39;!&#39;
85</code></pre></li> 86</code></pre></li>
86<li><p>Hit enter with the cursor on the line containing your command!</p> 87<li><p>Hit enter with the cursor on the line containing your command!</p>
diff --git a/docs/posts/bye_bye_BDFs/index.html b/docs/posts/bye_bye_BDFs/index.html
index 74a58d0..73c8512 100644
--- a/docs/posts/bye_bye_BDFs/index.html
+++ b/docs/posts/bye_bye_BDFs/index.html
@@ -10,6 +10,7 @@
10 <meta property="og:type" content="website"> 10 <meta property="og:type" content="website">
11 <meta property="og:description" content="a static site {for, by, about} me "> 11 <meta property="og:description" content="a static site {for, by, about} me ">
12 <meta property="og:url" content="https://peppe.rs"> 12 <meta property="og:url" content="https://peppe.rs">
13 <link rel="icon" type="image/x-icon" href="/favicon.png">
13 <title>Bye Bye BDFs - peppe.rs</title> 14 <title>Bye Bye BDFs - peppe.rs</title>
14 <body> 15 <body>
15 <div class="posts"> 16 <div class="posts">
@@ -52,7 +53,7 @@ provided no advantage over Harfbuzz (other than being able to fetch
52opentype metrics with ease).</p> 53opentype metrics with ease).</p>
53 54
54<p>Upgrading to Pango v1.44 will break your GTK applications (if you use a 55<p>Upgrading to Pango v1.44 will break your GTK applications (if you use a
55<code>bdf</code>/<code>pcf</code> bitmap font). Harfbuzz <em>does</em> support bitmap-only OpenType fonts, 56<code>bdf</code>&#47;<code>pcf</code> bitmap font). Harfbuzz <em>does</em> support bitmap-only OpenType fonts,
56<code>otb</code>s. Convert your existing fonts over to <code>otb</code>s using 57<code>otb</code>s. Convert your existing fonts over to <code>otb</code>s using
57<a href="https://fontforge.github.io">FontForge</a>. It is to be noted that applications 58<a href="https://fontforge.github.io">FontForge</a>. It is to be noted that applications
58such as <code>xterm</code> and <code>rxvt</code> use <code>xft</code> (X FreeType) to render fonts, and will 59such as <code>xterm</code> and <code>rxvt</code> use <code>xft</code> (X FreeType) to render fonts, and will
diff --git a/docs/posts/call_to_ARMs/index.html b/docs/posts/call_to_ARMs/index.html
new file mode 100644
index 0000000..4085a90
--- /dev/null
+++ b/docs/posts/call_to_ARMs/index.html
@@ -0,0 +1,131 @@
1<!DOCTYPE html>
2<html lang="en">
3 <head>
4 <link rel="stylesheet" href="/style.css">
5 <meta charset="UTF-8">
6 <meta name="viewport" content="initial-scale=1">
7 <meta content="#ffffff" name="theme-color">
8 <meta name="HandheldFriendly" content="true">
9 <meta property="og:title" content="nerdypepper">
10 <meta property="og:type" content="website">
11 <meta property="og:description" content="a static site {for, by, about} me ">
12 <meta property="og:url" content="https://peppe.rs">
13 <link rel="icon" type="image/x-icon" href="/favicon.png">
14 <title>Call To ARMs - peppe.rs</title>
15 <body>
16 <div class="posts">
17 <div class="post">
18 <a href="/" class="post-end-link">⟵ Back</a>
19 <a class="stats post-end-link" href="https://raw.githubusercontent.com/nerdypepper/site/master/posts/call_to_ARMs.md
20">View Raw</a>
21 <div class="separator"></div>
22 <div class="date">
23 09/02 — 2020
24 <div class="stats">
25 <span class="stats-number">
26 33.57
27 </span>
28 <span class="stats-unit">cm</span>
29 &nbsp
30 <span class="stats-number">
31 2.2
32 </span>
33 <span class="stats-unit">min</span>
34 </div>
35 </div>
36 <span class="post-title">
37 Call To ARMs
38 </span>
39 <div class="post-text">
40 <p>My 4th semester involves ARM programming. And proprietary
41tooling (Keil C). But we don&#39;t do that here.</p>
42
43<h3 id="Building">Building</h3>
44
45<p>Assembling and linking ARM binaries on non-ARM architecture
46devices is fairly trivial. I went along with the GNU cross
47bare metal toolchain binutils, which provides <code>arm-as</code> and
48<code>arm-ld</code> (among a bunch of other utils that I don&#39;t care
49about for now). </p>
50
51<p>Assemble <code>.s</code> files with:</p>
52
53<pre><code class="language-shell">arm-none-eabi-as main.s -g -march=armv8.1-a -o main.out
54</code></pre>
55
56<p>The <code>-g</code> flag generates extra debugging information that
57<code>gdb</code> picks up. The <code>-march</code> option establishes target
58architecture.</p>
59
60<p>Link <code>.o</code> files with:</p>
61
62<pre><code class="language-shell">arm-none-eabi-ld main.out -o main
63</code></pre>
64
65<h3 id="Running%20(and%20Debugging)">Running (and Debugging)</h3>
66
67<p>Things get interesting here. <code>gdb</code> on your x86 machine
68cannot read nor execute binaries compiled for ARM. So, we
69simulate an ARM processor using <code>qemu</code>. Now qemu allows you
70to run <code>gdbserver</code> on startup. Connecting our local <code>gdb</code>
71instance to <code>gdbserver</code> gives us a view into the program&#8217;s
72execution. Easy!</p>
73
74<p>Run <code>qemu</code>, with <code>gdbserver</code> on port <code>1234</code>, with our ARM
75binary, <code>main</code>:</p>
76
77<pre><code class="language-shell">qemu-arm -singlestep -g 1234 main
78</code></pre>
79
80<p>Start up <code>gdb</code> on your machine, and connect to <code>qemu</code>&#8217;s
81<code>gdbserver</code>:</p>
82
83<pre><code>(gdb) set architecture armv8-a
84(gdb) target remote localhost:1234
85(gdb) file main
86Reading symbols from main... # yay!
87</code></pre>
88
89<h3 id="GDB%20Enhanced">GDB Enhanced</h3>
90
91<p><code>gdb</code> is cool, but it&#39;s not nearly as comfortable as well
92fleshed out emulators&#47;IDEs like Keil. Watching registers,
93CPSR and memory chunks update <em>is</em> pretty fun. </p>
94
95<p>I came across <code>gdb</code>&#39;s TUI mode (hit <code>C-x C-a</code> or type <code>tui
96enable</code> at the prompt). TUI mode is a godsend. It highlights
97the current line of execution, shows you disassembly
98outputs, updated registers, active breakpoints and more.</p>
99
100<p><em>But</em>, it is an absolute eyesore.</p>
101
102<p>Say hello to <a href="https://github.com/hugsy/gef">GEF</a>! &#8220;GDB
103Enhanced Features&#8221; teaches our old dog some cool new tricks.
104Here are some additions that made my ARM debugging
105experience loads better:</p>
106
107<ul>
108<li>Memory watches</li>
109<li>Register watches, with up to 7 levels of deref (overkill,
110I agree)</li>
111<li>Stack tracing</li>
112</ul>
113
114<p>And its pretty! See for yourself:</p>
115
116<p><img src="https://u.peppe.rs/wq.png" alt="gef.png" /></p>
117
118<h3 id="Editing">Editing</h3>
119
120<p>Vim, with <code>syntax off</code> because it
121dosen&#39;t handle GNU ARM syntax too well.</p>
122
123 </div>
124 <div class="separator"></div>
125 <a href="/" class="post-end-link">⟵ Back</a>
126 <a class="stats post-end-link" href="https://raw.githubusercontent.com/nerdypepper/site/master/posts/call_to_ARMs.md
127">View Raw</a>
128 </div>
129 </div>
130 </body>
131</html>
diff --git a/docs/posts/color_conundrum/index.html b/docs/posts/color_conundrum/index.html
index 4182e00..de099f2 100644
--- a/docs/posts/color_conundrum/index.html
+++ b/docs/posts/color_conundrum/index.html
@@ -10,6 +10,7 @@
10 <meta property="og:type" content="website"> 10 <meta property="og:type" content="website">
11 <meta property="og:description" content="a static site {for, by, about} me "> 11 <meta property="og:description" content="a static site {for, by, about} me ">
12 <meta property="og:url" content="https://peppe.rs"> 12 <meta property="og:url" content="https://peppe.rs">
13 <link rel="icon" type="image/x-icon" href="/favicon.png">
13 <title>Color Conundrum - peppe.rs</title> 14 <title>Color Conundrum - peppe.rs</title>
14 <body> 15 <body>
15 <div class="posts"> 16 <div class="posts">
@@ -53,7 +54,7 @@ technical terms used?</p>
53<p>Prose and code are certainly different, but the fickle 54<p>Prose and code are certainly different, but the fickle
54minded human eye is the same. The eye constantly looks for a 55minded human eye is the same. The eye constantly looks for a
55frame of reference, a focal point. It grows tired when it 56frame of reference, a focal point. It grows tired when it
56can&#8217;t find one.</p> 57can&#39;t find one.</p>
57 58
58<p>The following comparison does a better job of explaining 59<p>The following comparison does a better job of explaining
59(none, ample and over-the-top highlighting, from left to 60(none, ample and over-the-top highlighting, from left to
@@ -70,7 +71,7 @@ keywords and other noise (<code>let</code>, <code>as</code>) are mildly dimmed
70out. Comments and non-code text (sign column, status text) 71out. Comments and non-code text (sign column, status text)
71are dimmed further.</p> 72are dimmed further.</p>
72 73
73<p>I&#8217;ll stop myself before I rant about color contrast and 74<p>I&#39;ll stop myself before I rant about color contrast and
74combinations.</p> 75combinations.</p>
75 76
76 </div> 77 </div>
diff --git a/docs/posts/get_better_at_yanking_and_putting_in_vim/index.html b/docs/posts/get_better_at_yanking_and_putting_in_vim/index.html
index 76d59be..1c77c44 100644
--- a/docs/posts/get_better_at_yanking_and_putting_in_vim/index.html
+++ b/docs/posts/get_better_at_yanking_and_putting_in_vim/index.html
@@ -10,6 +10,7 @@
10 <meta property="og:type" content="website"> 10 <meta property="og:type" content="website">
11 <meta property="og:description" content="a static site {for, by, about} me "> 11 <meta property="og:description" content="a static site {for, by, about} me ">
12 <meta property="og:url" content="https://peppe.rs"> 12 <meta property="og:url" content="https://peppe.rs">
13 <link rel="icon" type="image/x-icon" href="/favicon.png">
13 <title>Get Better At Yanking And Putting In Vim - peppe.rs</title> 14 <title>Get Better At Yanking And Putting In Vim - peppe.rs</title>
14 <body> 15 <body>
15 <div class="posts"> 16 <div class="posts">
@@ -39,23 +40,23 @@
39 <ol start="1"> 40 <ol start="1">
40<li><p>reselecting previously selected text (i use this to fix botched selections):</p> 41<li><p>reselecting previously selected text (i use this to fix botched selections):</p>
41 42
42<pre><code>gv &quot; :h gv for more 43<pre><code>gv &#34; :h gv for more
43 &quot; you can use `o` in visual mode to go to the `Other` end of the selection 44 &#34; you can use `o` in visual mode to go to the `Other` end of the selection
44 &quot; use a motion to fix the selection 45 &#34; use a motion to fix the selection
45</code></pre></li> 46</code></pre></li>
46<li><p>reselecting previously yanked text:</p> 47<li><p>reselecting previously yanked text:</p>
47 48
48<pre><code>`[v`] 49<pre><code>`[v`]
49`[ &quot; marks the beginning of the previously yanked text :h `[ 50`[ &#34; marks the beginning of the previously yanked text :h `[
50`] &quot; marks the end :h `] 51`] &#34; marks the end :h `]
51 v &quot; visual select everything in between 52 v &#34; visual select everything in between
52 53
53nnoremap gb `[v`] &quot; &quot;a quick map to perform the above 54nnoremap gb `[v`] &#34; &#34;a quick map to perform the above
54</code></pre></li> 55</code></pre></li>
55<li><p>pasting and indenting text (in one go):</p> 56<li><p>pasting and indenting text (in one go):</p>
56 57
57<pre><code>]p &quot; put (p) and adjust indent to current line 58<pre><code>]p &#34; put (p) and adjust indent to current line
58]P &quot; put the text before the cursor (P) and adjust indent to current line 59]P &#34; put the text before the cursor (P) and adjust indent to current line
59</code></pre></li> 60</code></pre></li>
60</ol> 61</ol>
61 62
diff --git a/docs/posts/hold_position!/index.html b/docs/posts/hold_position!/index.html
index 54d9b72..8cc77fe 100644
--- a/docs/posts/hold_position!/index.html
+++ b/docs/posts/hold_position!/index.html
@@ -10,6 +10,7 @@
10 <meta property="og:type" content="website"> 10 <meta property="og:type" content="website">
11 <meta property="og:description" content="a static site {for, by, about} me "> 11 <meta property="og:description" content="a static site {for, by, about} me ">
12 <meta property="og:url" content="https://peppe.rs"> 12 <meta property="og:url" content="https://peppe.rs">
13 <link rel="icon" type="image/x-icon" href="/favicon.png">
13 <title>Hold Position! - peppe.rs</title> 14 <title>Hold Position! - peppe.rs</title>
14 <body> 15 <body>
15 <div class="posts"> 16 <div class="posts">
@@ -50,11 +51,11 @@ none of which concern us.</p>
50our view, and restore it once its done, with <code>winrestview</code>.</p> 51our view, and restore it once its done, with <code>winrestview</code>.</p>
51 52
52<pre><code>let view = winsaveview() 53<pre><code>let view = winsaveview()
53s/\s\+$//gc &quot; find and (confirm) replace trailing blanks 54s&#47;\s\+$&#47;&#47;gc &#34; find and (confirm) replace trailing blanks
54winrestview(view) &quot; restore our original view! 55winrestview(view) &#34; restore our original view!
55</code></pre> 56</code></pre>
56 57
57<p>It might seem a little overkill in the above example, just use &#8220; (double 58<p>It might seem a little overkill in the above example, just use `` (double
58backticks) instead, but it comes in handy when you run your file through 59backticks) instead, but it comes in handy when you run your file through
59heavier filtering.</p> 60heavier filtering.</p>
60 61
diff --git a/docs/posts/my_setup/index.html b/docs/posts/my_setup/index.html
index f652a38..4ac9d91 100644
--- a/docs/posts/my_setup/index.html
+++ b/docs/posts/my_setup/index.html
@@ -10,6 +10,7 @@
10 <meta property="og:type" content="website"> 10 <meta property="og:type" content="website">
11 <meta property="og:description" content="a static site {for, by, about} me "> 11 <meta property="og:description" content="a static site {for, by, about} me ">
12 <meta property="og:url" content="https://peppe.rs"> 12 <meta property="og:url" content="https://peppe.rs">
13 <link rel="icon" type="image/x-icon" href="/favicon.png">
13 <title>My Setup - peppe.rs</title> 14 <title>My Setup - peppe.rs</title>
14 <body> 15 <body>
15 <div class="posts"> 16 <div class="posts">
@@ -46,10 +47,10 @@ to replicate on fresh installations. You can find my
46configuration files on <a href="https://github.com/nerdypepper">GitHub</a>.</p> 47configuration files on <a href="https://github.com/nerdypepper">GitHub</a>.</p>
47 48
48<p>I run Void Linux (glibc) on my 49<p>I run Void Linux (glibc) on my
49<a href="https://store.hp.com/us/en/mdp/laptops/envy-13">HP Envy 13&quot; (2018)</a>. 50<a href="https://store.hp.com/us/en/mdp/laptops/envy-13">HP Envy 13&#8221; (2018)</a>.
50To keep things simple, I run a raw X session with <code>2bwm</code> as my 51To keep things simple, I run a raw X session with <code>2bwm</code> as my
51window manager, along with <code>dunst</code> (notification daemon) and 52window manager, along with <code>dunst</code> (notification daemon) and
52Sam&#8217;s <a href="https://github.com/sdhand/compton"><code>compton</code></a> 53Sam&#39;s <a href="https://github.com/sdhand/compton"><code>compton</code></a>
53(compositor) fork.</p> 54(compositor) fork.</p>
54 55
55<p>I am a fan of GNU tools, so I use <code>bash</code> as my shell, and 56<p>I am a fan of GNU tools, so I use <code>bash</code> as my shell, and
diff --git a/docs/posts/onivim_sucks/index.html b/docs/posts/onivim_sucks/index.html
index e1053c1..d3718d7 100644
--- a/docs/posts/onivim_sucks/index.html
+++ b/docs/posts/onivim_sucks/index.html
@@ -10,6 +10,7 @@
10 <meta property="og:type" content="website"> 10 <meta property="og:type" content="website">
11 <meta property="og:description" content="a static site {for, by, about} me "> 11 <meta property="og:description" content="a static site {for, by, about} me ">
12 <meta property="og:url" content="https://peppe.rs"> 12 <meta property="og:url" content="https://peppe.rs">
13 <link rel="icon" type="image/x-icon" href="/favicon.png">
13 <title>Onivim Sucks - peppe.rs</title> 14 <title>Onivim Sucks - peppe.rs</title>
14 <body> 15 <body>
15 <div class="posts"> 16 <div class="posts">
@@ -37,7 +38,7 @@
37 </span> 38 </span>
38 <div class="post-text"> 39 <div class="post-text">
39 <p><a href="https://v2.onivim.io">Onivim</a> is a &#8216;modern modal editor&#8217;, combining fancy 40 <p><a href="https://v2.onivim.io">Onivim</a> is a &#8216;modern modal editor&#8217;, combining fancy
40interface and language features with vim-style modal editing. What&#8217;s wrong you 41interface and language features with vim-style modal editing. What&#39;s wrong you
41ask?</p> 42ask?</p>
42 43
43<p>Apart from <a href="https://github.com/onivim/oni2/issues/550">buggy syntax highlighting</a>, 44<p>Apart from <a href="https://github.com/onivim/oni2/issues/550">buggy syntax highlighting</a>,
@@ -47,19 +48,19 @@ Onivim is <strong>proprietary</strong> software. It is licensed under a commerci
47<a href="https://github.com/onivim/oni1/blob/master/Outrun-Labs-EULA-v1.1.md">end user agreement license</a>, 48<a href="https://github.com/onivim/oni1/blob/master/Outrun-Labs-EULA-v1.1.md">end user agreement license</a>,
48which prohibits redistribution in both object code and source code formats.</p> 49which prohibits redistribution in both object code and source code formats.</p>
49 50
50<p>Onivim&#8217;s core editor logic (bits that belong to vim), have been separated from 51<p>Onivim&#39;s core editor logic (bits that belong to vim), have been separated from
51the interface, into <a href="https://github.com/onivim/libvim">libvim</a>. libvim is 52the interface, into <a href="https://github.com/onivim/libvim">libvim</a>. libvim is
52licensed under MIT, which means, this &#8216;extension&#8217; of vim is perfectly in 53licensed under MIT, which means, this &#8216;extension&#8217; of vim is perfectly in
53adherence to <a href="http://vimdoc.sourceforge.net/htmldoc/uganda.html#license">vim&#8217;s license text</a>! 54adherence to <a href="http://vimdoc.sourceforge.net/htmldoc/uganda.html#license">vim&#39;s license text</a>!
54Outrun Labs are exploiting this loophole (distributing vim as a library) to 55Outrun Labs are exploiting this loophole (distributing vim as a library) to
55commercialize Onivim.</p> 56commercialize Onivim.</p>
56 57
57<p>Onivim&#8217;s source code is available on <a href="https://github.com/onivim/oni2">GitHub</a>. 58<p>Onivim&#39;s source code is available on <a href="https://github.com/onivim/oni2">GitHub</a>.
58They do mention that the source code trickles down to the 59They do mention that the source code trickles down to the
59<a href="https://github.com/onivim/oni2-mit">oni2-mit</a> repository, which (not yet) contains 60<a href="https://github.com/onivim/oni2-mit">oni2-mit</a> repository, which (not yet) contains
60MIT-licensed code, <strong>18 months</strong> after each commit to the original repository.</p> 61MIT-licensed code, <strong>18 months</strong> after each commit to the original repository.</p>
61 62
62<p>Want to contribute to Onivim? Don&#8217;t. They make a profit out of your contributions. 63<p>Want to contribute to Onivim? Don&#39;t. They make a profit out of your contributions.
63Currently, Onivim is priced at $19.99, &#8216;pre-alpha&#8217; pricing which is 80% off the 64Currently, Onivim is priced at $19.99, &#8216;pre-alpha&#8217; pricing which is 80% off the
64final price! If you are on the lookout for an editor, I would suggest using 65final price! If you are on the lookout for an editor, I would suggest using
65<a href="https://vim.org">Vim</a>, charity ware that actually works, and costs $100 lesser.</p> 66<a href="https://vim.org">Vim</a>, charity ware that actually works, and costs $100 lesser.</p>
diff --git a/docs/posts/static_sites_with_bash/index.html b/docs/posts/static_sites_with_bash/index.html
index 7c1adda..9eb4846 100644
--- a/docs/posts/static_sites_with_bash/index.html
+++ b/docs/posts/static_sites_with_bash/index.html
@@ -10,6 +10,7 @@
10 <meta property="og:type" content="website"> 10 <meta property="og:type" content="website">
11 <meta property="og:description" content="a static site {for, by, about} me "> 11 <meta property="og:description" content="a static site {for, by, about} me ">
12 <meta property="og:url" content="https://peppe.rs"> 12 <meta property="og:url" content="https://peppe.rs">
13 <link rel="icon" type="image/x-icon" href="/favicon.png">
13 <title>Static Sites With Bash - peppe.rs</title> 14 <title>Static Sites With Bash - peppe.rs</title>
14 <body> 15 <body>
15 <div class="posts"> 16 <div class="posts">
@@ -51,17 +52,17 @@ to html with <a href="https://kristaps.bsd.lv/lowdown/">lowdown</a>.</p>
51<h3 id="Directory%20structure">Directory structure</h3> 52<h3 id="Directory%20structure">Directory structure</h3>
52 53
53<p>I host my site on GitHub pages, so 54<p>I host my site on GitHub pages, so
54<code>docs/</code> has to be the entry point. Markdown formatted posts 55<code>docs&#47;</code> has to be the entry point. Markdown formatted posts
55go into <code>posts/</code>, get converted into html, and end up in 56go into <code>posts&#47;</code>, get converted into html, and end up in
56<code>docs/index.html</code>, something like this:</p> 57<code>docs&#47;index.html</code>, something like this:</p>
57 58
58<pre><code>posts=$(ls -t ./posts) # chronological order! 59<pre><code>posts=$(ls -t .&#47;posts) # chronological order!
59for f in $posts; do 60for f in $posts; do
60 file=&quot;./posts/&quot;$f # `ls` mangled our file paths 61 file=&#34;.&#47;posts&#47;&#34;$f # `ls` mangled our file paths
61 echo &quot;generating post $file&quot; 62 echo &#34;generating post $file&#34;
62 63
63 html=$(lowdown &quot;$file&quot;) 64 html=$(lowdown &#34;$file&#34;)
64 echo -e &quot;html&quot; &gt;&gt; docs/index.html 65 echo -e &#34;html&#34; &#62;&#62; docs&#47;index.html
65done 66done
66</code></pre> 67</code></pre>
67 68
@@ -72,15 +73,15 @@ assets into the site source itself. That does have it&#8217;s
72merits, but I prefer hosting images separately:</p> 73merits, but I prefer hosting images separately:</p>
73 74
74<pre><code># strip file extension 75<pre><code># strip file extension
75ext=&quot;${1##*.}&quot; 76ext=&#34;${1##*.}&#34;
76 77
77# generate a random file name 78# generate a random file name
78id=$( cat /dev/urandom | tr -dc &#39;a-zA-Z0-9&#39; | fold -w 2 | head -n 1 ) 79id=$( cat &#47;dev&#47;urandom | tr -dc &#39;a-zA-Z0-9&#39; | fold -w 2 | head -n 1 )
79id=&quot;$id.$ext&quot; 80id=&#34;$id.$ext&#34;
80 81
81# copy to my file host 82# copy to my file host
82scp -P 443 &quot;$1&quot; emerald:files/&quot;$id&quot; 83scp -P 443 &#34;$1&#34; emerald:files&#47;&#34;$id&#34;
83echo &quot;https://u.peppe.rs/$id&quot; 84echo &#34;https:&#47;&#47;u.peppe.rs&#47;$id&#34;
84</code></pre> 85</code></pre>
85 86
86<h3 id="Templating">Templating</h3> 87<h3 id="Templating">Templating</h3>
diff --git a/docs/style.css b/docs/style.css
index b09fed8..be19ad0 100644
--- a/docs/style.css
+++ b/docs/style.css
@@ -173,6 +173,10 @@ a, a:hover, a:visited, a:active {
173 font-size: 0.9rem; 173 font-size: 0.9rem;
174} 174}
175 175
176ul {
177 list-style: lower-greek inside none;
178}
179
176pre, code { 180pre, code {
177 color: var(--black); 181 color: var(--black);
178 font-family: monospace; 182 font-family: monospace;
diff --git a/post.esh b/post.esh
index 413e165..cc23a2d 100644
--- a/post.esh
+++ b/post.esh
@@ -10,6 +10,7 @@
10 <meta property="og:type" content="website"> 10 <meta property="og:type" content="website">
11 <meta property="og:description" content="a static site {for, by, about} me "> 11 <meta property="og:description" content="a static site {for, by, about} me ">
12 <meta property="og:url" content="https://peppe.rs"> 12 <meta property="og:url" content="https://peppe.rs">
13 <link rel="icon" type="image/x-icon" href="/favicon.png">
13 <title><%=$title%> - peppe.rs</title> 14 <title><%=$title%> - peppe.rs</title>
14 <body> 15 <body>
15 <div class="posts"> 16 <div class="posts">
diff --git a/posts/call_to_ARMs.md b/posts/call_to_ARMs.md
new file mode 100644
index 0000000..c4ce60a
--- /dev/null
+++ b/posts/call_to_ARMs.md
@@ -0,0 +1,84 @@
1My 4th semester involves ARM programming. And proprietary
2tooling (Keil C). But we don't do that here.
3
4### Building
5
6Assembling and linking ARM binaries on non-ARM architecture
7devices is fairly trivial. I went along with the GNU cross
8bare metal toolchain binutils, which provides `arm-as` and
9`arm-ld` (among a bunch of other utils that I don't care
10about for now).
11
12Assemble `.s` files with:
13
14```shell
15arm-none-eabi-as main.s -g -march=armv8.1-a -o main.out
16```
17
18The `-g` flag generates extra debugging information that
19`gdb` picks up. The `-march` option establishes target
20architecture.
21
22Link `.o` files with:
23
24```shell
25arm-none-eabi-ld main.out -o main
26```
27
28### Running (and Debugging)
29
30Things get interesting here. `gdb` on your x86 machine
31cannot read nor execute binaries compiled for ARM. So, we
32simulate an ARM processor using `qemu`. Now qemu allows you
33to run `gdbserver` on startup. Connecting our local `gdb`
34instance to `gdbserver` gives us a view into the program's
35execution. Easy!
36
37Run `qemu`, with `gdbserver` on port `1234`, with our ARM
38binary, `main`:
39
40```shell
41qemu-arm -singlestep -g 1234 main
42```
43
44Start up `gdb` on your machine, and connect to `qemu`'s
45`gdbserver`:
46
47```
48(gdb) set architecture armv8-a
49(gdb) target remote localhost:1234
50(gdb) file main
51Reading symbols from main... # yay!
52```
53
54### GDB Enhanced
55
56`gdb` is cool, but it's not nearly as comfortable as well
57fleshed out emulators/IDEs like Keil. Watching registers,
58CPSR and memory chunks update *is* pretty fun.
59
60I came across `gdb`'s TUI mode (hit `C-x C-a` or type `tui
61enable` at the prompt). TUI mode is a godsend. It highlights
62the current line of execution, shows you disassembly
63outputs, updated registers, active breakpoints and more.
64
65*But*, it is an absolute eyesore.
66
67Say hello to [GEF](https://github.com/hugsy/gef)! "GDB
68Enhanced Features" teaches our old dog some cool new tricks.
69Here are some additions that made my ARM debugging
70experience loads better:
71
72 - Memory watches
73 - Register watches, with up to 7 levels of deref (overkill,
74 I agree)
75 - Stack tracing
76
77And its pretty! See for yourself:
78
79![gef.png](https://u.peppe.rs/wq.png)
80
81### Editing
82
83Vim, with `syntax off` because it
84dosen't handle GNU ARM syntax too well.