Skip to content

Instantly share code, notes, and snippets.

{stdenv, buildOcaml, fetchurl}:
buildOcaml rec {
minimumSupportedOcamlVersion = "4.02";
version = "109.35.02";
name = "herelib";
src = fetchurl {
url = "https://github.com/janestreet/herelib/archive/${version}.tar.gz";
sha256 = "7f8394169cb63f6d41e91c9affa1b8ec240d5f6e9dfeda3fbb611df521d4b05a";
@ericbmerritt
ericbmerritt / git-semver.sh
Created July 30, 2014 21:04
Shell script for parsing semvers from git-describe
#! /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]}'`
let emit_seats action =
let module Html5 = Html5.M in
match action with
| Container.Updated _ ->
[{Container.selector="#content";
markup = <:html5< <div>didnotgetit</div> >> }]
| _ ->
[{Container.selector="#error";
markup = <:html5< <div>didnotgetit</div> >> }]
------------------------------------------------------------------------
#!/bin/bash
#
# This is scheduled in CRON. It will run every 20 minutes
# and check for inactivity. It compares the RX and TX packets
# from 20 minutes ago to detect if they significantly increased.
# If they haven't, it will force the system to sleep.
#
log=~/scripts/idle/log
let
pkgs = import <nixpkgs> {};
stdenv = pkgs.stdenv;
in rec {
re = pkgs.callPackage ./pkgs/ocaml/re/v1.2.1.nix {
inherit (pkgs) stdenv fetchurl ocaml ocaml-findlib;
} ;
Error: This expression has type
string Async.Std.Pipe.Reader.t option ->
Async.Std.Socket.Address.Inet.t ->
Cohttp_async.Request.t ->
Cohttp_async.Server.response Async.Std.Deferred.t
but an expression was expected of type
body:string Async.Std.Pipe.Reader.t option ->
Async.Std.Socket.Address.Inet.t ->
Cohttp_async.Request.t ->
Cohttp_async.Server.response Async.Std.Deferred.t
> roy@0.1.5 install /tmp/build_75b89984-9cda-460c-ac0f-cade59cb23de/node_modules/grunt-roy/node_modules/roy
> node src/grammar.js && node src/typegrammar.js
> grunt-roy@0.0.4 postinstall /tmp/build_75b89984-9cda-460c-ac0f-cade59cb23de/node_modules/grunt-roy
> (cd node_modules/roy && make deps && make && cd ../../) &>/dev/null
npm install
make: npm: Command not found
make: *** [deps] Error 127
{application, <App Name>,
[{description, "<App Description>"},
{vsn, "<App Version>"},
{modules, [<Module List>]},
{registered, [<Registered Modules>]},
{applications, [<Dependency List>]},
{mod, {<Application Behaviour Module>, []}}]}.
@ericbmerritt
ericbmerritt / *.app.src
Last active December 22, 2015 01:29
ErlangCamp Amsterdam 2013
{application, <App Name>,
[{description, "<App Description>"},
{vsn, "<App Version>"},
{modules, [<Module List>]},
{registered, [<Registered Modules]},
{applications, [<Dependency List>]},
{mod, {<Application Behaviour Module>, []}}]}.
=ERROR REPORT==== 19-Aug-2013::14:45:41 ===
Error in process <0.310.0> with exit value: {function_clause,[{lists,zip,[[transport,connection,pid,method,version,peer,host,host_info,port,path,path_info,qs,qs_vals,bindings,headers,p_headers,cookies,meta,body_state,multipart,buffer,resp_compress...