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
alandipert /
Last active Aug 7, 2019 — forked from jcheng5/
Installing R-devel on Solaris 10 VM

As far as CRAN is concerned, there are two flavors of R on Solaris: one that is built using the Solaris Studio compiler, and one that is built using the GNU/gcc toolchain. The latter is far more up-to-date, but if your package requires it, then your DESCRIPTION file must declare that with the line SystemRequirements: GNU make.

These instructions are for configuring, building, and installing R-devel using the GNU/gcc toolchain (only).

You'll need VMWare Fusion on Mac, or VMWare Workstation (?) on Windows/Linux.

Get Solaris VM

Download the Solaris VM provided by Jeroen Ooms:

View Vagrantfile
# vi: set ft=ruby :
$script = <<SCRIPT
apt-get update
apt-get install -y git maven openjdk-7-jdk
cd /usr/local/bin
wget -O lein
chmod +x lein
View inkystarter.cljs
(ns inkystarter
"Intro sketch for, fork away."
(:require [inky.sketch :as sketch]))
[:body {:font-family "'Helvetica Neue', Arial, sans-serif"}
:.sketch {:padding "30px"}]))
alandipert /
Created Dec 1, 2012 — forked from syohex/
Simple Scheme interpreter in Perl(inspired by
use strict;
use warnings;
package Lispl;
use Scalar::Util qw(blessed looks_like_number);
use List::Util qw(reduce);
my $global_env;
View units.clj
;;; Author: Scott Jaderholm
;;; Created: 2009-12-18
;;; Short Description: Automates the creation of unit conversion
;;; functions and includes several common ones.
;;; Detailed Description: So for inches, feet, and meters, if you
;;; provide equations for inches-to-feet and feet-to-meters, then this
;;; package will automatically create feet-to-inches, meters-to-feet,
;;; inches-to-meters, meters-to-inches, and all the corresponding
View plet.clj
(defmacro letp
[bindings & exprs]
(let [bindings (partition 2 bindings)
vars (->> bindings (map first) vec)
values (->> bindings (map second))]
`((fn ~vars ~@exprs)
(def a 7)
(def y 2)
View plet.clj
(defn deconstruct
(thisfn l [] []))
([l vars values]
(if (seq l)
(recur (rest (rest l))
(conj vars (first l))
(conj values (first (rest l))))
[vars values])))
View gist:2719629
Def fizzbuzz ≡ (eq0 ∘ strlen ∘ 2 → 1; 2) ∘
[1, strcat ∘ tl] ∘
[1, (eq0 ∘ 2 → ~'Fizz'; ~''), (eq0 ∘ 3 → ~'Buzz'; ~'')] ∘
[id, mod ∘ [id, ~3], mod ∘ [id, ~5]]
(αfizzbuzz ∘ iota):100
View lithp.rb
class Lisp
def initialize
@env = {
:label => lambda { |(name,val), _| @env[name] = val },
:quote => lambda { |sexpr, _| sexpr[0] },
:car => lambda { |(list), _| list[0] },
:cdr => lambda { |(list), _| list.drop 1 },
:cons => lambda { |(e,cell), _| [e] + cell },
:eq => lambda { |(l,r), _| l == r },
:if => lambda { |(cond, thn, els), ctx| eval(cond, ctx) ? eval(thn, ctx) : eval(els, ctx) },
alandipert /
Created Jan 5, 2012
Deploy static sites to heroku and use heroku caching
use Rack::Static,
:urls => ['/css', '/images'], # put directories here, files will get served for free
:root => "public"
run lambda { |env|
{ 'Content-Type' => 'text/html', 'Cache-Control' => 'public, max-age=86400' },'public/index.html', File::RDONLY) # Point this at the starting file
You can’t perform that action at this time.