Skip to content

Instantly share code, notes, and snippets.

View juhp's full-sized avatar

Jens Petersen juhp

  • Red Hat
  • Singapore
  • X @juhp
View GitHub Profile
@juhp
juhp / stack-symlink-distro-ghc.sh
Created January 7, 2022 09:57
script to setup stack symlinks to fedora ghcX.Y
$ stack -v --resolver lts-12 --stack-yaml stack-lts12.yaml build
Version 2.1.3.1 x86_64
Compiled with:
- Cabal-2.4.1.0
- Glob-0.10.0
- StateVar-1.2
- aeson-1.3.1.1
- annotated-wl-pprint-0.7.0
- ansi-terminal-0.9.1
- ansi-wl-pprint-0.6.9

Keybase proof

I hereby claim:

  • I am juhp on github.
  • I am juhp (https://keybase.io/juhp) on keybase.
  • I have a public key ASC_RrirmAZeeslaPILKIXjpdmdW2fdgOb06M8iSNS-vbgo

To claim this, I am signing this object:

@juhp
juhp / stackage-top-revdeps
Last active April 10, 2017 07:20
Stackage Nightly packages with >= 20 revdeps (2017-04-10)
818 text
527 mtl
419 QuickCheck
357 hspec
333 unordered-containers
307 tasty
270 vector
249 aeson
236 tasty-hunit
220 HUnit
#!/bin/sh
# uses httpie for ease
#
# $ stckg-query.sh lts pandoc
# lts-7.14 pandoc-1.17.1
http --all -F -h https://www.stackage.org/$1/package/$2 | grep Location: | tail -1 | sed -e "s%Location: https://www.stackage.org/%%" -e "s%/package/% %"
@juhp
juhp / el7check.hs
Last active April 25, 2019 11:50
haskell turtle shell script to check NVRs of epel7 packages
{-# LANGUAGE OverloadedStrings #-}
import Turtle
import Data.Text (words)
rpmspecSrc qf spec = do
(_res, out) <- procStrict "rpmspec" ["-q", "--srpm", "--undefine=dist", "--qf", qf, spec] empty
return out
nvr = "%{name}-%{version}-%{release}"
@juhp
juhp / turtle-shell
Last active October 5, 2015 16:44
start turtle interactive shell
#!/bin/sh
ghci -ghci-script turtle.ghci -package turtle -package foldl
@juhp
juhp / haskellyte.md
Last active August 29, 2015 14:04 — forked from jessitron/haskellyte.md

Letter to a Young Haskell Enthusiast, by Gershom Bazerman.

Condensed from: http://comonad.com/reader/2014/letter-to-a-young-haskell-enthusiast/

The following letter is about tendencies that come with the flush of excitement of learning any new thing. It is written specifically, because if we don't talk specifics, the generalities make no sense. It is a letter full of things I want to remember.

You’ve entered the world of strongly typed functional programming, and it is great. You want to share the great things you’ve learned, and you want to slay all the false statements in the world.

cblrepo -n add wai,2.1.0 conduit,1.0.13.1 wai-extra,2.1.1 warp,2.1.3 vault,0.3.0.3 fast-logger,2.1.5 monad-logger,0.3.4.1 wai-logger,2.0.0 blaze-builder,0.3.3.2 monad-loops,0.4.2 stm-chans,3.0.0.2 http-date,0.0.4