Skip to content

Instantly share code, notes, and snippets.

View destinio's full-sized avatar
☯️
Present

Destin Lee destinio

☯️
Present
View GitHub Profile
@destinio
destinio / alpha.code-snippets
Last active March 28, 2022 21:36
Alpha Snippets
{
// "_ a": { "prefix": "_ a", "body": [""], "description": "a" },
// "_ b": { "prefix": "_ b", "body": [""], "description": "b" },
// "_ c": { "prefix": "_ c", "body": [""], "description": "c" },
// "_ d": { "prefix": "_ d", "body": [""], "description": "d" },
// "_ e": { "prefix": "_ e", "body": [""], "description": "e" },
// "_ f": { "prefix": "_ f", "body": [""], "description": "f" },
// "_ g": { "prefix": "_ g", "body": [""], "description": "g" },
// "_ h": { "prefix": "_ h", "body": [""], "description": "h" },
// "_ i": { "prefix": "_ i", "body": [""], "description": "i" },
alias ll='ls -al'
alias ld='ls -alt'
alias c='code .'
alias ll='ls -al'
alias ld='ls -alt'
alias c='code .'
alias cd..='cd ..'
alias ..='cd ..'
alias ...='cd ../..'
alias cd!='cd !$'
@destinio
destinio / main.go
Created August 12, 2022 14:21
Basic Golang webserver
package main
import (
"github.com/gin-gonic/gin"
)
func main() {
router := gin.Default()
router.GET("/", func(c *gin.Context) {
@destinio
destinio / App.tsx
Last active September 29, 2022 14:28
Very Basic all in one TODO list
import { BaseSyntheticEvent, useEffect, useState } from 'react'
interface Todo {
userId: number
id: number
title: string
completed: boolean
}
function Home() {
@destinio
destinio / v_commands.md
Last active February 1, 2023 17:39
Vim commands to remember

Normal

Command Description
<C-t> Open current window in new tab
<C-a> <C-x> inc and dec next number on current line

Insert

Command Description
{registar} Paste from register in insert mode
@destinio
destinio / api_nvim.txt
Last active February 12, 2023 20:08
vim.api.nvim_*
The following is an easy to read list of https://neovim.io/doc/user/api.html#api-global
_buf_redraw_range
_buf_stats
_get_hl_defs
_get_lib_dir
_get_runtime
_id
_id_array
_id_dictionary
@destinio
destinio / script-tips.lua
Created February 12, 2023 18:56
Basic nvim-lua functions and things
function Pr(...)
print(vim.inspect(...))
end
vim.api.nvim_create_user_command("LRun", function()
vim.cmd("write | so %")
end, {})
vim.keymap.set("n", "lr", ":LRun<cr>", { silent = true })
@destinio
destinio / notes.lua
Created February 13, 2023 20:00
Open notes in floating window
local api = vim.api
local h = api.nvim_list_uis()[1].height
local w = api.nvim_list_uis()[1].width
local width = math.floor(api.nvim_win_get_width(0) / 2)
local height = math.floor(api.nvim_win_get_height(0) / 2)
local buf = api.nvim_create_buf(false, true)
api.nvim_open_win(buf, true, {
relative = "editor",
@destinio
destinio / README.md
Last active March 20, 2023 19:32
simple user input