Skip to content

Instantly share code, notes, and snippets.

Dependencies

First you'll need a docker install: https://docs.docker.com/installation/

psci

After installing Docker, we'll run a PureScript psci session by running the 0.6.1.1 image. The -it flags allocate a pseudo tty and make it interactive. We're pulling the image from the default docker hub, so the images are here and the code that builds them is on GitHub

docker run -it biscarch/purescript:0.6.1.1
FROM alpine:latest
RUN apk add --update curl xz alpine-sdk perl gmp-dev file gmp openssh openssl
RUN cd /tmp && su -l operator -c "curl -o /tmp/ghc.xz 'http://10.11.12.2:8000/ghc-7.10.1-x86_64-unknown-linux-musl.tar.xz'"
RUN su -l operator -c "cd /tmp && xz -c -d /tmp/ghc.xz | tar xf -"
RUN cd /tmp/ghc-7.10.1 && ./configure --prefix=/opt && make install
RUN echo 'main = putStrLn "Hello static world"' > /tmp/static.hs
# Install a local copy of Hoogle (OS X, HP)
# Download
cd
cabal unpack hoogle
cd hoogle-4.2.26/
# Build
cabal sandbox init
cabal install -j --dependencies-only
#!/usr/bin/perl
# A script to generate constraints based on the package versions installed
# in a cabal sandbox.
#
# Like cabal freeze / cabal-constraints, but is not limited to a single
# package or build tree.
#
# For this to work, you have either to be in a directory with
# cabal.sandbox.config, or have the environment set up
gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
gzip_buffers 16 8k;
gzip_http_version 1.1;
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
ssl_certificate ssl-bundle.crt;
ssl_certificate_key ssl-private.key;
ssl_session_timeout 5m;
@ChristopherBiscardi
ChristopherBiscardi / core.clj
Created October 30, 2012 00:02 — forked from pitluga/core.clj
Braintree Clojure Example
(ns braintree-clj.core
(:import [com.braintreegateway BraintreeGateway Environment TransactionRequest Transaction$Type])
(:require [clojure.string :as s]
[hiccup.core :as hiccup]
[hiccup.page-helpers :as page-helper]
[noir.core :as noir]
[noir.request :as noir-req]