Skip to content

Instantly share code, notes, and snippets.

Avatar
⚜️
Docendo discimus

Sang Dang sangdth

⚜️
Docendo discimus
View GitHub Profile
@sangdth
sangdth / v-block.md
Last active Nov 10, 2020
Delete/Insert in V-Block
View v-block.md

To select a block, use ctr-v.

  • To delete, use x or d.
  • To insert, use shift + i, (normal i doesn't work.)
    • then type the thing you need.
    • press Esc to see the magic.
@sangdth
sangdth / vim-fold.md
Last active Nov 5, 2020
Setup folding for vim
View vim-fold.md

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
@sangdth
sangdth / nextjs-google-app-engine.md
Last active Mar 17, 2021
Google App Engine problem with read-only file system error
View nextjs-google-app-engine.md

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.