- The best tutorials are in the introductory books. See below.
- Getting Started with Clojure - A detailed tutorial on getting a modern (as of Jan 2013) Clojure workflow going.
- Emacs Live is a nice development environment based on Emacs.
- Understanding The Clojure Development Ecosystem
- Clojure Docs Site is a community-driven doc site with good tutorials, and reference material going somewhat deeper than individual API docs.
- Functional Programming for the Rest of Us is a classic introduction to functional thinking
- [A comprehensive article on namespaces and different ways of requiring them](http://blog.8thlight.com/colin-jones/2010/12/05/clojure-libs-and-namespaces-require-use-import-and-ns.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns linkedin-clojure.handler | |
(:use compojure.core) | |
(:require [compojure.handler :as handler] | |
[compojure.route :as route] | |
[hiccup.page :as hpage] | |
[hiccup.form :as form] | |
[cheshire.core :as parse] | |
[ring.util.response :as response] | |
[clj-http.client :as client])) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/tclsh8.5 | |
# | |
# Usage: git-unmerged branch1 branch2 | |
# | |
# Shows all the non-common commits in the two branches, where non-common | |
# commits means simply commits with a unique commit *message*. | |
proc getlog branch { | |
lrange [split [exec git log $branch --oneline] "\n"] 0 400 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public boolean hkid_check_digit(String id){ | |
if (id.matches("[A-Z]\\d{6}-[\\d|A]") == false) { | |
msgMgr.reportException("身份証號格式錯誤,X123456-X", true); | |
return false; | |
} | |
/* | |
* check digit, A=10, B=11, ... Z=35 | |
* the 9th weight == 36, google: another one is 58. | |
* |
This gist is a collection of my rough notes from Strange Loop 2012.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package object mail { | |
implicit def stringToSeq(single: String): Seq[String] = Seq(single) | |
implicit def liftToOption[T](t: T): Option[T] = Some(t) | |
sealed abstract class MailType | |
case object Plain extends MailType | |
case object Rich extends MailType | |
case object MultiPart extends MailType |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
colin:/tmp/ $ cat ~/.lein/profiles.clj | |
{ | |
:1.2 { :dependencies [[org.clojure/clojure "1.2.0"]] } | |
:1.3 { :dependencies [[org.clojure/clojure "1.3.0"]] } | |
:1.4 { :dependencies [[org.clojure/clojure "1.4.0"]] } | |
} | |
colin:/tmp/ $ lein with-profile 1.3 repl | |
Performing task 'repl' with profile(s): '1.3' | |
nREPL server started on port 50952 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
王 | |
江 | |
周 | |
胡 | |
刘 | |
李 | |
吴 | |
毛 | |
温 | |
习 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
王 | |
江 | |
周 | |
胡 | |
刘 | |
李 | |
吴 | |
毛 | |
温 | |
习 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
# |