This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright 2012 Erlware, LLC. All Rights Reserved. | |
# | |
# This file is provided to you under the Apache License, | |
# Version 2.0 (the "License"); you may not use this file | |
# except in compliance with the License. You may obtain | |
# a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# If run inside a git repository will return a valid semver based on | |
# the semver formatted tags. For example if the current HEAD is tagged | |
# at 0.0.1, then the version echoed will simply be 0.0.1. However, if | |
# the tag is say, 3 patches behind, the tag will be in the form | |
# `0.0.1+build.3.0ace960`. This is basically, the current tag a | |
# monotonically increasing commit (the number of commits since the | |
# tag, and then a git short ref to identify the commit. | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
# Assumes that you tag versions with the version number (e.g., "1.1") | |
# and then the build number is that plus the number of commits since | |
# the tag (e.g., "1.1.17") | |
DESCRIBE=`git describe --tags --always` | |
# increment the build number (ie 115 to 116) | |
VERSION=`echo $DESCRIBE | awk '{split($0,a,"-"); print a[1]}'` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
query foo($l: String!) { | |
user(login: $l) { | |
login | |
name | |
location | |
websiteUrl | |
avatarUrl | |
bio | |
bioHTML |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import loglevel from 'loglevel'; | |
import { gaussian, randomBetweenMinAndMax } from './random-utils'; | |
interface IPeriodEntry { | |
calories: number; | |
workout: boolean; | |
} | |
interface ISimEntry { | |
correctnessFactor: number; | |
period: IPeriodEntry[]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Fix the cd command for use with acme | |
# | |
cd() { | |
builtin cd $1 && awd | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 $ (,,,,,,,,) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
with import <nixpkgs> {}; | |
with import <nixhome> { inherit stdenv; inherit pkgs; }; | |
let | |
toBin = pkg: "${pkg}/bin"; | |
localPkgs = [ tmux | |
awscli | |
sbt | |
jq | |
moreutils |
NewerOlder