Skip to content

Instantly share code, notes, and snippets.

;; boids
;; a Clojure+Processing example
;;
;; written around Dec 2008/Jan 2009
;;
;; The code is in the Public Domain.
;;
;; based on Flocking example by by Daniel Shiffman
;; (distributed with processing)
;;
;; mutable boids
;; a Clojure+Processing example
;;
;; written around July/August 2009
;;
;; The code is in the Public Domain.
;;
;; based on Flocking example by by Daniel Shiffman
;; (distributed with processing)
;;
function get-libs(){
if(test-path "lib"){
$jars = (ls lib -include *.jar -recur) | foreach { $_.FullName }
if($jars){
[String]::Join(";", $jars)
}
}
}
$VERSION="1.0.0-SNAPSHOT"
$git_repo_location = (get-location).Path
function Prompt () {
$location = $git_repo_location
$id = 1
$historyItem = Get-History -Count 1
if($historyItem)
{
$id = $historyItem.Id + 1
}
@rosado
rosado / gist:961566
Created May 8, 2011 18:23
JavaRagelTemplate.rl
%%{
machine hello;
main := ( 'hello' | 'ahoy' );
}%%
public class FSM{
%% write data;
public FSM(){
@rosado
rosado / opengl.clj
Created February 15, 2012 18:41
example opengl code for clj-processing
;; processing example
(ns mouse-example-3d
(:use [rosado.processing]
[rosado.processing.applet]))
(def mouse-position (atom [0 0]))
(defn draw
[]
@rosado
rosado / gist:1953500
Created March 1, 2012 21:55
Visual Studio aliases
alias rep Build.RebuildSelection
alias res Build.RebuildSolution
alias tn Window.MovetoNextTabGroup
alias pn Window.MovetoPreviousTabGroup
@rosado
rosado / .ackrc
Last active December 10, 2015 19:08
--type-set=clojure=.clj
--type-set=cljs=.cljs
--type-add=lisp=.clj,.cljs
--type-add=scala=.scala
--type-add=css=.sass,.less,.scss
--type-add=ruby=.rake,.rsel,.builder,.thor
--type-add=html=.haml,.html.erb,.html.haml
--type-add=js=.js.erb,.coffee
--type-set=cucumber=.feature
--type-set=c=.c,.cpp,.ino,.pde,.h
unbind C-b
set -g prefix C-z
# Set status bar
set -g status-bg black
set -g status-fg white
set -g status-left '#[fg=green]#H'
set-option -g allow-rename off
set-option -g automatic-rename off
@rosado
rosado / gist:5481196
Created April 29, 2013 12:03
Useful bash functions
function histogram () {
awk ' NF > 0{ counts[$0] = counts[$0] + 1; } END { for (word in counts) print word, counts[word]; }'
}
function awk-average () {
awk '{ s+=$1 } END { print 's/NR' }'
}