Skip to content

Instantly share code, notes, and snippets.

View mjul's full-sized avatar

Martin Jul mjul

View GitHub Profile
@maacl
maacl / dates.clj
Created December 7, 2022 23:53
Date fun
shadow.user> (->
(t/local-date 2004 2 29)
(t/plus (t/years 1) (t/days 1)))
;; => #object[java.time.LocalDate 0x75a742c8 "2005-03-01"]
shadow.user> (->
(t/local-date 2004 2 28)
(t/plus (t/years 1) (t/days 1)))
;; => #object[java.time.LocalDate 0x12132de3 "2005-03-01"]
shadow.user> (->
(t/local-date 2004 2 29)
@lelandbatey
lelandbatey / whiteboardCleaner.md
Last active April 25, 2024 02:01
Whiteboard Picture Cleaner - Shell one-liner/script to clean up and beautify photos of whiteboards!

Description

This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"

Results

@weavejester
weavejester / gist:1001206
Created May 31, 2011 20:27
Clojure on Heroku
~/$ lein new ring-on-heroku
Created new project in: /home/jim/Development/ring-on-heroku
~/$ cd ring-on-heroku
~/ring-on-heroku$ echo 'web: lein run -m ring-on-heroku.core' > Procfile
~/ring-on-heroku$ cat > src/ring_on_heroku/core.clj
(ns ring-on-heroku.core
(:use ring.util.response
ring.adapter.jetty))
(defn app [req]