Skip to content

Instantly share code, notes, and snippets.

View cosmo0920's full-sized avatar
🏠
Working from home

Hiroshi Hatake cosmo0920

🏠
Working from home
View GitHub Profile
$OutputEncoding = New-Object -typename System.Text.UTF8Encoding
[Console]::OutputEncoding = New-Object -typename System.Text.UTF8Encoding
@Fuuzetsu
Fuuzetsu / hackagedocs
Last active December 13, 2022 22:40
Script for generating and uploading missing documentation for your Hackage packages. Now with fixed package links and contents page.
#!/usr/bin/env bash
cabal configure && cabal build && cabal haddock --hyperlink-source \
--html-location='/package/$pkg-$version/docs' \
--contents-location='/package/$pkg'
S=$?
if [ "${S}" -eq "0" ]; then
cd "dist/doc/html"
DDIR="${1}-${2}-docs"
cp -r "${1}" "${DDIR}" && tar -c -v -z --format=ustar -f "${DDIR}.tar.gz" "${DDIR}"
CS=$?
@myuon
myuon / H.v
Last active August 29, 2015 14:06
Monad of Identity, Maybe, List
Require Import ssreflect.
Class Monad (M : Type -> Type) :=
{
mreturn : forall {A}, A -> M A
; mbind : forall {A B}, M A -> (A -> M B) -> M B
; left_return : forall A B (a : A) (k : A -> M B), mbind (mreturn a) k = k a
; right_return : forall A (m : M A), mbind m mreturn = m
; composite : forall A B (m : M A) (k : A -> M A) (h : A -> M B),
@githwxi
githwxi / C9-ATS2-install.sh
Last active August 29, 2015 14:20
A shell script for installing ATS2 + ATS2-contrib
#!/usr/bin/env sh
######
#
# A shell script for
# installing ATS2 + ATS2-contrib
#
######
#
# The URL for this script: http://git.io/vIFPF
@voluntas
voluntas / mqtt.rst
Last active March 1, 2023 06:47
MQTT とはなんだったのか

MQTT とはなんだったのか

更新:2017-05-09
作者:@voluntas
バージョン:3.14
URL:http://voluntas.github.io/

MQTT をググって調べた人向け

@leque
leque / freer.ml
Last active September 30, 2021 07:44
Freer monad in OCaml
(*
Requirement: higher, ppx_deriving.show
*)
(*
Lightweight higher-kinded polymorphism
https://ocamllabs.github.io/higher/lightweight-higher-kinded-polymorphism.pdf
*)
open Higher