diff options
author | Akshay <[email protected]> | 2019-10-13 03:46:39 +0100 |
---|---|---|
committer | Akshay <[email protected]> | 2019-10-13 03:46:39 +0100 |
commit | e9d5f995d17137e0b70855904c3315b8a4985e6f (patch) | |
tree | 8c803e7ccb986e2c620f42402ad2a908d113d7d1 /docs | |
parent | 9367110d68282fb8c811741e26d1f487921e877c (diff) |
new post!
Diffstat (limited to 'docs')
-rw-r--r-- | docs/index.html | 111 |
1 files changed, 81 insertions, 30 deletions
diff --git a/docs/index.html b/docs/index.html index f8bc349..d6b29ef 100644 --- a/docs/index.html +++ b/docs/index.html | |||
@@ -38,6 +38,57 @@ function showPost(id) { | |||
38 | 38 | ||
39 | 39 | ||
40 | <div class="post"> | 40 | <div class="post"> |
41 | <div class="date">12/10 2019</div> | ||
42 | <a id="post-WPA_woes.md" class="post-link" onClick="showPost('WPA_woes.md')" >WPA Woes</a> | ||
43 | <div id="WPA_woes.md" class="post-text" style="display: none"> | ||
44 | <p>I finally got around to installing Void GNU/Linux on my main | ||
45 | computer. Rolling release, non-systemd, need I say more?</p> | ||
46 | |||
47 | <p>As with all GNU/Linux distributions, wireless networks had | ||
48 | me in a fix. If you can see this post, it means I’ve managed | ||
49 | to get online. It turns out, <code>wpa_supplicant</code> was detecting the | ||
50 | wrong interface by default (does it ever select the right | ||
51 | one?). Let us fix that:</p> | ||
52 | |||
53 | <pre><code>$ sudo rm -r /var/service/wpa_supplicant | ||
54 | $ sudo killall dhcpcd | ||
55 | </code></pre> | ||
56 | |||
57 | <p>What is the right interface though?</p> | ||
58 | |||
59 | <pre><code>$ iw dev | ||
60 | ... | ||
61 | Interface wlp2s0 | ||
62 | ... | ||
63 | </code></pre> | ||
64 | |||
65 | <p>Aha! Let us run <code>wpa_supplicant</code> on that interface, as a | ||
66 | background process:</p> | ||
67 | |||
68 | <pre><code>$ sudo wpa_supplicant -B -i wlp2s0 -c /etc/wpa_supplicant/wpa_supplicant.conf | ||
69 | $ sudo dhcpcd -B wlp2s0 | ||
70 | $ ping google.com | ||
71 | PING ... | ||
72 | </code></pre> | ||
73 | |||
74 | <p>Yay! Make those changes perpetual by enabling the service:</p> | ||
75 | |||
76 | <pre><code>------------------------------------------------------ | ||
77 | # Add these to /etc/wpa_supplicant/wpa_supplicant.conf | ||
78 | OPTS="-B" | ||
79 | WPA_INTERFACE="wlp2s0" | ||
80 | ------------------------------------------------------ | ||
81 | $ sudo ln -s /etc/sv/wpa_supplicant /var/service/ | ||
82 | $ sudo ln -s /etc/sv/dhcpcd /var/service/ | ||
83 | $ sudo sv restart wpa_supplicant | ||
84 | $ sudo sv restart dhcpcd | ||
85 | </code></pre> | ||
86 | <a href="#WPA_woes.md" class="post-end-link" onClick="showPost('WPA_woes.md')">↑ Collapse</a> | ||
87 | <div class=separator></div> | ||
88 | </div> | ||
89 | </div> | ||
90 | |||
91 | <div class="post"> | ||
41 | <div class="date">07/08 2019</div> | 92 | <div class="date">07/08 2019</div> |
42 | <a id="post-bye_bye_BDFs.md" class="post-link" onClick="showPost('bye_bye_BDFs.md')" >Bye Bye BDFs</a> | 93 | <a id="post-bye_bye_BDFs.md" class="post-link" onClick="showPost('bye_bye_BDFs.md')" >Bye Bye BDFs</a> |
43 | <div id="bye_bye_BDFs.md" class="post-text" style="display: none"> | 94 | <div id="bye_bye_BDFs.md" class="post-text" style="display: none"> |
@@ -176,6 +227,36 @@ Press ENTER or type command to continue | |||
176 | 227 | ||
177 | <div class="post"> | 228 | <div class="post"> |
178 | <div class="date">30/07 2019</div> | 229 | <div class="date">30/07 2019</div> |
230 | <a id="post-hold_position!.md" class="post-link" onClick="showPost('hold_position!.md')" >Hold Position!</a> | ||
231 | <div id="hold_position!.md" class="post-text" style="display: none"> | ||
232 | <p>Often times, when I run a vim command that makes “big” changes to a file (a | ||
233 | macro or a <code>:vimgrep</code> command) I lose my original position and feel disoriented.</p> | ||
234 | |||
235 | <p><em>Save position with <code>winsaveview()</code>!</em></p> | ||
236 | |||
237 | <p>The <code>winsaveview()</code> command returns a <code>Dictionary</code> that contains information | ||
238 | about the view of the current window. This includes the cursor line number, | ||
239 | cursor coloumn, the top most line in the window and a couple of other values, | ||
240 | none of which concern us.</p> | ||
241 | |||
242 | <p>Before running our command (one that jumps around the buffer, a lot), we save | ||
243 | our view, and restore it once its done, with <code>winrestview</code>.</p> | ||
244 | |||
245 | <pre><code>let view = winsaveview() | ||
246 | s/\s\+$//gc " find and (confirm) replace trailing blanks | ||
247 | winrestview(view) " restore our original view! | ||
248 | </code></pre> | ||
249 | |||
250 | <p>It might seem a little overkill in the above example, just use “ (double | ||
251 | backticks) instead, but it comes in handy when you run your file through | ||
252 | heavier filtering.</p> | ||
253 | <a href="#hold_position!.md" class="post-end-link" onClick="showPost('hold_position!.md')">↑ Collapse</a> | ||
254 | <div class=separator></div> | ||
255 | </div> | ||
256 | </div> | ||
257 | |||
258 | <div class="post"> | ||
259 | <div class="date">29/07 2019</div> | ||
179 | <a id="post-get_better_at_yanking_and_putting_in_vim.md" class="post-link" onClick="showPost('get_better_at_yanking_and_putting_in_vim.md')" >Get Better At Yanking And Putting In Vim</a> | 260 | <a id="post-get_better_at_yanking_and_putting_in_vim.md" class="post-link" onClick="showPost('get_better_at_yanking_and_putting_in_vim.md')" >Get Better At Yanking And Putting In Vim</a> |
180 | <div id="get_better_at_yanking_and_putting_in_vim.md" class="post-text" style="display: none"> | 261 | <div id="get_better_at_yanking_and_putting_in_vim.md" class="post-text" style="display: none"> |
181 | <ol start="1"> | 262 | <ol start="1"> |
@@ -205,36 +286,6 @@ nnoremap gb `[v`] " "a quick map to perform the above | |||
205 | </div> | 286 | </div> |
206 | </div> | 287 | </div> |
207 | 288 | ||
208 | <div class="post"> | ||
209 | <div class="date">30/07 2019</div> | ||
210 | <a id="post-hold_position!.md" class="post-link" onClick="showPost('hold_position!.md')" >Hold Position!</a> | ||
211 | <div id="hold_position!.md" class="post-text" style="display: none"> | ||
212 | <p>Often times, when I run a vim command that makes “big” changes to a file (a | ||
213 | macro or a <code>:vimgrep</code> command) I lose my original position and feel disoriented.</p> | ||
214 | |||
215 | <p><em>Save position with <code>winsaveview()</code>!</em></p> | ||
216 | |||
217 | <p>The <code>winsaveview()</code> command returns a <code>Dictionary</code> that contains information | ||
218 | about the view of the current window. This includes the cursor line number, | ||
219 | cursor coloumn, the top most line in the window and a couple of other values, | ||
220 | none of which concern us.</p> | ||
221 | |||
222 | <p>Before running our command (one that jumps around the buffer, a lot), we save | ||
223 | our view, and restore it once its done, with <code>winrestview</code>.</p> | ||
224 | |||
225 | <pre><code>let view = winsaveview() | ||
226 | s/\s\+$//gc " find and (confirm) replace trailing blanks | ||
227 | winrestview(view) " restore our original view! | ||
228 | </code></pre> | ||
229 | |||
230 | <p>It might seem a little overkill in the above example, just use “ (double | ||
231 | backticks) instead, but it comes in handy when you run your file through | ||
232 | heavier filtering.</p> | ||
233 | <a href="#hold_position!.md" class="post-end-link" onClick="showPost('hold_position!.md')">↑ Collapse</a> | ||
234 | <div class=separator></div> | ||
235 | </div> | ||
236 | </div> | ||
237 | |||
238 | </div> | 289 | </div> |
239 | </body> | 290 | </body> |
240 | </html> | 291 | </html> |