Skip to content

Instantly share code, notes, and snippets.

View zonpantli's full-sized avatar

Miika Pihlaja zonpantli

View GitHub Profile
@jeroenvandijk
jeroenvandijk / postgres.clj
Created July 19, 2012 09:39
Cascalog JDBC example
(ns queries.postgres
(:gen-class)
(:require [cascalog.ops :as c])
(:use [cascalog.api])
(:import [com.twitter.maple.jdbc JDBCTap JDBCScheme TableDesc]
[cascading.tap.SinkMode]))
(defn db-tap [table]
(let [tap (com.twitter.maple.jdbc.JDBCTap.
"jdbc:postgresql://my-db-uri?ssl=true&sslfactory=org.postgresql.ssl.NonValidatingFactory"
@camertron
camertron / measure.rb
Created June 15, 2012 22:48
Measure the memory taken by a Ruby object (by Robert Klemme)
#!/bin/env ruby
# lazy hack from Robert Klemme
module Memory
# sizes are guessed, I was too lazy to look
# them up and then they are also platform
# dependent
REF_SIZE = 4 # ?
OBJ_OVERHEAD = 4 # ?

(a gist based on the old toolmantim article on setting up remote repos)

To collaborate in a distributed development process you’ll need to push code to remotely accessible repositories.

This is somewhat of a follow-up to the previous article setting up a new rails app with git.

For the impatient

Set up the new bare repo on the server: