Skip to content

Instantly share code, notes, and snippets.

View gist:0747ecf7b1a2f789fcf88894322d39e2
query foo($l: String!) {
user(login: $l) {
login
name
email
location
websiteUrl
avatarUrl
bio
bioHTML
View Makefile
export PROJECT_ROOT := $(shell pwd)
VERSION := $(shell "${PROJECT_ROOT}/docker/src/git-version.sh")
DEV_COMPOSE:="${PROJECT_ROOT}/docker/dev.compose.yml"
SHFMT=shfmt -i 2 -ci
RUN_IN_CONTAINER="${PROJECT_ROOT}/bin/run-in-container.sh" "${DEV_COMPOSE}"
export PROJECT_ROOT := $(shell pwd)
View simulation.hs
{-# LANGUAGE DeriveGeneric, OverloadedStrings, DeriveAnyClass #-}
{-# LANGUAGE TemplateHaskell, NamedFieldPuns, LambdaCase #-}
{-# LANGUAGE RankNTypes, TypeOperators, Strict #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-| For each simulation, every person is randomly assigned a task, and
normally randomly decides how long each task ends up taking for this
particular simulation; it then walks forward in time until the first
person (or people) complete their task, at which point it randomly
assigns new tasks from the remaining, chooses normal random numbers
View index.ts
import loglevel from 'loglevel';
import { gaussian, randomBetweenMinAndMax } from './random-utils';
interface IPeriodEntry {
calories: number;
workout: boolean;
}
interface ISimEntry {
correctnessFactor: number;
period: IPeriodEntry[];
View yesod autocomplete
https://git.gnu.io/chreekat/yesod/commit/41faf62094ad7077573de797599c742ff9401c4e
> mkYesod "HW" [$parseRoutes|
> / RootR GET
> /form FormR
> /static StaticR Static hwStatic
> /autocomplete AutoCompleteR GET
----
handleFormR = do
> (res, form, enctype, nonce) <- runFormPost $ fieldsToTable $ (,,,,,,,,)
View gist:f2e67b0517390e2fd14bc55330d074af
with import <nixpkgs> {};
with import <nixhome> { inherit stdenv; inherit pkgs; };
let
toBin = pkg: "${pkg}/bin";
localPkgs = [ tmux
awscli
sbt
jq
moreutils
View gist:330b7952552b63e311b1f2b7841d9a63
### Keybase proof
I hereby claim:
* I am ericbmerritt on github.
* I am ericbmerritt (https://keybase.io/ericbmerritt) on keybase.
* I have a public key ASBQF5mlsvQX8wYFIFRkTtwfeVqAkABdOzw4Rp6dzFGtlgo
To claim this, I am signing this object:
View gist:5ad80e2fa3c92c36950cfc5e783788e3
# Enable XMonad Desktop Environment.
windowManager = {
xmonad.enable = true;
xmonad.enableContribAndExtras = true;
};
View gist:c1cc2aa29ac3f90a831ba8fffc77a52c
{ stdenv, symlinkJoin, dockerTools, coreutils, writeScript, glibcLocales,
metadrift }:
let
metadriftConfig = {
environment.systemPackages = [ metadrift ];
};
minimalDocker =
View gist:8646281cd5b1d1707e1066f68932365d
remote: -----> Fetching .debs for liblapack-dev
remote: Reading package lists...
remote: Building dependency tree...
remote: The following extra packages will be installed:
remote: libblas-dev libblas3 libgfortran3 liblapack3
remote: The following NEW packages will be installed:
remote: libblas-dev libblas3 libgfortran3 liblapack-dev liblapack3
remote: 0 upgraded, 5 newly installed, 0 to remove and 50 not upgraded.
remote: Need to get 4,173 kB of archives.
remote: After this operation, 19.5 MB of additional disk space will be used.