Skip to content

Instantly share code, notes, and snippets.

View azolotko's full-sized avatar
🛠️

Alex Zolotko azolotko

🛠️
  • Zaandam, The Netherlands
View GitHub Profile
@azolotko
azolotko / gist:58233c1ec1d93710ebe5
Created April 22, 2015 05:00
An example of Homebrew generated wrapper for a Datomic command
#!/bin/bash
JAVA_HOME="$(/usr/libexec/java_home)" exec "/usr/local/Cellar/datomic/0.9.5153/libexec/bin/repl" "$@"
@azolotko
azolotko / gist:eb7bad9017659c302501
Created April 22, 2015 04:40
Installing Datomic on Mac OS X
brew update && brew install datomic
@azolotko
azolotko / lein_repl.sh
Created July 3, 2013 09:40
Start a REPL and play a little
lein repl
@azolotko
azolotko / rock_paper_scissors.clj
Last active December 19, 2015 07:09
Write the rules of the rock-paper-scissors game
(ns rock-paper-scissors.core
(:refer-clojure :exclude [==])
(:use clojure.core.logic))
(defrel beats hand1 hand2)
(facts beats [[:rock :scissor] [:paper :rock] [:scissor :paper]])
(defn play [hand1 hand2]
(run* [result]
(conde
@azolotko
azolotko / core_logic_project.clj
Last active December 19, 2015 07:09
Add clojure.core.logic to the project.clj
(defproject rock-paper-scissors "0.1.0-SNAPSHOT"
; ...
:dependencies [[org.clojure/clojure "1.5.1"]
[org.clojure/core.logic "0.8.3"]])
@azolotko
azolotko / lein_new.sh
Created July 3, 2013 09:17
Tell Leiningen to create a new project
lein new rock-paper-scissors
cd rock-paper-scissors/
package jvmjit;
public class JvmJit {
static long startTime = System.nanoTime();
public static void main(String[] args) {
Test0 me = new Test0();
while (true) {
me.runHello();
}
@azolotko
azolotko / start_repl.sh
Last active December 11, 2015 10:08
Start REPL and test WebDriver
lein repl
@azolotko
azolotko / lein_deps.sh
Created January 21, 2013 08:14
Tell Leiningen to update dependencies
lein deps
@azolotko
azolotko / fetch_phantomjs.sh
Last active December 11, 2015 10:08
Download and unpack PhantomJS
curl https://phantomjs.googlecode.com/files/phantomjs-1.9.1-linux-x86_64.tar.bz2 | tar xvj