Skip to content

Instantly share code, notes, and snippets.

@RyoJerryYu
RyoJerryYu / README.md
Last active April 17, 2024 12:50
My VSCode Setting File For Vim Mode

concept

  1. editor moving and splitting
    1. focus around ctrl + shift + hjkl (and change ctrl to command in MacOS)
    2. move editor around ctrl + shift + alt + hjkl (and change ctrl to command in MacOS)
  2. quick moving and slow moving
    1. quick: shift + jk = 10j 10k , shift + hl = ^ $
    2. slow: ctrl + jk = gj gk , ctrl + hl = g^ g$ (used for one long line displayed as multiple line, usually in markdown)
  3. tabbing: tab shift + tab = >> <<
  4. goTos: ga = editor.action.goToImplementation (useful with the default gd gh command)
package verify
import (
"testing"
"github.com/ethereum/go-ethereum/accounts"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/hexutil"
"github.com/ethereum/go-ethereum/crypto"
"github.com/stretchr/testify/assert"
@RyoJerryYu
RyoJerryYu / README.md
Last active August 23, 2022 04:51
My config files under `~/.config/` for Python that exactly match yapf styles for Google open source projects.

My config files under ~/.config/ for Python that exactly match yapf styles for Google open source projects.

The yapf config file style is under ~/.config/yapf/

You could modify these files, or use it in your project instead of use it globally.

Pylint configuration file paths 1

Pylint will search it's configuration in the following manner:

Footnotes

  1. Where does Pylint look for configuration files?.

@RyoJerryYu
RyoJerryYu / settings.json
Last active July 31, 2022 10:58
My VSCode setting json for python.
{
"[python]": {
"gitlens.codeLens.symbolScopes": [
"!Module"
],
"editor.insertSpaces": true,
"editor.tabSize": 2,
"editor.wordBasedSuggestions": false,
"editor.formatOnSave": true,
"editor.defaultFormatter": "ms-python.python",
@RyoJerryYu
RyoJerryYu / config
Last active July 3, 2023 07:05
Some Useful Git Alias
[alias]
br = branch
ch = checkout
cr = cherry-pick
tmp = "!git add . && git commit -m 'temp'"
rst = reset head~
masterhead = "!git rev-parse --abbrev-ref origin/HEAD"
prevhead = "!git rev-parse --symbolic-full-name --abbrev-ref=loose @{-1}"
up = "!git fetch origin && git rebase $(git masterhead)"
rebi = "!git rebase -i $(git masterhead)"
@RyoJerryYu
RyoJerryYu / AsyncWorkflow.java
Last active June 12, 2021 04:46
A class that help for organize ordered works that full of callbacks.
/**
* A class that help for organizing async works.
*
* @author RyoJerryYu
* @date 2021/6/11 9:14
*/
public class AsyncWorkflow {
Queue<AsyncWork> queue;
public enum State {PREPARING, EXECUTING, FINISHED}