git config --global alias.fmain '!git checkout -b master && git branch -D main'git fmain| Host sangdth-github | |
| HostName github.com | |
| User sangdth | |
| PreferredAuthentications publickey | |
| IdentityFile /path/to/.ssh/id_ed25519_github | |
| UseKeychain yes | |
| AddKeysToAgent yes |
master.master. Enjoy productivity!CODE-123-Descriptive-task-name-here| - Select the text. | |
| - Press `S` then things you want, like `]` or `)` | |
| - Profit! | |
| https://github.com/tpope/vim-surround/issues/220 |
In my company we use Jira, and our branch's name follows this convention CODE-123-Something-descriptive-after And I want to have that code automatically whenever I commit with message. So, you can exclude the grep part if you want to get the whole branch name
Copy the script below, name it prepare-commit-msg and put it under git/hooks folder. Make sure you make it executable by chmod 755 your/path/prepare-commit-msg
#!/bin/bash
if [ -z "$BRANCHES_TO_SKIP" ]; then
jira issue list..zshrc (I'm not sure about .bashrc, did not test it.To select a block, use ctr-v.
x or d.shift + i, (normal i doesn't work.)
Esc to see the magic.Setting in your .vimrc:
" Fold by syntax because there are indent is not always correct
set foldmethod=syntax
" Beware, there are lot of instructions tell you use `set nofoldenable` to avoid folding at start
" but then when you start using `z c`, it will start the fold method and automatic fold ALL the code.
" Using this with `foldlevel` give the same effect but does not have that problem.
set foldenable
If you are using type-graphql in your project, and trying to deploy to Google App Engine,
you probably will encounter the read-only file system error:
Error: EROFS: read-only file system, open './src/schema.gql'
This is because Google App Engine has quite different way to handle file system: https://cloud.google.com/appengine/docs/standard/python3/using-temp-files
In my Nestjs app, I'm using @nestjs/graphql module wrapper, in which automatic generate schema.gql file
at /src folder by default, and Google App Engine allows only /tmp folder.