Skip to content

Instantly share code, notes, and snippets.

View jeroenvandijk's full-sized avatar

Jeroen van Dijk jeroenvandijk

View GitHub Profile
#######################
#### DOCUMENTATION ####
#######################
#
# Run as:
#
# ruby phonegap-sc.rb APP_NAME
# ruby phonegap-sc.rb APP_NAME PROJECT_PATH
# ruby phonegap-sc.rb APP_NAME PROJECT_PATH OUTPUT_PATH
#
@jeroenvandijk
jeroenvandijk / tired.rb
Created May 29, 2011 13:03 — forked from karmi/tired.rb
Template for generating a no-frills Rails application with support for ElasticSearch full-text search via the Tire gem
# ===================================================================================================================
# Template for generating a no-frills Rails application with support for ElasticSearch full-text search via Tire
# ===================================================================================================================
#
# This file creates a basic, fully working Rails application with support for ElasticSearch full-text search
# via the Tire gem [http://github.com/karmi/tire].
#
# You DON'T NEED ELASTICSEARCH INSTALLED, it is installed and launched automatically by this script.
#
# Requirements
@jeroenvandijk
jeroenvandijk / Questions
Created September 6, 2011 10:43
GOTO Amsterdam
Day job: Software developer (mainly web)
What is your language of choice: Ruby
Open Source contributions: capybara-mechanize (self started), occasional contributions to Rails and many others projects
How do you use GitHub: As inspiration, as Git host for my open source projects and my company is using Git for private projects
;; Copyright Jason Wolfe and Prismatic, 2013.
;; Licensed under the EPL, same license as Clojure
(use 'plumbing.core)
(require '[clojure.java.shell :as shell]
'[clojure.string :as str])
(import '[java.util HashSet] '[java.io File])
(defn double-quote [s] (str "\"" s "\""))
(ns cl-graph
(:refer-clojure :exclude [==])
(:use clojure.core.logic))
;; Directed Acyclic Graphs
(defrel edge a b)
;; a
;; |
#!/bin/bash
###############################################
# To use:
# https://raw.github.com/gist/2776351/???
# chmod 777 install_postgresql.sh
# ./install_postgresql.sh
###############################################
echo "*****************************************"
echo " Installing PostgreSQL"
echo "*****************************************"

Docker Cheat Sheet

Why

Why Should I Care (For Developers)

"Docker interests me because it allows simple environment isolation and repeatability. I can create a run-time environment once, package it up, then run it again on any other machine. Furthermore, everything that runs in that environment is isolated from the underlying host (much like a virtual machine). And best of all, everything is fast and simple."

TL;DR, I just want a dev environment

(use '[datomic.api :only [q db] :as d])
(def uri "datomic:mem://accounts")
;; create database
(d/create-database uri)
;; connect to database
(def conn (d/connect uri))
@jeroenvandijk
jeroenvandijk / sat.clj
Last active August 29, 2015 14:14 — forked from jmgimeno/sat.clj
;Code from http://peteriserins.com/2011/12/23/sat-in-clojure-core-logic.html
;; lein try org.clojure/core.logic "0.8.8"
(require '[clojure.core.logic :refer [conde run* fresh ] :as l])
(declare goalify)
(defn and-rewrite [expr]
`(conde
@jeroenvandijk
jeroenvandijk / group_by.clj
Last active October 1, 2015 07:56 — forked from fxposter/group_by.clj
group-by as a transducer
(defn group-by
([f]
(fn [rf]
(let [grouped-value (volatile! (transient {}))]
(fn
([] (rf))
([result]
(rf result (persistent! @grouped-value)))
([result input]
(let [key (f input)]