From ada45c1bea838e5f38f24fe37e558c1b7959ae28 Mon Sep 17 00:00:00 2001 From: Akshay Date: Thu, 16 Apr 2020 20:40:45 +0530 Subject: redo pandoc commands to print fragments only --- docs/posts/WPA_woes/index.html | 31 ++------- docs/posts/bash_harder_with_vim/index.html | 31 ++------- docs/posts/bye_bye_BDFs/index.html | 31 ++------- docs/posts/call_to_ARMs/index.html | 31 ++------- docs/posts/color_conundrum/index.html | 31 ++------- docs/posts/font_size_fallacies/index.html | 31 ++------- .../index.html | 31 ++------- docs/posts/hold_position!/index.html | 31 ++------- docs/posts/my_setup/index.html | 31 ++------- docs/posts/onivim_sucks/index.html | 31 ++------- docs/posts/pixel_art_in_GIMP/index.html | 31 ++------- docs/posts/rapid_refactoring_with_vim/index.html | 75 ++-------------------- docs/posts/static_sites_with_bash/index.html | 75 ++-------------------- docs/posts/termux_tandem/index.html | 31 ++------- 14 files changed, 98 insertions(+), 424 deletions(-) (limited to 'docs/posts') diff --git a/docs/posts/WPA_woes/index.html b/docs/posts/WPA_woes/index.html index f3fcfcf..0c50385 100644 --- a/docs/posts/WPA_woes/index.html +++ b/docs/posts/WPA_woes/index.html @@ -2,6 +2,7 @@ + @@ -37,27 +38,7 @@ WPA Woes
- - - - - - - WPA_woes - - - - -

I finally got around to installing Void GNU/Linux on my main computer. Rolling release, non-systemd, need I say more?

+

I finally got around to installing Void GNU/Linux on my main computer. Rolling release, non-systemd, need I say more?

As with all GNU/Linux distributions, wireless networks had me in a fix. If you can see this post, it means I’ve managed to get online. It turns out, wpa_supplicant was detecting the wrong interface by default (does it ever select the right one?). Let us fix that:

$ sudo rm -r /var/service/wpa_supplicant
 $ sudo killall dhcpcd
@@ -81,13 +62,15 @@ $ sudo ln -s /etc/sv/wpa_supplicant /var/service/ $ sudo ln -s /etc/sv/dhcpcd /var/service/ $ sudo sv restart wpa_supplicant $ sudo sv restart dhcpcd - -
- Hi. Subscribe + Hi. +

I'm Akshay, I go by nerd or nerdypepper on the internet.

I am a compsci undergrad, Rust programmer and an enthusiastic Vimmer. diff --git a/docs/posts/bash_harder_with_vim/index.html b/docs/posts/bash_harder_with_vim/index.html index 17c066a..7c9e5d6 100644 --- a/docs/posts/bash_harder_with_vim/index.html +++ b/docs/posts/bash_harder_with_vim/index.html @@ -2,6 +2,7 @@ + @@ -37,27 +38,7 @@ Bash Harder With Vim

- - - - - - - bash_harder_with_vim - - - - -

Bash is tricky, don’t let your editor get in your way. Here’s a couple of neat additions you could make to your vimrc for a better shell programming experience.

+

Bash is tricky, don’t let your editor get in your way. Here’s a couple of neat additions you could make to your vimrc for a better shell programming experience.

Man pages inside vim

Source this script to get started:

runtime ftplugin/man.vim
@@ -91,13 +72,15 @@ w | so %
$ vim
 New Post         # output
 Press ENTER or type command to continue
- -
- Hi. Subscribe + Hi. +

I'm Akshay, I go by nerd or nerdypepper on the internet.

I am a compsci undergrad, Rust programmer and an enthusiastic Vimmer. diff --git a/docs/posts/bye_bye_BDFs/index.html b/docs/posts/bye_bye_BDFs/index.html index d7b7e46..a2e410d 100644 --- a/docs/posts/bye_bye_BDFs/index.html +++ b/docs/posts/bye_bye_BDFs/index.html @@ -2,6 +2,7 @@ + @@ -37,39 +38,21 @@ Bye Bye BDFs

