Skip to content

Instantly share code, notes, and snippets.

View mbriggs's full-sized avatar

Matt Briggs mbriggs

View GitHub Profile
# typed: true
# DO NOT EDIT MANUALLY
# This is an autogenerated file for types exported from the `data_model` gem.
# Please instead update this file by running `bin/tapioca gem data_model`.
# source://data_model//lib/data_model.rb#15
module DataModel
extend ::DataModel
@mbriggs
mbriggs / gemstash.service
Created September 29, 2020 22:16
set up local gemstash in linux
[Unit]
Description=Local Gem Cache
After=network.target
[Service]
Type=simple
WorkingDirectory=/home/mbriggs
ExecStart=/home/mbriggs/.gem/ruby/bin/gemstash start --no-daemonize
[Install]
@mbriggs
mbriggs / fedora.md
Last active November 4, 2021 19:41
Fedora setup script
# this is similar to lisp, implicit return is super natural
def this_is_expressive(arg)
if arg
query_one(arg)
else
query_two(arg)
end
end
(defun lsp--on-diagnostics (workspace params)
"Callback for textDocument/publishDiagnostics.
interface PublishDiagnosticsParams {
uri: string;
diagnostics: Diagnostic[];
}
PARAMS contains the diagnostics data.
WORKSPACE is the workspace that contains the diagnostics."
(let* ((file (lsp--uri-to-path (gethash "uri" params)))
(diagnostics (seq-map #'lsp--make-diag (gethash "diagnostics" params)))

Arch

Arch Install Script

partition drive

  • view drives: fdisk -l
  • gdisk <drive>
  • d (delete) all
  • efi: n, <default> - +512M, EFI
  • root: n, <default> - -0, Linux Filesystem
  • w (write and save)
vmap <TAB> <esc>mbgv=`bgv
nmap <TAB> mb==`b
imap <TAB> <C-R>=HandleITab()<cr>
func! HandleITab()
if pumvisible()
return "\<c-n>"
else
return "\<ESC>==i"
endif
{
"languageserver": {
"golang": {
"command": "gopls",
"rootPatterns": ["go.mod"],
"filetypes": ["go"]
},
"dockerfile": {
"command": "docker-langserver",
@mbriggs
mbriggs / git.vim
Last active November 5, 2019 02:17
nmap <leader>gg :Gstatus<cr>
nmap <leader>gb :Gblame<cr>
nmap <leader>gr :Grebase<cr>
nmap <leader>gp :Gpush<cr>
nmap <leader>gu :Gpull<cr>
nmap <leader>gw :Gbrowse<cr>
vmap <leader>gw :Gbrowse<cr>
nmap <leader>gb :Merginal<cr>
" gist
if &compatible
set nocompatible " Be iMproved
endif
call plug#begin('~/nvim/plugged')
" syntax
Plug 'othree/yajs.vim'
Plug 'othree/html5.vim'
Plug 'vim-scripts/nginx.vim'