Skip to content

Instantly share code, notes, and snippets.

View lisp-ceo's full-sized avatar
🎯
Focusing

James Meldrum lisp-ceo

🎯
Focusing
View GitHub Profile
@lisp-ceo
lisp-ceo / hoops.go
Created October 8, 2019 03:11
Calling variadric validation functions *with* type safety
package main
import (
"fmt"
)
type Approval struct {
Name string
Predicate func(...interface{}) error
// WrapperFn // TODO no way to specify multiple types!
============================================================================================================================================== FAILURES ==============================================================================================================================================
________________________________________________________________________________________________________________________________ test_get_price_gives_valid_response _________________________________________________________________________________________________________________________________
def test_get_price_gives_valid_response():
"""API gives price information for a consignment"""
$ docker build -t aws/codebuild/golang/1.11 .
STEP 1: FROM ubuntu:14.04.5
Progress: [ 14%] _BUCKET="download.docker.com" DOCKER_VERSION="18.09.0" DOCKER_CHANNEL="stable" DOCKER_SHA256="08795696e852328d66753963249f4396af2295a7fe2847b839f7102e25e47cb9" DIND_COMMIT="3b5fac462d21ca164b3778647420016315289034" DOCKER_COMPOSE_VERSION="1.23.2" GITVERSION_VERSION="3.6.5" DEBIAN_FRONTEND="noninteractive"
Progress: [ 15%] 0d74b63f6417c2650e9abb5920fa3b6a37be3dbcbbb0adad36fcee43b90eff
Progress: [ 16%] 4b63f6417c2650e9abb5920fa3b6a37be3dbcbbb0adad36fcee43b90eff
STEP 4: RUN set -ex && echo 'Acquire::CompressionTypes::Order:: "gz";' > /etc/apt/apt.conf.d/99use-gzip-compression && apt-get update && apt install -y apt-transport-https && apt-key adv --keyservProgress: [ 17%] .ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF && echo "deb https://download.mono-project.com/repo/ubuntu stable-trusty main" | tee /etc/apt/sources.list.d/mono-officialProgress: [ 19
@lisp-ceo
lisp-ceo / gist:c7d2a46b589ca3a01664f8b64d0b39dc
Created May 9, 2019 21:06
output of docker build -t aws/codebuild/golang/1.11 .
docker build -t aws/codebuild/golang/1.11 .
Progress: [ 10%] u:14.04.5
Progress: [ 12%] _BUCKET="download.docker.com" DOCKER_VERSION="18.09.0" DOCKER_CHANNEL="stable" DOCKER_SHA256="08795696e852328d66753963249f4396af2295a7fe2847b839f7102e25e47cb9" DIND_COMMIT="3b5fac462d21ca164b3778647420016315289034" DOCKER_COMPOSE_VERSION="1.23.2" GITVERSION_VERSION="3.6.5"
--> Using cache 44d51f385ef82fa7459bcb191e7db1a8f16014bde3180e7d7bf43aa9e67ffb32
Progress: [ 14%] f385ef82fa7459bcb191e7db1a8f16014bde3180e7d7bf43aa9e67ffb32
STEP 4: RUN set -ex && echo 'Acquire::CompressionTypes::Order:: "gz";' > /etc/apt/apt.conf.d/99use-gzip-compression && apt-get update && apt install -y apt-transport-https && apt-key adv --keyservProgress: [ 15%] .ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF && echo "deb https://download.mono-project.com/repo/ubuntu stable-trusty main" | tee /etc/apt/sources.list.d/mono-officialProgress: [ 16%] & apt-get update && apt-get ins
@lisp-ceo
lisp-ceo / README.md
Created March 14, 2019 15:12 — forked from roachhd/README.md
The Typeclassopedia from the Haskell wiki

% Typeclassopedia % Brent Yorgey

Originally published 12 March 2009 in issue 13 of the Monad.Reader. Ported to the Haskell wiki in November 2011 by Geheimdienst. Converted to Markdown in August 2013 by Erlend Hamberg. Converted to EPUB format with pandoc.

This is not the official version of the Typeclassopedia. The official version is now the Haskell wiki version which supersedes the version published in the Monad.Reader. Please help update and extend it by editing it yourself or by leaving comments, suggestions, and questions on the talk page.

Abstract

The standard Haskell libraries feature a number of type classes with algebraic or category-theoretic underpinnings. Becoming a fluent Haskell hacker requires intimate familiarity with them all, yet acquiring this f

Keybase proof

I hereby claim:

  • I am lisp-ceo on github.
  • I am lisp_ceo (https://keybase.io/lisp_ceo) on keybase.
  • I have a public key ASDvL3yW9p9Q8jUTFu-UN8dl4OSgvNfLspnQE2KkyaBtuQo

To claim this, I am signing this object:

@lisp-ceo
lisp-ceo / mwdes.sh
Created January 23, 2018 00:27
Mediawiki docker entry script
#!/bin/bash
#
# Copyright (c) 2015 BITPlan GmbH
#
# see LICENSE
#
# WF 2015-10-18
#
# Mediawiki docker image entrypoint script
#
@lisp-ceo
lisp-ceo / Gemfile
Last active January 11, 2018 03:01
Hacky network probe script. Prints to terminal-notifier when done (it's notify-send for mac)
# frozen_string_literal: true
source "https://rubygems.org"
git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
gem "terminal-notifier"
gem "typhoeus"
@lisp-ceo
lisp-ceo / Makefile
Created October 18, 2017 05:57
Script to update default password on linux-academy servers to something useful
update_server_password:
./update_la_pwd.exp $LI_IP $PASSWORD
@lisp-ceo
lisp-ceo / LCInstanceGen.sh
Last active September 22, 2017 04:50
Terraform with AWS
#!/bin/bash
REGION=${REGION:-"ap-southeast-2"}
INSTANCE='HAL-TheBigPHPMachine'
SCRIPT_EXT=-$REGION$INSTANCE
cp StartEC2Instances.py.template StartEC2Instances$SCRIPT_EXT.py
sed -i '' 's/__REGION__/'${REGION}'/g' StartEC2Instances$SCRIPT_EXT.py
sed -i '' 's/__INSTANCE__/'${INSTANCE}'/g' StartEC2Instances$SCRIPT_EXT.py
zip StartEC2Instances.zip StartEC2Instances$SCRIPT_EXT.py