Skip to content

Instantly share code, notes, and snippets.

View xvw's full-sized avatar

Xavier Van de Woestyne xvw

View GitHub Profile
@d-plaindoux
d-plaindoux / MonadicOption.kt
Last active December 16, 2020 09:20
This gist shows how typeclass can be "simply" designed "à la Arrow".
// HKT simulation
interface Kind<out F, out A>
// ----------------------------------------------------------------------------
interface Monad<F> {
fun <A, B> map(ma: Kind<F, A>, f: (A) -> B): Kind<F, B>
fun <A> join(ma: Kind<F, Kind<F, A>>): Kind<F, A>
fun <A, B> bind(ma: Kind<F, A>, f: (A) -> Kind<F, B>): Kind<F, B> = join(map(ma, f))
@dbuenzli
dbuenzli / ocaml-emacs.md
Last active August 11, 2022 00:39
Emacs setup for ocaml

Install the following opam packages:

opam install caml-mode merlin ocp-indent

Tweak your .emacs file with some or all of the following:

; shift tab to complete
(global-set-key (kbd "S-<tab>") 'company-complete)
@pdamoc
pdamoc / App.elm
Last active June 9, 2021 15:50
Demo on how to split code across multiple pages.
module Main exposing (..)
import Html exposing (Html, div, hr, text)
import Html.App as App
import Navigation
-- APP IMPORTS
import FirstPage
@bishboria
bishboria / springer-free-maths-books.md
Last active June 8, 2024 06:39
Springer made a bunch of books available for free, these were the direct links
@asufana
asufana / OSXでのFSharp環境整備.md
Last active July 6, 2016 15:36
OSXでのF#(FSharp)環境整備

OSX での F# (FSharp) 環境整備

環境情報

  • Mac OSX El Capitan 10.11.1
  • mono 4.2.1

mono インストール

@cb372
cb372 / jargon.md
Last active May 14, 2024 03:45
Category theory jargon cheat sheet

Category theory jargon cheat sheet

A primer/refresher on the category theory concepts that most commonly crop up in conversations about Scala or FP. (Because it's embarassing when I forget this stuff!)

I'll be assuming Scalaz imports in code samples, and some of the code may be pseudo-Scala.

Functor

A functor is something that supports map.

@ohanhi
ohanhi / frp.md
Last active May 6, 2024 05:17
Learning FP the hard way: Experiences on the Elm language

Learning FP the hard way: Experiences on the Elm language

by Ossi Hanhinen, @ohanhi

with the support of Futurice 💚.

Licensed under CC BY 4.0.

Editorial note

@paniq
paniq / pico8.txt
Last active March 20, 2022 21:11
PICO-8 hacks & secrets
Screen resolutions
------------------
PICO-8 supports different undocumented videomodes that can be activated at runtime,
using poke(0x5F2C, X) where X is one of the following mode numbers:
0: 128x128, 0 pages
1: 64x128, 1 page
2: 128x64, 1 page
3: 64x64, 3 pages
@bobbygrace
bobbygrace / trello-css-guide.md
Last active May 15, 2024 16:01
Trello CSS Guide

Hello, visitors! If you want an updated version of this styleguide in repo form with tons of real-life examples… check out Trellisheets! https://github.com/trello/trellisheets


Trello CSS Guide

“I perfectly understand our CSS. I never have any issues with cascading rules. I never have to use !important or inline styles. Even though somebody else wrote this bit of CSS, I know exactly how it works and how to extend it. Fixes are easy! I have a hard time breaking our CSS. I know exactly where to put new CSS. We use all of our CSS and it’s pretty small overall. When I delete a template, I know the exact corresponding CSS file and I can delete it all at once. Nothing gets left behind.”

You often hear updog saying stuff like this. Who’s updog? Not much, who is up with you?