Skip to content

Instantly share code, notes, and snippets.

View Bestra's full-sized avatar
😃

Chris Westra Bestra

😃
  • GitHub
  • Columbus, OH
  • 19:17 (UTC -04:00)
  • X @_Bestra
View GitHub Profile
@brasic
brasic / bush.sh
Last active January 13, 2023 12:19
homer bush
#!/bin/sh
set -euxo
cleanup() {
rm -f 1.mp4 2.mp4 3.mp4 4.mp4 palette.png
}
trap cleanup EXIT
# extend the last frame
@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.

@nummi
nummi / app.jsx
Last active August 25, 2017 21:40
React Contextual Component
// https://codesandbox.io/s/kxzwolv9k7
import React, { Component } from 'react';
import { render } from 'react-dom';
class Ember extends Component {
constructor(props) {
super(props);
this.state = { isCool: 'yasss' };
use compiler::parser::tok::{self, Tok};
use compiler::ast::*;
grammar<'input>["LALR(1)"];
extern {
type Location = usize;
type Error = tok::Error;
enum Tok<'input> {
@staltz
staltz / introrx.md
Last active July 22, 2024 09:31
The introduction to Reactive Programming you've been missing
@steve9001
steve9001 / application.rb
Created December 7, 2011 16:18
Rails middleware to provide information about errors during requests
module MyApp
class Application < Rails::Application
if Rails.env == 'test'
require 'diagnostic'
config.middleware.use(MyApp::DiagnosticMiddleware)
end
end
end