Skip to content

Instantly share code, notes, and snippets.

View hack.el
(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 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)
View tab.vim
vmap <TAB> <esc>mbgv=`bgv
nmap <TAB> mb==`b
imap <TAB> <C-R>=HandleITab()<cr>
func! HandleITab()
if pumvisible()
return "\<c-n>"
return "\<ESC>==i"
View coc-settings.json
"languageserver": {
"golang": {
"command": "gopls",
"rootPatterns": ["go.mod"],
"filetypes": ["go"]
"dockerfile": {
"command": "docker-langserver",
View git.vim
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
View plugins.vim
if &compatible
set nocompatible " Be iMproved
call plug#begin('~/nvim/plugged')
" syntax
Plug 'othree/yajs.vim'
Plug 'othree/html5.vim'
Plug 'vim-scripts/nginx.vim'
mbriggs / fixture.rb
Created Dec 12, 2018
Take 2 on handler fixtures
View fixture.rb
require_relative "../../automated_init"
context "Handle Commands" do
context "Added" do
context "Writes Added event" do
id =
account = Controls::Account::New.example
add = Controls::Commands::Add.example
time = Controls::Time::Processed.example
View event_written.rb
module Fixtures
class EventWritten
include TestBench::Fixture
attr_accessor :stream_name
attr_accessor :values
attr_accessor :command
attr_accessor :expected_version
attr_accessor :command_attributes
View redis.ex
defmodule Autobot.Redis do
import Exredis
def start_link do
Agent.start_link(fn ->
{:ok, client} = Exredis.start_link
end, name: __MODULE__)
mbriggs / anonymous-gist.js
Created Jan 17, 2016
production webpack config
View anonymous-gist.js
var webpack = require('webpack');
var path = require('path');
var ManifestPlugin = require('webpack-manifest-plugin')
function root(fragment){
return path.join(__dirname, "client", fragment);
module.exports = {
devtool: 'source-map',
You can’t perform that action at this time.