Update home page and asciinema poster
Also remove trailing whitespace in all files
This commit is contained in:
		@@ -1,9 +1,11 @@
 | 
			
		||||
---
 | 
			
		||||
title: "Home"
 | 
			
		||||
date: 2023-05-31T09:14:56-04:00
 | 
			
		||||
draft: false
 | 
			
		||||
---
 | 
			
		||||
 | 
			
		||||
Balki's Blog
 | 
			
		||||
============
 | 
			
		||||
Just another dev blog.
 | 
			
		||||
 | 
			
		||||
* git: https://gitea.balki.me/balki
 | 
			
		||||
* github: https://github.com/balki
 | 
			
		||||
* Fediverse: https://social.balki.me/@balki `@balki@balki.me`
 | 
			
		||||
* RSS: https://blog.balki.me/index.xml
 | 
			
		||||
 
 | 
			
		||||
@@ -45,7 +45,7 @@ set base url
 | 
			
		||||
## Dumb crawlers problem
 | 
			
		||||
 | 
			
		||||
My gitea [instance][3] is public and had all mirror repos public as well. This
 | 
			
		||||
caused a huge network traffic from bots. 
 | 
			
		||||
caused a huge network traffic from bots.
 | 
			
		||||
 | 
			
		||||
I created an [organization][4] without public visibility and made it own all
 | 
			
		||||
the mirror repos.
 | 
			
		||||
@@ -55,7 +55,7 @@ the mirror repos.
 | 
			
		||||
yq (https://github.com/mikefarah/yq/) version v4.44.1
 | 
			
		||||
 | 
			
		||||
❯ curl -V | head -c 11
 | 
			
		||||
curl 8.8.0 
 | 
			
		||||
curl 8.8.0
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
## API token
 | 
			
		||||
@@ -141,7 +141,7 @@ Fix the issue url setting in first repo as shown [here][7].
 | 
			
		||||
Get the json representataion.
 | 
			
		||||
 | 
			
		||||
```bash
 | 
			
		||||
yq '.data[] | .external_tracker ' mirror-repos.json | head 
 | 
			
		||||
yq '.data[] | .external_tracker ' mirror-repos.json | head
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
Sample output
 | 
			
		||||
@@ -159,7 +159,7 @@ Now loop throug all repos and update. Making sure only add to github repos and
 | 
			
		||||
they are not already updated
 | 
			
		||||
 | 
			
		||||
```bash
 | 
			
		||||
yq -r '.data[] 
 | 
			
		||||
yq -r '.data[]
 | 
			
		||||
| select(.original_url == "*github*" and has("internal_tracker") )
 | 
			
		||||
| "\(.full_name) \(.original_url)"' mirror-repos.json | while read -r repo og; do
 | 
			
		||||
	echo "Repo is $repo and github origin url is $og"
 | 
			
		||||
 
 | 
			
		||||
@@ -15,7 +15,7 @@ categories:
 | 
			
		||||
Sometimes, fully automating a task is not worth the effort. So I end up running
 | 
			
		||||
a set of commands usually from a cheat sheet text file slightly modifying the
 | 
			
		||||
arguments each time. I used the below in vim to send line under cursor to vim's
 | 
			
		||||
`:terminal` open in a split 
 | 
			
		||||
`:terminal` open in a split
 | 
			
		||||
```vim
 | 
			
		||||
:call term_list()[0]->term_sendkeys(getline('.') .. "\<CR>")
 | 
			
		||||
```
 | 
			
		||||
@@ -101,7 +101,7 @@ autocmd BufNewFile,BufRead cheat.sh nnoremap <buffer> <silent><2-LeftMouse> :Sen
 | 
			
		||||
 | 
			
		||||
### Demo
 | 
			
		||||
 | 
			
		||||
{{< asciinema key="vimstt" >}}
 | 
			
		||||
{{< asciinema key="vimstt" poster="npt:0:23" startAt="0:18" >}}
 | 
			
		||||
 | 
			
		||||
### Using
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user