- GVim
- tmux (for vim-dispatch)
- Clojure
- Leiningen 2
- drip (https://github.com/flatland/drip)
Vim Plugins
Vim Plugins
Bush league is a general term used to describe an action or thing as being amateur, inferior or crude. In a literal sense, it refers to a low quality minor-league in baseball not associated with any of the major league teams. The term originated from the state of minor-league fields that often were ringed with shrubs and bushes.
- Wikipedia
int value = getValue();
String valStr = value + "";
| public Result processCommand(Data data) { | |
| try { | |
| return doStuff(); | |
| // fuck it, just catch everything | |
| } catch (Exception ex) { | |
| String message = ex.getMessage() != null ? message : "LOL OOPS!"; | |
| return new Result(message); | |
| } | |
| } |
| ;; See https://twitter.com/stevelosh/status/269269366992936960 | |
| (defn multi-update [m updates] | |
| (reduce (fn [m [k f & args]] | |
| (update-in m k #(apply f % args))) | |
| m updates)) | |
| ;; user=> (multi-update {:a 1 :b 2 :c 3} [[[:a] 1 1 1][[:b] 1 1][[:c] 3 1 -2]]) | |
| ;; {:a 4, :c 5, :b 4} |
| import java.io.*; | |
| import java.util.concurrent.atomic.AtomicInteger; | |
| /** | |
| * http://stackoverflow.com/q/12321837/7507 | |
| */ | |
| public class GetLatestBuildNumber { | |
| private static final AtomicInteger number = new AtomicInteger(); |
| ;; See http://stackoverflow.com/questions/12066020/in-clojure-why-i-need-to-write-doc-str-but-meta-str | |
| ;; Define a var foo that points to a function | |
| (def foo (with-meta (fn [] (println "bar")) {:doc "prints bar"} )) | |
| ;=> #'user/foo | |
| (foo) | |
| ;=> bar | |
| ;=> nil | |
| ;; We see the :doc in our foo metadata...but where's our REPL documentation? |
Presented by @stuartsierra
Stuart presented using a deck created with org-html-slideshow, a Clojure library for formatting org-mode notes as HTML slides.
| ;; Robot from Joy of Clojure, Ch 7 | |
| (def bearings [{:x 0 :y 1} ; move north | |
| {:x 1 :y 0} ; move east | |
| {:x 0 :y -1} ; move south | |
| {:x -1 :y 0}]) ; move west | |
| (defn bot [x y bearing-num] | |
| {:coords [x y] | |
| :bearing ([:north :east :south :west] bearing-num) | |
| :forward (fn [] (bot (+ x (:x (bearings bearing-num))) |
| ;; adopted from http://www.datomic.com/company/resources/getting-started | |
| ;; Clojure 1.4.0 | |
| ;; user=> | |
| (use '[datomic.api :only [q db] :as d]) | |
| ;;=> nil | |
| ;; user=> | |
| (doc d/q) | |
| ;; ------------------------- |
| #!/bin/sh | |
| # Futile attempts keep BUG below to not potentially exit the script. | |
| set +e +E | |
| trap '' ERR | |
| # displays the prompt in light cyan. | |
| # TODO: http://stackoverflow.com/q/6788777/7507 | |
| echo -e "\e[00;36mEnter expressions, [Ctrl-C] to exit\e[00m" |