Skip to content

Instantly share code, notes, and snippets.

View arecvlohe's full-sized avatar
🚫
End ASF Mascotry / Drop ICE

Adam Recvlohe arecvlohe

🚫
End ASF Mascotry / Drop ICE
View GitHub Profile
@busypeoples
busypeoples / Game.res
Created June 13, 2021 13:42
ReScript Game
type field =
| O
| X
type position = (field, field, field, field)
type box = (position, position, position, position)
type units = list<box>
@Phate6660
Phate6660 / rust recommendations and alternatives.md
Last active September 1, 2023 16:49
My growing list of Rust programs to use.
@lambda-mike
lambda-mike / kakoune_cheatsheet.md
Last active July 11, 2023 23:49
My Kakoune cheatsheet

Kakoune

set verbose mode (good for learning) :set -add global autoinfo normal

Movement

Goto

10g - go to line 10

@IanColdwater
IanColdwater / twittermute.txt
Last active April 22, 2024 17:26
Here are some terms to mute on Twitter to clean your timeline up a bit.
Mute these words in your settings here: https://twitter.com/settings/muted_keywords
ActivityTweet
generic_activity_highlights
generic_activity_momentsbreaking
RankedOrganicTweet
suggest_activity
suggest_activity_feed
suggest_activity_highlights
suggest_activity_tweet
@broerjuang
broerjuang / feedback_form.re
Created September 15, 2019 19:15
An experiment using state machine using ReasonML
open ReactUpdate;
type context = {
rate: int,
comment: string,
};
type action =
| Open
| Close
@abenoit
abenoit / ClickOutside.re
Last active April 3, 2019 04:51
ReasonML Binding for react-click-outside
[@bs.module "react-click-outside"]
external clickOutside: ReasonReact.reactClass = "default";
[@bs.deriving abstract]
type jsProps = {
className: option(string),
onClickOutside: ReactEvent.Mouse.t => unit,
};
let make = (~className=?, ~onClickOutside, children) =>
@joshburgess
joshburgess / flatten.js
Last active February 10, 2018 17:58
Solutions showing how to flatten arbitrarily nested arrays of ints in JavaScript
// shorthand function for the Number.isInteger method
const isInt = Number.isInteger
// shorthand function for the Array.isArray method
const isArray = Array.isArray
// functional wrapper for the Array.reduce method
const reduce = f => initVal => arr => arr.reduce(f, initVal)
// functional wrapper for the Array.concat method
FROM node:6
RUN npm install -g bs-platform
RUN yarn global add serve
# Copy just the package.json first to install deps
ADD src/package.json /app/package.json
WORKDIR /app
RUN npm install
@kumekay
kumekay / rename_phoenix_project.sh
Last active November 7, 2021 06:13 — forked from nerdyworm/rename.sh
rename a phoenix 1.3 project
#!/bin/bash
set -e
CURRENT_NAME="CurrentName"
CURRENT_OTP="current_name"
NEW_NAME="NewName"
NEW_OTP="new_name"
@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.