Skip to content

Instantly share code, notes, and snippets.

View adetokunbo's full-sized avatar

Timothy Emiola adetokunbo

  • Itoshima, Japan
View GitHub Profile
#!/bin/bash
# Options / Usage
# put this script in the same directory as your *.cabal file
# it will use the first line of "cabal info ." to determine the package name
# custom options for "cabal install"
CUSTOM_OPTIONS=(--haddock-options='-q aliased')
# hackage server to upload to (and to search uploaded versions for)
HACKAGESERVER=hackage.haskell.org
@adetokunbo
adetokunbo / test.hs
Created February 20, 2023 08:02 — forked from anonymous/test.hs
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE UndecidableInstances #-}
import Control.Applicative ((<$>))
{
"AD": {
"countryName": "Andorra",
"currency": "EUR",
"symbol": "€"
},
"AE": {
"countryName": "United Arab Emirates",
"currency": "AED",
"symbol": "AED"
@adetokunbo
adetokunbo / gist:e00f2c0c6f6e07be7a26069c7cfe4578
Created January 13, 2022 02:09
haskell.nix: wai-middleware-delegate: cabal build fails after successful nix-shell when upgrading to text-2.0
$ nix-shell
building '/nix/store/2p075yxfnykj1wgcf7cl83n3ygnnlds1-git-ls-files.drv'...
trace: No index state specified for haskell-project, using the latest index state that we know about (2022-01-06T00:00:00Z)!
trace: To make project.plan-nix for hoogle a fixed-output derivation but not materialized, set `plan-sha256` to the output of the 'calculateMaterializedSha' script in 'passthru'.
trace: To materialize project.plan-nix for hoogle entirely, pass a writable path as the `materialized` argument and run the 'updateMaterialized' script in 'passthru'.
trace: No index state specified for cabal-install, using the latest index state that we know about (2022-01-06T00:00:00Z)!
trace: No index state specified for ghcid, using the latest index state that we know about (2022-01-06T00:00:00Z)!
trace: No index state specified for haskell-language-server, using the latest index state that we know about (2022-01-06T00:00:00Z)!
trace: No index state specified for hlint, using the latest index state that we know about (202
@adetokunbo
adetokunbo / setup-ubuntu-wp.sh
Created December 3, 2021 19:36 — forked from tjstein/setup-ubuntu-wp.sh
WordPress auto-setup for Ubuntu (ve)
#!/bin/bash
cd
#
# fix locales
#
echo "en_US.UTF-8 UTF-8" > /var/lib/locales/supported.d/local
dpkg-reconfigure locales
@adetokunbo
adetokunbo / haskell.yml
Created September 30, 2021 08:16 — forked from mstksg/haskell.yml
Stack Project Github Action Template
# Haskell stack project Github Actions template
# https://gist.github.com/mstksg/11f753d891cee5980326a8ea8c865233
#
# To use, mainly change the list in 'plans' and modify 'include' for
# any OS package manager deps.
#
# Currently not working for cabal-install >= 3
#
# Based on https://raw.githubusercontent.com/commercialhaskell/stack/stable/doc/travis-complex.yml
#
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FlexibleInstances #-}
module HFilter where
data a :* b = a :* b
deriving (Show, Eq)
infixr 5 :*
hlist :: Int :* String :* Int :* Maybe Float :* ()
-- Example of a dynamically generated FromJSON instance.
--
-- Can be useful when one needs to use a function with a
-- FromJSON constraint, but some detail about the
-- conversion from JSON is not known until runtime.
{-# LANGUAGE Rank2Types #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE OverloadedStrings #-}
module SimpleThings where
import Control.Applicative ((<$>), (<*>))
import Control.Monad (mzero)
import Data.Aeson
import qualified Data.Aeson as A
-- | sum type containing all possible payloads
//
// Regular Expression for URL validation
//
// Author: Diego Perini
// Created: 2010/12/05
// Updated: 2018/09/12
// License: MIT
//
// Copyright (c) 2010-2018 Diego Perini (http://www.iport.it)
//