Skip to content

Instantly share code, notes, and snippets.

@OliverJAsh
OliverJAsh / README.md
Last active September 14, 2018 06:45
FP list combinators demo with fp-ts
tsc && node main.js
@busypeoples
busypeoples / PhantomTypeReasonML.md
Last active February 6, 2024 21:29
Phantom types in ReasonML

Phantom types in ReasonML

Introduction

"A phantom type is a parametrised type whose parameters do not all appear on the right-hand side of its definition..." Haskell Wiki, PhantomType

The following write-up is intended as an introduction into using phantom types in ReasonML.

Taking a look at the above definition from the Haskell wiki, it states that phantom types are parametrised types where not all parameters appear on the right-hand side. Let's try to see if we can implement a similar example as in said wiki.

@seiyria
seiyria / README.md
Last active January 8, 2018 04:29
Code Quality and You

update: this post has been moved to my blog

Welcome! Today I'd like to talk about another subject which can't be emphasized enough: Code Quality. This entails a lot of tools and patterns that ultimately come together to make your game more solid and programmer friendly. Even if you're working alone on a project, these tools can save you some precious debugging time by pointing out simple errors, if not more complex ones. I'll be using my current project, c as an example where possible.

A few notes before we get started:

  • Some of the following tools are specific to the JavaScript ecosystem.
  • Some of the following tools are only free for open source projects, so bear in mind that you might be missing out on the awesome!

Style Checking

Some of the easiest tools you can set up for your project are JSHint and JSCS. These tools provide basic st

@rsperberg
rsperberg / essential-javascript-links.md
Last active October 5, 2022 17:10 — forked from ericelliott/essential-javascript-links.md
A fork that adds descriptions to Eric Elliott’s 142 essential JS links
hush :: Either e a -> Maybe a
hush = either (const Nothing) Just
toId :: JObject -> Maybe Number
toId o = fromNumber <|> fromString
where
fromNumber = hush $ o .? "id"
fromString = do
s <- hush $ o .? "id"
mfilter (isNan >>> not) Just (readFloat s)
@staltz
staltz / introrx.md
Last active April 19, 2024 09:27
The introduction to Reactive Programming you've been missing
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active April 18, 2024 10:01
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@jxson
jxson / README.md
Created February 10, 2012 00:18
README.md template

Synopsis

At the top of the file there should be a short introduction and/ or overview that explains what the project is. This description should match descriptions added for package managers (Gemspec, package.json, etc.)

Code Example

Show what the library does as concisely as possible, developers should be able to figure out how your project solves their problem by looking at the code example. Make sure the API you are showing off is obvious, and that your code is short and concise.

Motivation