Skip to main content

Posts

2024

Sleep Training for the Toddler

·1062 words·5 mins
Prepare the little one # B-E-S-T # B - Building confidence: talk about “good” things about sleep. 可以表扬他们睡 的很好,或者跟他们说自己睡的好,变强壮了,etc. 产生正面影响 E - expectations: 明确表达你对他们的期望,希望他们做什么。 “I’m going to give you lots of kisses, and you’re going to lay down on your bed, close your eyes and have a good sleep. "

Neovim Workflow

·2196 words·11 mins
Neovim comes with lots of useful plugins, and built-in features, compared to Vim. It’s lua configs is also much more readable and powerful compared to Vim. Here’s some useful tips for coding in Nvim. Searching(files, text, diagnostics, help) # Similar to techniques mentioned in search-in-vim, we can search for text inside files, or looking for files by filtering filenames. In Neovim, we use fzf-lua which is very similar to fzf.vim.

2021

Search in Vim

·841 words·4 mins
搜索是开发中最常用也是最重要的操作之一. Vim提供了非常高效和方便的搜索功能. 这篇笔记记录了一些常用的搜索命令,例子以及自定义的key mapping 使用ripgrep搜索文件内容 (:Rg2 or ,gg, ,gw/,gW ) 使用git-grep搜索git branch/commit, 以及使用fzf显示git grep的结果 (:Ggrep) 使用fzf/coc list搜索当前文件/buffers中的lines, 实现快速定位/跳转 使用quickfix lists快速访问上述搜索的结果, 以及利用:cdo/:cfdo等命令对结果进行批量操作. General searching inside files # Ripgrep with fzf # fzf.vim provides a :Rg command to call ripgrep and search the current directory. However, a more useful variant is built to support specify path and pass other parameters to ripgrep, I used this snippet and mapped this to shortcut <Leader>gg.

Vim Tips

·714 words·4 mins
Search and work with many files # Searching # For searching words / symbols within files, see search-in-vim To quick find and open files by filename, I use fzf and coc-list, and the follwing key bindings. General search To open files in the working directory ( not current file/buffer dir), use :Files or ,lc ( list current)

Keyboard Pcb Design

·1276 words·6 mins
Feature highlights # Initially, I wanted to build a split board. However, since I already have a split (crkbd), making a Arteus/Reviuge-like board makes more sense. The design is using aggressive stagger (same column stagger like my split design), and 15 degree angle of columns. Other features: OLED status display RGB underglow Audio Encoder Design considerations for STM32 # I’ll be using F411 due to lack of F072 stock.

Pawn Structure

·760 words·4 mins
Knowning which pawn structure is “weak” is not enough: one need to know how to attack them, or making use of the weaknesses. In general, the formular to attack weak pawns(isolated, backward) is to control the square in front of the pawn so it can’t advance. (the squares are usually weak since no pawn can defend it). Then pile up on the weakness. Every structure has its pros and cons.

The Center, Territory and Space

·957 words·5 mins
Amateurs often have no clue of how to use center/space advantage, instead keen on forcing continuations, and unjustified attacks. Rules of center # Rule 1. Full pawn center gives control and space. # A full pawn center gives its owner territory and control over key central squares.

5. End Game Strategy

Lichess study of this chapter # Embedded chessboard from lichess.org The sudden attack from a different side # Similar to general theory, the idea is to first attacking on one side, then, with greater mobility of the pieces, quickly transfer attack to the other side and break through, before the opponent can respond.

4. General Theory

·151 words·1 min
Lichess study of this chapter # Embedded chessboard from lichess.org The initiative # White has the move, which means initiative. He tries to first control the center, or obtain some positional advantage, so it’s possible for him to keep on harrassing the enemy. He only relinquishes the initiative when he gets for some material advantage in return.

1. First Principles: Endings, Middle-game and Openings

·301 words·2 mins
Single pawn # The King should be in front of his Pawn, with at least one intervening square. Advance the King as far as possible with the safety of the pawn, and never to advance the Pawn until it is essential to its own safety. Other Pawn Endings # ℹ️ Don't push pawns prematurely don’t push the pawn prematurely, which may send it to the opponent’s King, and you can’t protect it. In this position, if white pushes the f-pawn, the game draws because ... Kf7. White is better to move his King and force the Black king to the corner, with help from g6 push, controlling the f7 square .