- - - - - - - bye_bye_BDFs - - - - -

Glyph Bitmap Distribution Format is no more, as the creators of Pango, one of the most widely used text rendering libraries, announced their plans for Pango 1.44.

+

Glyph Bitmap Distribution Format is no more, as the creators of Pango, one of the most widely used text rendering libraries, announced their plans for Pango 1.44.

Until recently, Pango used FreeType to draw fonts. They will be moving over to Harfbuzz, an evolution of FreeType.

Why?

In short, FreeType was hard to work with. It required complex logic, and provided no advantage over Harfbuzz (other than being able to fetch opentype metrics with ease).

Upgrading to Pango v1.44 will break your GTK applications (if you use a bdf/pcf bitmap font). Harfbuzz does support bitmap-only OpenType fonts, otbs. Convert your existing fonts over to otbs using FontForge. It is to be noted that applications such as xterm and rxvt use xft (X FreeType) to render fonts, and will remain unaffected by the update.

Both scientifica and curie will soon ship with bitmap-only OpenType font formats.

- -
- Hi. Subscribe + Hi. +

I'm Akshay, I go by nerd or nerdypepper on the internet.

I am a compsci undergrad, Rust programmer and an enthusiastic Vimmer. diff --git a/docs/posts/call_to_ARMs/index.html b/docs/posts/call_to_ARMs/index.html index 578a8b7..f882e6b 100644 --- a/docs/posts/call_to_ARMs/index.html +++ b/docs/posts/call_to_ARMs/index.html @@ -2,6 +2,7 @@ + @@ -37,27 +38,7 @@ Call To ARMs

- - - - - - - call_to_ARMs - - - - -

My 4th semester involves ARM programming. And proprietary tooling (Keil C). But we don’t do that here.

+

My 4th semester involves ARM programming. And proprietary tooling (Keil C). But we don’t do that here.

Building

Assembling and linking ARM binaries on non-ARM architecture devices is fairly trivial. I went along with the GNU cross bare metal toolchain binutils, which provides arm-as and arm-ld (among a bunch of other utils that I don’t care about for now).

Assemble .s files with:

@@ -88,13 +69,15 @@ Reading symbols from main... # yay!

Editing

Vim, with syntax off because it dosen’t handle GNU ARM syntax too well.

- -
- Hi. Subscribe + Hi. +

I'm Akshay, I go by nerd or nerdypepper on the internet.

I am a compsci undergrad, Rust programmer and an enthusiastic Vimmer. diff --git a/docs/posts/color_conundrum/index.html b/docs/posts/color_conundrum/index.html index f732fd0..0ba7aa5 100644 --- a/docs/posts/color_conundrum/index.html +++ b/docs/posts/color_conundrum/index.html @@ -2,6 +2,7 @@ + @@ -37,27 +38,7 @@ Color Conundrum

- - - - - - - color_conundrum - - - - -

This piece aims to highlight (pun intended) some of the reasons behind my color free editor setup.

+

This piece aims to highlight (pun intended) some of the reasons behind my color free editor setup.

Imagine highlighting an entire book because all of it is important. That is exactly what (most) syntax highlighting does. It is difficult for the human eye to filter out noise in rainbow barf. Use color to draw attention, not diverge it.

At the same time, a book devoid of color is boring! What is the takeaway from this 10 line paragraph? What are the technical terms used?

Prose and code are certainly different, but the fickle minded human eye is the same. The eye constantly looks for a frame of reference, a focal point. It grows tired when it can’t find one.

@@ -65,13 +46,15 @@

Without highlighting (far left), it is hard to differentiate between comments and code! The florid color scheme (far right) is no good either, it contains too many attention grabbers. The center sample is a healthy balance of both. Function calls and constants stand out, and repetitive keywords and other noise (let, as) are mildly dimmed out. Comments and non-code text (sign column, status text) are dimmed further.

I’ll stop myself before I rant about color contrast and combinations.

- -
- Hi. Subscribe + Hi. +

I'm Akshay, I go by nerd or nerdypepper on the internet.

