Skip to content

Instantly share code, notes, and snippets.

Commands

Insert

  • 'i': Insert text before cursor
  • 'I': Insert at beginning of line
  • 'a': Append text after cursor
  • 'A': Append thext at end of line
  • 'o': Add new line after current
  • 'O': Add new line before current

Rails React GraphQL Typescript Apollo [^1] [^2] [^3] [^4] [^5]

Base installation

# Create a new rails project
$ rails new my_app -j esbuild -c tailwind
$ cd my_app

# Add Sorbet
$ bundle add sorbet-static-and-runtime
// Compiler
//
static void endScope() {
current->scopeDepth--;
while (current->localCount > 0 &&
current->locals[current->localCount - 1].depth >
current->scopeDepth) {
if (current->locals[current->localCount - 1].isCaptured) {
program : statement_seq
statement_seq : statement {sep statement}
statement : var_decl
| class_decl
| method_decl
| "if" expression opt_then statement_seq ["else" statement_seq] "end"
| "while" expression opt_do statement_seq "end"
| "return" expression

Basic Neovim Configuration from scratch

The directory structure

nvim/
  after/
  | ftplugin/
  |   lua.lua
 | rb.lua