Skip to content

Instantly share code, notes, and snippets.

Alan Dipert alandipert

Block or report user

Report or block alandipert

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Vagrantfile
# vi: set ft=ruby :
$script = <<SCRIPT
apt-get install -y git maven openjdk-7-jdk
cd /usr/local/bin
wget -O lein
chmod +x lein
pandeiro /
Last active Aug 29, 2015
Example of a simple webapp written as a single file


  1. Get Boot
  2. Copy the above file to $HOME/app.boot
  3. $ chmod a+x $HOME/app.boot
  4. $ cd && ./app.boot
tonsky / .profile.boot
Created Mar 2, 2015
boot-clj plugin to report build status to AnyBar
View .profile.boot
(defn- send-udp [s port]
(with-open [socket (]
(let [group ( "localhost")
bytes (.getBytes s)
packet ( bytes (count bytes) group port)]
(.send socket packet)
(.close socket))))
(deftask anybar [p port VAL int "AnyBar port"]
(let [port (or port 1738)]
micha / gist:997056
Created May 28, 2011
Euler project problem #1
View gist:997056
#! /usr/bin/env racket
; Euler problem #1. Sum of integers between 1 and N which are
; divisible by i, j, k, ..., or l.
; The sum 1+2+3+...+n = (n^2 + n)/2, call this sum-range(n).
; Then the sum of i+2i+3i+...+qi = i * sum-range(floor(n/i)), where
; qi is the greatest multiple of i such that i <= n.
jerrypnz / test_watchers.clj
Created Nov 6, 2012
Clojure wrapper for Java 7 WatchService (java.nio.files)
View test_watchers.clj
(load-file "./watch_service.clj")
(refer 'watch-service)
(defn print-ev
[ev ctx]
(println "[foo]" ev " --> " ctx)
(println "Parent Dir:" (.getParent ctx)))
(defn print-ev-2
[ev ctx]
kanaka /
Last active Dec 30, 2015
bash lisp tokenizer NOTE: doesn't handle \" within strings yet
wholefile=$(cat $1)
while true; do
if (( ${#str} < ( chunksz / 2) )) && (( chunk < filelen )); then
fsmunoz / abcl-mqtt.lisp
Created Jun 24, 2013
Simple example of MQTT message publish in Common Lisp and ABCL, using the Eclipse Paho client
View abcl-mqtt.lisp
;; Simple example of MQTT message publish using Common Lisp and ABCL
;; Uses the Eclipse Paho client
;; Author: Frederico Munoz <>
;; Date: 22-Jun-2013
;; Keywords: mqtt, messaging, m2m, telemetry, abcl, iot, paho, lisp
;; Copying and distribution of this file, with or without modification,
;; are permitted in any medium without royalty provided the copyright
DASpringate / cond.R
Last active May 19, 2017
A simple R implementation of `cond` from Lisp. Allows for arbitrary numbers of conditionals without nested if statements
View cond.R
#' R implementation of `cond` from Lisp
#' allows for arbitrary numbers of conditionals without ugly nested if statements
#' conditionals are entered as pairs of expressions (clauses),
#' first the expression to be evaluated and second the return value if the expression is true
#' @param ... an even number of expressions as pairs (see example)
#' @param true the `else` expression (Taken from the Lisp (T resultN) see
#' @return The paired value of the first true conditional expression or the value of true
#' @examples
#' x <- runif(1)
#' cond(x < 0.2, "lower tail",
bcachet / graph.fs
Last active Aug 11, 2017
Kahn sorting in F#
View graph.fs
namespace Graph
// Implementation based on
module Map =
let keys map =
map |> Map.toSeq |> fst |> Set.ofSeq
let values map =
map |> Map.toSeq |> snd |> Set.ofSeq
View llvmlisp.cpp
/* A Trivial LLVM LISP
* Copyright (C) 2008-2009 David Robillard <>
* Parts from the Kaleidoscope tutorial <>
* by Chris Lattner and Erick Tryzelaar
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
You can’t perform that action at this time.