Skip to content

Instantly share code, notes, and snippets.

View massysett's full-sized avatar

Omari Norman massysett

  • Prince George's County, Maryland USA
View GitHub Profile
@fizruk
fizruk / snapshot-ghc8.yaml
Last active March 4, 2016 21:11
Stack config with GHC 8.0.1-rc2 on Mac OS X.
compiler: ghc-8.0.0.20160204
setup-info:
ghc:
macosx:
8.0.0.20160204:
url: "http://downloads.haskell.org/~ghc/8.0.1-rc2/ghc-8.0.0.20160204-x86_64-apple-darwin.tar.xz"
packages:
- base-orphans-0.5.1
#!/usr/bin/env python2
"""
Uploads haddocks to Hackage.
Use it when Hackage can't build your documentation (e.g. missing libraries).
Inspired by:
http://fuuzetsu.co.uk/blog/posts/2014-01-06-Fix-your-Hackage-documentation.html
"""
import getpass
@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=$?
@snikch
snikch / test.rb
Last active January 6, 2022 13:18
Convert a UUID to UTF-8 encoding to visually shorten.
>> code = Urlcode.uuid_to_code("4c3559f0-cd95-482f-a27d-b2bbc68523ef")
=> "䰵姰축䠯ꉽ늻욅⏯"
>> Urlcode.code_to_uuid(code)
=> "4c3559f0-cd95-482f-a27d-b2bbc68523ef"
@ijt
ijt / io_quickcheck_example.hs
Created May 11, 2011 22:12
Simple example of monadic IO with QuickCheck in Haskell
#!/usr/bin/env runhaskell
-- Synopsis:
-- $ cabal install QuickCheck
-- $ runhaskell io_quickcheck_example.hs
--
-- Author: Issac Trotts <issac.trotts@gmail.com>
import Directory
import System.Environment