;; For supporting more PG types, see https://github.com/remodoy/clj-postgresql | |
(ns pg-test.types | |
(:require [cheshire.core :as json] | |
[clojure.java.jdbc :as jdbc]) | |
(:import [org.postgresql.util PGobject] | |
[java.sql PreparedStatement])) | |
;; Writing | |
(defn- to-pg-json [data json-type] |
A list of commonly asked questions, design decisions, reasons why Clojure is the way it is as they were answered directly by Rich (even when from many years ago, those answers are pretty much valid today!). Feel free to point friends and colleagues here next time they ask (again). Answers are pasted verbatim (I've made small adjustments for readibility, but never changed a sentence) from mailing lists, articles, chats.
How to use:
- The link in the table of content jumps at the copy of the answer on this page.
- The link on the answer itself points back at the original post.
We need to generate a unique SSH key for our second GitHub account.
ssh-keygen -t rsa -C "your-email-address"
Be careful that you don't over-write your existing key for your personal account. Instead, when prompted, save the file as id_rsa_COMPANY
. In my case, I've saved the file to ~/.ssh/id_rsa_work
.
These are my notes on instaling NixOS 16.03 on a Lenovo ThinkPad X1 Carbon (4th generation) with an encrypted root file system using UEFI.
Most of this is scrambled from the following pages:
(defn array-type | |
"Return a string representing the type of an array with dims | |
dimentions and an element of type klass. | |
For primitives, use a klass like Integer/TYPE | |
Useful for type hints of the form: ^#=(array-type String) my-str-array" | |
([klass] (array-type klass 1)) | |
([klass dims] | |
(.getName (class | |
(apply make-array | |
(if (symbol? klass) (eval klass) klass) |
(ns simplequest.core) | |
(defn -main | |
"I don't do a whole lot ... yet." | |
[& args] | |
(println "Hello, World!")) |
(defui Artist | |
static IQuery | |
(query [cl _] | |
[:db/id :artist/name]) | |
Object | |
(render [{:keys [props]}] | |
(dom/div nil (:artist/name props)))) | |
(defui ArtistList | |
static IQuery |
How to install Ubuntu 14.04.1 LTS 64-bit on a MacBook Pro Retina 15" Mid 2014 (11,3)
- Ubuntu 14.04 Desktop 64-bit ISO (default, non-Mac version)
http://www.ubuntu.com/download/desktop - UNetbootin
http://unetbootin.sourceforge.net/ - Broadcom 802.11 Linux STA wireless driver source dependencies
http://packages.ubuntu.com/trusty/all/dkms/download
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000