Skip to content

Instantly share code, notes, and snippets.

@dlants
dlants / generic-deriving.purs
Last active April 19, 2021 15:54
Generic deriving with purescript
-- an example of how to derive a show instance for a Maybe type
-- not totally sure why `derive instance showMyMaybe :: (Show a) => Show (MyMaybe a)` errors with...
-- error: CannotDerive :
-- Cannot derive a type class instance for Data.Show.Show (MyMaybe a) since instances of this type class are not derivable.
module Main where
import Prelude
import Control.Monad.Eff (Eff)
import Control.Monad.Eff.Console (CONSOLE, log)
@dlants
dlants / Dockerfile
Created March 9, 2023 01:02
yarn in docker build dockerfile w/ private github repo & cache mount
# for yarn berry
FROM --platform=linux/amd64 node:14.21-bullseye
# install node_module packages needed to build
WORKDIR /app
COPY .yarnrc.yml .
COPY .yarn/releases/yarn-3.4.1.cjs .yarn/releases/yarn-3.4.1.cjs
COPY package.json .
COPY yarn.lock .
@dlants
dlants / neovim-lsp-config-tsserver-debug.lua
Created April 14, 2023 19:27
How to debug neovim lsp-config's interaction w/ tsserver / typescript-language-server
require("lspconfig").tsserver.setup {
cmd = {"typescript-language-server", "--stdio", "--log-level", "4"},
init_options = {
hostInfo = "neovim",
maxTsServerMemory = 4096,
tsserver = {
logDirectory = <path>,
logVerbosity = "verbose"
}
},