Skip to content

Instantly share code, notes, and snippets.

View matthewsecrist's full-sized avatar

Matthew Secrist matthewsecrist

View GitHub Profile
@matthewsecrist
matthewsecrist / init.lua
Last active April 5, 2022 13:53
Minimal Reproduction of neo-tree issue
-- Make sure you have the eslint lsp set up https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#eslint
-- Or set up another LSP at the bottom
-- Open a project that a linter works on normally and hovering over an error with neo-tree open will not display a popup
-- If you close neo-tree with `:Neotree close`, the popup will display properly
local fn = vim.fn
local options = {
backup = false,
clipboard = "unnamedplus",
@matthewsecrist
matthewsecrist / learn lists.erl
Created July 1, 2017 20:29
FP in Erlang Week 2
-module (learnlists).
-export ([product/1, product2/1]).
% recursive
product([]) -> 1;
product([X|Xs]) -> X * product(Xs).
% tail recursive
product2(List) -> product2(List, 1).
product2([], P) -> P;
@matthewsecrist
matthewsecrist / shapes.erl
Last active July 2, 2017 04:19
FP in Erlang Assignment W1
-module (shapes).
-export ([perimeter/1, area/1, enclose/1]).
% Shapes is a module that calculates perimeter, area, and smallest
% bounding box given properties of different shapes.
% We assume on each of these that the shape will be stored
% as {type, measurements}. For example, a circle with a radius
% of 2 would be {circle, 2}, a rectangle with height of 4 and
% width of 10 would be {rectangle, 4, 10}, and a triangle
% can either be stored with {triangle, base, height} or
@matthewsecrist
matthewsecrist / first.erl
Last active June 27, 2017 18:55
FP in Erlang Week 1
-module(first).
% First module, based on instructions
% Author: Matthew Secrist
-export([double/1, mult/2, area/3, square/1, treble/1]).
% Multiply two numbers.
mult(X, Y) ->
X*Y.