Skip to content

Instantly share code, notes, and snippets.

Reason

I have heard a lot of complaints about lack of editor integration or flaky editor tooling in the Reason community. At my previous job we had ~3000 modules and ~80k LOC. I'll admit that we were not very vigilant with .rei files or keeping our inter module dependencies really clean so this slowed both bsb and especially reason-language-server down a lot.

In fact so much that people couldn't use reason-language-server anymore on 15" MacBook Pros.

I myself have always used a Merlin based setup since I joined the Reason eco system before reason-language-server, and in our project my setup had never failed. Therefor I went on a quest of setting up 3 of the major editors (Emacs, Vim and VSCode) and documenting how to get them working

@gcangussu
gcangussu / jest-resolver.js
Last active October 31, 2023 15:06
Custom Jest resolver to preserve symlinks. Useful for usage with Bazel. Requires `resolve` npm package.
const resolve = require('resolve');
/**
* @typedef {{
basedir: string;
browser?: boolean;
defaultResolver: (request: string, options: ResolverOptions) => string;
extensions?: readonly string[];
moduleDirectory?: readonly string[];
paths?: readonly string[];
@aparrish
aparrish / understanding-word-vectors.ipynb
Last active April 20, 2024 01:36
Understanding word vectors: A tutorial for "Reading and Writing Electronic Text," a class I teach at ITP. (Python 2.7) Code examples released under CC0 https://creativecommons.org/choose/zero/, other text released under CC BY 4.0 https://creativecommons.org/licenses/by/4.0/
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@willm
willm / docker cheat sheet
Last active August 29, 2015 14:18
docker cheat sheet
docker build -t [TAG] .
# build an image from a Dockerfile in the current directory with the tagname.
docker create --name=[NAME] [TAG]
# create a container called [NAME] built from the image [TAG]
docker start [NAME]
# start the [NAME] container
docker ps -a
# list all (running and stopped containers)
docker rm [NAME]
# delete [NAME] container
(require 'cl-lib)
(defun haskell-process-completions-at-point ()
"A company-mode-compatible complete-at-point function."
(interactive)
(destructuring-bind (start . end) (bounds-of-thing-at-point 'symbol)
(let ((completions (haskell-process-get-repl-completions (haskell-process)
(symbol-name (symbol-at-point)))))
(list start end completions))))
@jpflouret
jpflouret / README.md
Last active December 29, 2023 03:33
paste.exe

Pipe contents of windows clipboard to another command

Usage

To pipe the contents of the clipboard to another command (e.g. grep):

paste | grep pattern

To save the contents of the clipboard to a file: