diff options
Diffstat (limited to 'docs/posts')
-rw-r--r-- | docs/posts/WPA_woes/index.html | 21 | ||||
-rw-r--r-- | docs/posts/bash_harder_with_vim/index.html | 9 | ||||
-rw-r--r-- | docs/posts/bye_bye_BDFs/index.html | 3 | ||||
-rw-r--r-- | docs/posts/call_to_ARMs/index.html | 131 | ||||
-rw-r--r-- | docs/posts/color_conundrum/index.html | 5 | ||||
-rw-r--r-- | docs/posts/get_better_at_yanking_and_putting_in_vim/index.html | 19 | ||||
-rw-r--r-- | docs/posts/hold_position!/index.html | 7 | ||||
-rw-r--r-- | docs/posts/my_setup/index.html | 5 | ||||
-rw-r--r-- | docs/posts/onivim_sucks/index.html | 11 | ||||
-rw-r--r-- | docs/posts/static_sites_with_bash/index.html | 27 |
10 files changed, 189 insertions, 49 deletions
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/Linux on my main |
40 | computer. Rolling release, non-systemd, need I say more?</p> | 41 | computer. 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/Linux distributions, wireless networks had |
43 | me in a fix. If you can see this post, it means I’ve managed | 44 | me in a fix. If you can see this post, it means I've managed |
44 | to get online. It turns out, <code>wpa_supplicant</code> was detecting the | 45 | to get online. It turns out, <code>wpa_supplicant</code> was detecting the |
45 | wrong interface by default (does it ever select the right | 46 | wrong interface by default (does it ever select the right |
46 | one?). Let us fix that:</p> | 47 | one?). Let us fix that:</p> |
47 | 48 | ||
48 | <pre><code>$ sudo rm -r /var/service/wpa_supplicant | 49 | <pre><code>$ sudo rm -r /var/service/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 |
61 | background process:</p> | 62 | background 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 /etc/wpa_supplicant/wpa_supplicant.conf |
64 | $ sudo dhcpcd -B wlp2s0 | 65 | $ sudo dhcpcd -B wlp2s0 |
65 | $ ping google.com | 66 | $ ping google.com |
66 | PING ... | 67 | PING ... |
@@ -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 /etc/wpa_supplicant/wpa_supplicant.conf |
73 | OPTS="-B" | 74 | OPTS="-B" |
74 | WPA_INTERFACE="wlp2s0" | 75 | WPA_INTERFACE="wlp2s0" |
75 | ------------------------------------------------------ | 76 | ------------------------------------------------------ |
76 | $ sudo ln -s /etc/sv/wpa_supplicant /var/service/ | 77 | $ sudo ln -s /etc/sv/wpa_supplicant /var/service/ |
77 | $ sudo ln -s /etc/sv/dhcpcd /var/service/ | 78 | $ sudo ln -s /etc/sv/dhcpcd /var/service/ |
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’t let your editor get in your way. Here’s a couple of neat | 40 | <p>Bash is tricky, don't let your editor get in your way. Here's a couple of neat |
40 | additions you could make to your <code>vimrc</code> for a better shell programming | 41 | additions you could make to your <code>vimrc</code> for a better shell programming |
41 | experience.</p> | 42 | experience.</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/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>. | |||
61 | a sample from the script used to generate this site: </p> | 62 | a 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 |
64 | echo "$1" | sed -E -e "s/\..+$//g" -e "s/_(.)/ \u\1/g" -e "s/^(.)/\u\1/g" | 65 | echo "$1" | sed -E -e "s/\..+$//g" -e "s/_(.)/ \u\1/g" -e "s/^(.)/\u\1/g" |
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 "$1" | sed -E -e "s/\..+$//g" -e "s/_(.)/ \u\1/g& | |||
80 | <pre><code>syntax off # previously run commands | 81 | <pre><code>syntax off # previously run commands |
81 | edit index.html # in a buffer! | 82 | edit index.html # in a buffer! |
82 | w | so % | 83 | w | so % |
83 | !echo "new_post.md" | sed -E -e "s/\..+$//g" --snip-- | 84 | !echo "new_post.md" | sed -E -e "s/\..+$//g" --snip-- |
84 | ^--- note the use of '!' | 85 | ^--- note the use of '!' |
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 | |||
52 | opentype metrics with ease).</p> | 53 | opentype 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>/<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 |
58 | such as <code>xterm</code> and <code>rxvt</code> use <code>xft</code> (X FreeType) to render fonts, and will | 59 | such 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 |   | ||
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 | ||
41 | tooling (Keil C). But we don't do that here.</p> | ||
42 | |||
43 | <h3 id="Building">Building</h3> | ||
44 | |||
45 | <p>Assembling and linking ARM binaries on non-ARM architecture | ||
46 | devices is fairly trivial. I went along with the GNU cross | ||
47 | bare metal toolchain binutils, which provides <code>arm-as</code> and | ||
48 | <code>arm-ld</code> (among a bunch of other utils that I don't care | ||
49 | about 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 | ||
58 | architecture.</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 | ||
68 | cannot read nor execute binaries compiled for ARM. So, we | ||
69 | simulate an ARM processor using <code>qemu</code>. Now qemu allows you | ||
70 | to run <code>gdbserver</code> on startup. Connecting our local <code>gdb</code> | ||
71 | instance to <code>gdbserver</code> gives us a view into the program’s | ||
72 | execution. Easy!</p> | ||
73 | |||
74 | <p>Run <code>qemu</code>, with <code>gdbserver</code> on port <code>1234</code>, with our ARM | ||
75 | binary, <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>’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 | ||
86 | Reading 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's not nearly as comfortable as well | ||
92 | fleshed out emulators/IDEs like Keil. Watching registers, | ||
93 | CPSR and memory chunks update <em>is</em> pretty fun. </p> | ||
94 | |||
95 | <p>I came across <code>gdb</code>'s TUI mode (hit <code>C-x C-a</code> or type <code>tui | ||
96 | enable</code> at the prompt). TUI mode is a godsend. It highlights | ||
97 | the current line of execution, shows you disassembly | ||
98 | outputs, 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>! “GDB | ||
103 | Enhanced Features” teaches our old dog some cool new tricks. | ||
104 | Here are some additions that made my ARM debugging | ||
105 | experience loads better:</p> | ||
106 | |||
107 | <ul> | ||
108 | <li>Memory watches</li> | ||
109 | <li>Register watches, with up to 7 levels of deref (overkill, | ||
110 | I 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 | ||
121 | dosen'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 |
54 | minded human eye is the same. The eye constantly looks for a | 55 | minded human eye is the same. The eye constantly looks for a |
55 | frame of reference, a focal point. It grows tired when it | 56 | frame of reference, a focal point. It grows tired when it |
56 | can’t find one.</p> | 57 | can'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 | |||
70 | out. Comments and non-code text (sign column, status text) | 71 | out. Comments and non-code text (sign column, status text) |
71 | are dimmed further.</p> | 72 | are dimmed further.</p> |
72 | 73 | ||
73 | <p>I’ll stop myself before I rant about color contrast and | 74 | <p>I'll stop myself before I rant about color contrast and |
74 | combinations.</p> | 75 | combinations.</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 " :h gv for more | 43 | <pre><code>gv " :h gv for more |
43 | " you can use `o` in visual mode to go to the `Other` end of the selection | 44 | " you can use `o` in visual mode to go to the `Other` end of the selection |
44 | " use a motion to fix the selection | 45 | " 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 | `[ " marks the beginning of the previously yanked text :h `[ | 50 | `[ " marks the beginning of the previously yanked text :h `[ |
50 | `] " marks the end :h `] | 51 | `] " marks the end :h `] |
51 | v " visual select everything in between | 52 | v " visual select everything in between |
52 | 53 | ||
53 | nnoremap gb `[v`] " "a quick map to perform the above | 54 | nnoremap gb `[v`] " "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 " put (p) and adjust indent to current line | 58 | <pre><code>]p " put (p) and adjust indent to current line |
58 | ]P " put the text before the cursor (P) and adjust indent to current line | 59 | ]P " 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> | |||
50 | our view, and restore it once its done, with <code>winrestview</code>.</p> | 51 | our 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() |
53 | s/\s\+$//gc " find and (confirm) replace trailing blanks | 54 | s/\s\+$//gc " find and (confirm) replace trailing blanks |
54 | winrestview(view) " restore our original view! | 55 | winrestview(view) " 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 “ (double | 58 | <p>It might seem a little overkill in the above example, just use `` (double |
58 | backticks) instead, but it comes in handy when you run your file through | 59 | backticks) instead, but it comes in handy when you run your file through |
59 | heavier filtering.</p> | 60 | heavier 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 | |||
46 | configuration files on <a href="https://github.com/nerdypepper">GitHub</a>.</p> | 47 | configuration 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" (2018)</a>. | 50 | <a href="https://store.hp.com/us/en/mdp/laptops/envy-13">HP Envy 13” (2018)</a>. |
50 | To keep things simple, I run a raw X session with <code>2bwm</code> as my | 51 | To keep things simple, I run a raw X session with <code>2bwm</code> as my |
51 | window manager, along with <code>dunst</code> (notification daemon) and | 52 | window manager, along with <code>dunst</code> (notification daemon) and |
52 | Sam’s <a href="https://github.com/sdhand/compton"><code>compton</code></a> | 53 | Sam'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 ‘modern modal editor’, combining fancy | 40 | <p><a href="https://v2.onivim.io">Onivim</a> is a ‘modern modal editor’, combining fancy |
40 | interface and language features with vim-style modal editing. What’s wrong you | 41 | interface and language features with vim-style modal editing. What's wrong you |
41 | ask?</p> | 42 | ask?</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>, |
48 | which prohibits redistribution in both object code and source code formats.</p> | 49 | which prohibits redistribution in both object code and source code formats.</p> |
49 | 50 | ||
50 | <p>Onivim’s core editor logic (bits that belong to vim), have been separated from | 51 | <p>Onivim's core editor logic (bits that belong to vim), have been separated from |
51 | the interface, into <a href="https://github.com/onivim/libvim">libvim</a>. libvim is | 52 | the interface, into <a href="https://github.com/onivim/libvim">libvim</a>. libvim is |
52 | licensed under MIT, which means, this ‘extension’ of vim is perfectly in | 53 | licensed under MIT, which means, this ‘extension’ of vim is perfectly in |
53 | adherence to <a href="http://vimdoc.sourceforge.net/htmldoc/uganda.html#license">vim’s license text</a>! | 54 | adherence to <a href="http://vimdoc.sourceforge.net/htmldoc/uganda.html#license">vim's license text</a>! |
54 | Outrun Labs are exploiting this loophole (distributing vim as a library) to | 55 | Outrun Labs are exploiting this loophole (distributing vim as a library) to |
55 | commercialize Onivim.</p> | 56 | commercialize Onivim.</p> |
56 | 57 | ||
57 | <p>Onivim’s source code is available on <a href="https://github.com/onivim/oni2">GitHub</a>. | 58 | <p>Onivim's source code is available on <a href="https://github.com/onivim/oni2">GitHub</a>. |
58 | They do mention that the source code trickles down to the | 59 | They 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 |
60 | MIT-licensed code, <strong>18 months</strong> after each commit to the original repository.</p> | 61 | MIT-licensed code, <strong>18 months</strong> after each commit to the original repository.</p> |
61 | 62 | ||
62 | <p>Want to contribute to Onivim? Don’t. They make a profit out of your contributions. | 63 | <p>Want to contribute to Onivim? Don't. They make a profit out of your contributions. |
63 | Currently, Onivim is priced at $19.99, ‘pre-alpha’ pricing which is 80% off the | 64 | Currently, Onivim is priced at $19.99, ‘pre-alpha’ pricing which is 80% off the |
64 | final price! If you are on the lookout for an editor, I would suggest using | 65 | final 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/</code> has to be the entry point. Markdown formatted posts |
55 | go into <code>posts/</code>, get converted into html, and end up in | 56 | go into <code>posts/</code>, get converted into html, and end up in |
56 | <code>docs/index.html</code>, something like this:</p> | 57 | <code>docs/index.html</code>, something like this:</p> |
57 | 58 | ||
58 | <pre><code>posts=$(ls -t ./posts) # chronological order! | 59 | <pre><code>posts=$(ls -t ./posts) # chronological order! |
59 | for f in $posts; do | 60 | for f in $posts; do |
60 | file="./posts/"$f # `ls` mangled our file paths | 61 | file="./posts/"$f # `ls` mangled our file paths |
61 | echo "generating post $file" | 62 | echo "generating post $file" |
62 | 63 | ||
63 | html=$(lowdown "$file") | 64 | html=$(lowdown "$file") |
64 | echo -e "html" >> docs/index.html | 65 | echo -e "html" >> docs/index.html |
65 | done | 66 | done |
66 | </code></pre> | 67 | </code></pre> |
67 | 68 | ||
@@ -72,15 +73,15 @@ assets into the site source itself. That does have it’s | |||
72 | merits, but I prefer hosting images separately:</p> | 73 | merits, but I prefer hosting images separately:</p> |
73 | 74 | ||
74 | <pre><code># strip file extension | 75 | <pre><code># strip file extension |
75 | ext="${1##*.}" | 76 | ext="${1##*.}" |
76 | 77 | ||
77 | # generate a random file name | 78 | # generate a random file name |
78 | id=$( cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 2 | head -n 1 ) | 79 | id=$( cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 2 | head -n 1 ) |
79 | id="$id.$ext" | 80 | id="$id.$ext" |
80 | 81 | ||
81 | # copy to my file host | 82 | # copy to my file host |
82 | scp -P 443 "$1" emerald:files/"$id" | 83 | scp -P 443 "$1" emerald:files/"$id" |
83 | echo "https://u.peppe.rs/$id" | 84 | echo "https://u.peppe.rs/$id" |
84 | </code></pre> | 85 | </code></pre> |
85 | 86 | ||
86 | <h3 id="Templating">Templating</h3> | 87 | <h3 id="Templating">Templating</h3> |