aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/index.html111
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
45computer. Rolling release, non-systemd, need I say more?</p>
46
47<p>As with all GNU/Linux distributions, wireless networks had
48me in a fix. If you can see this post, it means I&#8217;ve managed
49to get online. It turns out, <code>wpa_supplicant</code> was detecting the
50wrong interface by default (does it ever select the right
51one?). 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
66background 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
71PING ...
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
78OPTS=&quot;-B&quot;
79WPA_INTERFACE=&quot;wlp2s0&quot;
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 &#8220;big&#8221; changes to a file (a
233macro 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
238about the view of the current window. This includes the cursor line number,
239cursor coloumn, the top most line in the window and a couple of other values,
240none of which concern us.</p>
241
242<p>Before running our command (one that jumps around the buffer, a lot), we save
243our view, and restore it once its done, with <code>winrestview</code>.</p>
244
245<pre><code>let view = winsaveview()
246s/\s\+$//gc &quot; find and (confirm) replace trailing blanks
247winrestview(view) &quot; restore our original view!
248</code></pre>
249
250<p>It might seem a little overkill in the above example, just use &#8220; (double
251backticks) instead, but it comes in handy when you run your file through
252heavier 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`] &quot; &quot;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 &#8220;big&#8221; changes to a file (a
213macro 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
218about the view of the current window. This includes the cursor line number,
219cursor coloumn, the top most line in the window and a couple of other values,
220none of which concern us.</p>
221
222<p>Before running our command (one that jumps around the buffer, a lot), we save
223our view, and restore it once its done, with <code>winrestview</code>.</p>
224
225<pre><code>let view = winsaveview()
226s/\s\+$//gc &quot; find and (confirm) replace trailing blanks
227winrestview(view) &quot; restore our original view!
228</code></pre>
229
230<p>It might seem a little overkill in the above example, just use &#8220; (double
231backticks) instead, but it comes in handy when you run your file through
232heavier 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>