Skip to content

Instantly share code, notes, and snippets.

View jefdaj's full-sized avatar

Jeff Johnson jefdaj

  • Department of Plant and Microbiology at UC Berkeley
  • Berkeley, CA
  • X @jefdaj
View GitHub Profile
with import <nixpkgs> {};
stdenv.mkDerivation {
name = "computational-category-theory";
buildInputs = [
smlnj
];
shellHook = ''
cd programs
sml
@jefdaj
jefdaj / update-r-packages.sh
Created March 23, 2016 06:09
Shell script to update Nix r-modules
#!/usr/bin/env bash
# Messy but hopefully working script to maintain r-modules. Call it with a git
# ref (I usually use `master` or `HEAD`) and it will test build all packages
# added upstream since that commit. It will also prompt you to remove anything
# that's been archived upstream so the attribute set continues to evaluate.
# Usage: ./update-r-packages.sh [<git ref>]
# Some details and tips:
@jefdaj
jefdaj / BootTidal.hss
Last active February 18, 2016 21:55
launch an instance of ghci with tidal
:set prompt ""
:module Sound.Tidal.Context
(cps, getNow) <- bpsUtils
(d1,t1) <- dirtSetters getNow
(d2,t2) <- dirtSetters getNow
(d3,t3) <- dirtSetters getNow
(d4,t4) <- dirtSetters getNow
@jefdaj
jefdaj / builder.sh
Last active February 15, 2022 12:38
Draft nix expression to wrap debian packages.
source $stdenv/setup
PATH=$dpkg/bin:$PATH
dpkg -x $src unpacked
cp -r unpacked/* $out/
module Network.Gitit.Plugin.CiteProc
where
{- This plugin processes bibtex citations using pandoc-citeproc.
- It will pick them up from one or more `bib` blocks in the page itself,
- like so:
-
- ~~~{ .bib }
- @Book{ kerby1972,
- author = {Robert L. Kerby},
@jefdaj
jefdaj / scalpel-example.hs
Last active March 29, 2016 00:03
Scalpel example
import Text.HTML.Scalpel
import Control.Applicative ((<|>))
type Author = String
data Comment = TextComment Author String | ImageComment Author URL
deriving Show
-- allComments :: IO (Maybe [Comment])
-- allComments = scrapeURL "http://example.com/article.html" comments
@jefdaj
jefdaj / PKGBUILD
Created September 16, 2013 18:04
sdx updated PKGBUILD
# Maintainer: Matthew Hiles <matthew.hiles@gmail.com>
# Contributor: Jeffrey David Johnson <jefdaj@gmail.com>
pkgname=sdx
pkgver=20080224
pkgrel=3
pkgdesc="A utility for making and unpacking starkits."
url="http://equi4.com/starkit/sdx.html"
depends=(tclkit)
arch=('i686' 'x86_64')
@jefdaj
jefdaj / PKGBUILD
Last active December 23, 2015 04:59
tclkit updated PKGBUILD
# Contributor: BenObiWan <benobiwan @t gmail dot com>
# Contributor: Simon Bachmann <simonbachmann@freesurf.ch>
# Contributor: Jeffrey David Johnson <jefdaj@gmail.com>
pkgname=tclkit
pkgver=8.5.1
pkgrel=5
pkgdesc="A compact, single file executable containing Tcl, Tk, IncrTcl, TclVFS and Metakit"
url="http://www.equi4.com/tclkit/"
arch=('i686' 'x86_64')