Skip to content

Instantly share code, notes, and snippets.

@mdevino
mdevino / config.lua
Last active October 21, 2024 17:22
My LunarVim's config.lua
-- Read the docs: https://www.lunarvim.org/docs/configuration
-- Example configs: https://github.com/LunarVim/starter.lvim
-- Video Tutorials: https://www.youtube.com/watch?v=sFA9kX-Ud_c&list=PLhoH5vyxr6QqGu0i7tt_XoVK9v-KvZ3m6
-- Forum: https://www.reddit.com/r/lunarvim/
-- Discord: https://discord.com/invite/Xb9B4Ny
---------------------- My stuff ----------------------
vim.opt.timeoutlen = 250
vim.opt.relativenumber = true
-- lvim.lsp.installer.setup.automatic_installation = true
@mdevino
mdevino / create_gpg_key.md
Last active September 14, 2024 20:59
Create GPG key

Create key on Linux

gpg --full-generate-key
gpg --list-secret-keys --keyid-format=long
gpg --armor --export <sec_key>
# Run this before if the command below fails: export GPG_TTY=$(tty)
git config --global user.signingkey <sec_key>

/jsconfig.json

{
    "include": [
        "./src/**/*"
    ],
    "compilerOptions": {
        "baseUrl": ".",
 "paths": {
@mdevino
mdevino / fastapi_custom_response_no_autodoc.py
Created March 24, 2022 11:48
FastAPI's custom response (without auto documentation)
from fastapi import FastAPI
from pydantic import BaseModel, Field
Login = Field(
...,
alias='login',
description='Login',
max_length=10
)
Name = Field(
@mdevino
mdevino / rust101.md
Last active March 22, 2022 02:12
Rust 101

Rust 101

Just basic stuff about Rust I'm learning from "the book".

  • rustc is the Rust compiler (works kinda similar to C/C++ ones), so far.
  • rustfmt formats Rust code.
  • Similar to C/C++, the first function to be run is named main.

Cargo 101

@mdevino
mdevino / arch-wsl.md
Last active May 21, 2022 22:26
Arch WSL setup
@mdevino
mdevino / GNU-screen-101.md
Last active August 3, 2022 17:13
GNU screen commands

GNU screen

Screen 101

  • All Screen commands are prefixed by "Ctrl+A"
    • Ctrl+A, ? to bring up key bindings
    • Ctrl+A, : to be able to write a screen command
    • Ctrl+A, D to detach from the session
    • Ctrl+A, K to kill a screen of the session
  • Ctrl+A, C to open a new window within session
@mdevino
mdevino / jest.config.md
Last active April 29, 2020 23:55
Jest 101
  "jest": {
    "testEnvironment": "node",
    "moduleDirectories": [
      "<rootDir>/node_modules",
      "<rootDir>/."
    ]
  },
@mdevino
mdevino / heroku101.md
Last active April 29, 2020 23:11
Heroku 101
heroku login - Log into the system
heroku config - List environment variables
heroku config <key>:<value> - Set an environment variable. Many key/value pairs may be set at once