I am a compsci undergrad, Rust programmer and an enthusiastic Vimmer. diff --git a/docs/posts/font_size_fallacies/index.html b/docs/posts/font_size_fallacies/index.html index f8bffad..c91eba5 100644 --- a/docs/posts/font_size_fallacies/index.html +++ b/docs/posts/font_size_fallacies/index.html @@ -2,6 +2,7 @@ + @@ -37,27 +38,7 @@ Font Size Fallacies

- - - - - - - font_size_fallacies - - - - -

I am not an expert with fonts, but I do have some experience 1, and common sense. This post aims to debunk some misconceptions about font sizes!

+

I am not an expert with fonts, but I do have some experience 1, and common sense. This post aims to debunk some misconceptions about font sizes!

11 px on your display is probably not 11 px on my display. Let’s do some quick math. I have two displays, 1366x768 @ 21" and another with 1920x1080 @ 13", call them A and B for now.

Display A has 1,049,088 pixels. A pixel is a square, of side say, s cm. The total area covered by my 21" display is about 1,066 cm^2 (41x26). Thus,

Display A
@@ -87,13 +68,15 @@ Dimensions: 1920x1080 @ 13" (29.5x16.5 sq. cm)
 
  • https://en.wikipedia.org/wiki/Sony_Xperia_1↩︎

  • - -
    - Hi. Subscribe + Hi. +

    I'm Akshay, I go by nerd or nerdypepper on the internet.

    I am a compsci undergrad, Rust programmer and an enthusiastic Vimmer. 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 6536f6d..a009a15 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 @@ -2,6 +2,7 @@ + @@ -37,27 +38,7 @@ Get Better At Yanking And Putting In Vim

    - - - - - - - get_better_at_yanking_and_putting_in_vim - - - - -

    a couple of nifty tricks to help you copy-paste better:

    +

    a couple of nifty tricks to help you copy-paste better:

    1. reselecting previously selected text (i use this to fix botched selections):

      gv  " :h gv for more
      @@ -74,13 +55,15 @@ nnoremap gb `[v`]    " "a quick map to perform the above
      <
      ]p   " put (p) and adjust indent to current line
       ]P   " put the text before the cursor (P) and adjust indent to current line
    - -
    - Hi. Subscribe + Hi. +

    I'm Akshay, I go by nerd or nerdypepper on the internet.

    I am a compsci undergrad, Rust programmer and an enthusiastic Vimmer. diff --git a/docs/posts/hold_position!/index.html b/docs/posts/hold_position!/index.html index b14d41a..61e4768 100644 --- a/docs/posts/hold_position!/index.html +++ b/docs/posts/hold_position!/index.html @@ -2,6 +2,7 @@ + @@ -37,27 +38,7 @@ Hold Position!

    - - - - - - - hold_position! - - - - -

    Often times, when I run a vim command that makes “big” changes to a file (a macro or a :vimgrep command) I lose my original position and feel disoriented.

    +

    Often times, when I run a vim command that makes “big” changes to a file (a macro or a :vimgrep command) I lose my original position and feel disoriented.

    Save position with winsaveview()!

    The winsaveview() command returns a Dictionary that contains information about the view of the current window. This includes the cursor line number, cursor coloumn, the top most line in the window and a couple of other values, none of which concern us.

    Before running our command (one that jumps around the buffer, a lot), we save our view, and restore it once its done, with winrestview.

    @@ -65,13 +46,15 @@ s/\s\+$//gc " find and (confirm) replace trailing blanks winrestview(view) " restore our original view!

    It might seem a little overkill in the above example, just use `` (double backticks) instead, but it comes in handy when you run your file through heavier filtering.

    - -
    - Hi. Subscribe + Hi. +

    I'm Akshay, I go by nerd or nerdypepper on the internet.

    I am a compsci undergrad, Rust programmer and an enthusiastic Vimmer. diff --git a/docs/posts/my_setup/index.html b/docs/posts/my_setup/index.html index aaad548..996a459 100644 --- a/docs/posts/my_setup/index.html +++ b/docs/posts/my_setup/index.html @@ -2,6 +2,7 @@ + @@ -37,39 +38,21 @@ My Setup

    - - - - - - - my_setup - - - - -

    Decided to do one of these because everyone does one of these.

    +

    Decided to do one of these because everyone does one of these.

    My entire setup is managed with GNU stow, making it easier to replicate on fresh installations. You can find my configuration files on GitHub.

    I run Void Linux (glibc) on my HP Envy 13" (2018). To keep things simple, I run a raw X session with 2bwm as my window manager, along with dunst (notification daemon) and Sam’s compton (compositor) fork.

    I am a fan of GNU tools, so I use bash as my shell, and coreutils to manage files, archives, strings, paths etc. I edit files with vim, chat with weechat, listen to music with cmus, monitor processes with htop, manage sessions with tmux, read pdfs in zathura. I rarely ever leave the comfort of my terminal emulator, urxvt.

    Most of my academic typesetting is done with TeX, and compiled with xelatex. Other fun documents are made with GIMP :).

    - -
    - Hi. Subscribe + Hi. +

    I'm Akshay, I go by nerd or nerdypepper on the internet.

    I am a compsci undergrad, Rust programmer and an enthusiastic Vimmer. diff --git a/docs/posts/onivim_sucks/index.html b/docs/posts/onivim_sucks/index.html index 9635c8c..ded6fd9 100644 --- a/docs/posts/onivim_sucks/index.html +++ b/docs/posts/onivim_sucks/index.html @@ -2,6 +2,7 @@ + @@ -37,38 +38,20 @@ Onivim Sucks

    - - - - - - - onivim_sucks - - - - -

    Onivim is a ‘modern modal editor’, combining fancy interface and language features with vim-style modal editing. What’s wrong you ask?

    +

    Onivim is a ‘modern modal editor’, combining fancy interface and language features with vim-style modal editing. What’s wrong you ask?

    Apart from buggy syntax highlighting, broken scrolling and others, Onivim is proprietary software. It is licensed under a commercial end user agreement license, which prohibits redistribution in both object code and source code formats.

    Onivim’s core editor logic (bits that belong to vim), have been separated from the interface, into libvim. libvim is licensed under MIT, which means, this ‘extension’ of vim is perfectly in adherence to vim’s license text! Outrun Labs are exploiting this loophole (distributing vim as a library) to commercialize Onivim.

    Onivim’s source code is available on GitHub. They do mention that the source code trickles down to the oni2-mit repository, which (not yet) contains MIT-licensed code, 18 months after each commit to the original repository.

    Want to contribute to Onivim? Don’t. They make a profit out of your contributions. Currently, Onivim is priced at $19.99, ‘pre-alpha’ pricing which is 80% off the final price! If you are on the lookout for an editor, I would suggest using Vim, charity ware that actually works, and costs $100 lesser.

    - -
    - Hi. Subscribe + Hi. +

    I'm Akshay, I go by nerd or nerdypepper on the internet.

    I am a compsci undergrad, Rust programmer and an enthusiastic Vimmer. diff --git a/docs/posts/pixel_art_in_GIMP/index.html b/docs/posts/pixel_art_in_GIMP/index.html index 7bd1eed..e6661b2 100644 --- a/docs/posts/pixel_art_in_GIMP/index.html +++ b/docs/posts/pixel_art_in_GIMP/index.html @@ -2,6 +2,7 @@ + @@ -37,27 +38,7 @@ Pixel Art In GIMP

    - - - - - - - pixel_art_in_GIMP - - - - -

    I’ve always been an admirer of pixel art, because of it’s simplicity and it’s resemblance to bitmap font design. Recently, I decided to take the dive and make some art of my own.

    +

    I’ve always been an admirer of pixel art, because of it’s simplicity and it’s resemblance to bitmap font design. Recently, I decided to take the dive and make some art of my own.

    I used GIMP because I am fairly familiar with it. Aseprite seems to be the editor of choice for animated pixel art though.

    Setting up the canvas

    Picking a canvas size is daunting. Too small, and you won’t be able to fit in enough detail to make a legible piece. Too big and you’ve got too many pixels to work with!

    @@ -106,13 +87,15 @@

    Hold on, why is it so tiny? Well, that’s because our canvas was 100x100, head over to Image > Scale Image, set Quality > Interpolation to None and scale it up to 700x700, et voilà!

    - -
    - Hi. Subscribe + Hi. +

    I'm Akshay, I go by nerd or nerdypepper on the internet.

    I am a compsci undergrad, Rust programmer and an enthusiastic Vimmer. diff --git a/docs/posts/rapid_refactoring_with_vim/index.html b/docs/posts/rapid_refactoring_with_vim/index.html index 36d06fc..c5bc188 100644 --- a/docs/posts/rapid_refactoring_with_vim/index.html +++ b/docs/posts/rapid_refactoring_with_vim/index.html @@ -2,6 +2,7 @@ + @@ -37,71 +38,7 @@ Rapid Refactoring With Vim

    - - - - - - - rapid_refactoring_with_vim - - - - -

    Last weekend, I was tasked with refactoring the 96 unit tests on ruma-events to use strictly typed json objects using serde_json::json! instead of raw strings. It was rather painless thanks to vim :)

    +

    Last weekend, I was tasked with refactoring the 96 unit tests on ruma-events to use strictly typed json objects using serde_json::json! instead of raw strings. It was rather painless thanks to vim :)

    Here’s a small sample of what had to be done (note the lines prefixed with the arrow):

    use serde_json::{from_str};
       
    @@ -190,13 +127,15 @@ BUFFER:    json!( ... );
  • :help mark-motions↩︎

  • - -
    - Hi. Subscribe + Hi. +

    I'm Akshay, I go by nerd or nerdypepper on the internet.

    I am a compsci undergrad, Rust programmer and an enthusiastic Vimmer. diff --git a/docs/posts/static_sites_with_bash/index.html b/docs/posts/static_sites_with_bash/index.html index fff53dc..67eaf12 100644 --- a/docs/posts/static_sites_with_bash/index.html +++ b/docs/posts/static_sites_with_bash/index.html @@ -2,6 +2,7 @@ + @@ -37,71 +38,7 @@ Static Sites With Bash

    - - - - - - - static_sites_with_bash - - - - -

    After going through a bunch of static site generators (pelican, hugo, vite), I decided to roll my own. If you are more of the ‘show me the code’ kinda guy, here you go.

    +

    After going through a bunch of static site generators (pelican, hugo, vite), I decided to roll my own. If you are more of the ‘show me the code’ kinda guy, here you go.

    Text formatting

    I chose to write in markdown, and convert to html with lowdown.

    Directory structure

    @@ -128,13 +65,15 @@ echo "https://u.peppe.rs/$id"

    Templating

    generate.sh brings the above bits and pieces together (with some extra cruft to avoid javascript). It uses sed to produce nice titles from the file names (removes underscores, title-case), and date(1) to add the date to each post listing!

    - -
    - Hi. Subscribe + Hi. +

    I'm Akshay, I go by nerd or nerdypepper on the internet.

    I am a compsci undergrad, Rust programmer and an enthusiastic Vimmer. diff --git a/docs/posts/termux_tandem/index.html b/docs/posts/termux_tandem/index.html index a2aba29..b4818cf 100644 --- a/docs/posts/termux_tandem/index.html +++ b/docs/posts/termux_tandem/index.html @@ -2,6 +2,7 @@ + @@ -37,27 +38,7 @@ Termux Tandem

    - - - - - - - termux_tandem - - - - -

    I learnt about termux from a friend on IRC recently. It looked super gimmicky to me at first, but it eventually proved to be useful. Here’s what I use it for:

    +

    I learnt about termux from a friend on IRC recently. It looked super gimmicky to me at first, but it eventually proved to be useful. Here’s what I use it for:

    rsync

    Ever since I degoogled my android device, syncing files between my phone and my PC has always been a pain. I’m looking at you MTP. But, with termux and sshd all set up, it’s as simple as:

    $ arp
    @@ -75,13 +56,15 @@ mtZabXG.jpg        p8d5c584f2841.jpg  vjUxGjq.jpg

    cmus

    Alright, I don’t really listen to music via cmus, but I did use it a couple times when my default music player was acting up. cmus is a viable option:

    - -
    - Hi. Subscribe + Hi. +

    I'm Akshay, I go by nerd or nerdypepper on the internet.

    I am a compsci undergrad, Rust programmer and an enthusiastic Vimmer. -- cgit v1.2.3