Skip to content

Instantly share code, notes, and snippets.

jvns / main.clj
Created Apr 2, 2012 — forked from lynaghk/main.clj
Cassowary constraint solver in ClojureScript
View main.clj
;;Using the Cassowary constraint solver from ClojureScript
;;This demo shows using multimethods for readable constraint syntax using +, -, and =.
;;Output is a row of circles with random radii spaced so that the space between their boundaries is uniform.
(ns c2.main
;;refer-clojure :exclude is currently broken in ClojureScript master
;;Ticket open:
;;Fix applied here:
(:refer-clojure :exclude [+ - =])
jvns /
Created Oct 16, 2012 — forked from dergachev/
Vagrant tutorial

Vagrant Setup

This tutorial guides you through creating your first Vagrant project.

We start with a generic Ubuntu VM, and use the Chef provisioning tool to:

  • install packages for vim, git
  • create user accounts, as specified in included JSON config files
  • install specified user dotfiles (.bashrc, .vimrc, etc) from a git repository

Afterwards, we'll see how easy it is to package our newly provisioned VM

jvns / musicfromserial.processing
Created Mar 16, 2013
Processing program to play bytes from the serial port as music
View musicfromserial.processing
import ddf.minim.*;
import ddf.minim.ugens.*;
import processing.serial.*;
Serial myPort; // The serial port
Minim minim;
AudioOutput out;
Oscil osc;
void setup() {
minim = new Minim( this );
out = minim.getLineOut( Minim.MONO, 2048 );
jvns /
Created Apr 15, 2013
histogram example
jvns /
Created Apr 17, 2013
jvns / index.html
Last active Dec 17, 2015
snake in d3
View index.html
<title> it's a snake! </title>
<link rel="stylesheet" href="snake.css"> </link>
<script src="" charset="utf-8"></script>
<script src=""> </script>
<script src="snake.js"> </script>
jvns / exploding.css
Last active Dec 17, 2015
exploding javascripts
View exploding.css
rect.snake {
fill: #555353;
} {
fill: #45720B;
svg {
height: 100%;
jvns /
Created Sep 16, 2013
jvns / broken-stack-code.c
Created Oct 1, 2013
Do a weird thing with the stack in C
View broken-stack-code.c
#include <stdio.h>
void set_strings(char*** strings) {
char* strs[] = {"banana"};
*strings = strs;
int main() {
char** strings;