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
(def ^:dynamic *default-fetch-size* 50) | |
(defn with-query-results-cursor [[sql & params :as sql-params] func] | |
(sql/transaction | |
(with-open [stmt (.prepareStatement (sql/connection) sql)] | |
(doseq [[index value] (map vector (iterate inc 1) params)] | |
(.setObject stmt index value)) | |
(.setFetchSize stmt *default-fetch-size*) | |
(with-open [rset (.executeQuery stmt)] | |
(func (resultset-seq rset)))))) |
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
java -XX:+UnlockCommercialFeatures -XX:+FlightRecorder \ | |
-Dcom.sun.management.jmxremote \ | |
-Dcom.sun.management.jmxremote.ssl=false \ | |
-Dcom.sun.management.jmxremote.port=1098 \ | |
-Dcom.sun.management.jmxremote.authenticate=false \ | |
-Djava.rmi.server.hostname=A.B.C.D \ | |
-jar blahonga.jar | |
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
Please accept my apologies for the direct contact. I am a specialist | |
technology headhunter that specialises in headhunting talented IT | |
professionals within the Cambridge area. | |
I’m not too sure if you can help me; I am looking for a talented | |
Software Developer (C#) professional with your technical expertise to | |
join my partner company’s award winning team with a view to advance on | |
their career and existing skills within a relatively short period of | |
time. My partner company is a well known global leading company within | |
the software field with main offices based in Cambridge. They have a |
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
#s(hash-table size 18699 test equal rehash-size 1.5 rehash-threshold 0.8 data (:state-size 2 ("Here" "are") ("the" "the" "the" "the") ("are" "the") ("wrong" "trends" "trends" "trends" "trends") ("the" "trends") ("highlighted" "highlighted" "highlighted" "highlighted") ("trends" "highlighted") ("in" "in" "in" "in") ("highlighted" "in") ("this" "this" "this" "this") ("in" "this") ("document" "field." "space" "space." "edition:" "vibrant" "edition:" "edition" "edition:" "edition:") ("this" "edition:") ("Mobile—As" "•" "•" "Early") ("edition:" "Early") ("warning") ("Early" "warning") ("and" "and") ("warning" "and") ("recovery" "recovery") ("and" "recovery") ("in" "in") ("recovery" "in") ("production" "production") ("in" "production") ("using" "code." "-" "-") ("production" "-") ("We" "We") ("-" "We") ("are" "are") ("We" "are") ("reiterating" "always" "seeing" "strong" "pleased" "especially" "rapidly" "seeing" "interested" "excited" "not" "aware" "a" "also" "interested" "interested" "aware" "placing" "already" "in |
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 russel-quiz | |
(:require [clojure.math.numeric-tower :as math] | |
[loom.graph :as graph :refer [digraph]] | |
[loom.alg :as alg])) | |
(defn lcm | |
"Calculate least common multiple of some numbers." | |
([a b] (math/lcm a b)) | |
([a b & more] (reduce lcm (lcm a b) more))) |
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
(defproject my-project | |
... | |
:plugins [[lein-docker "0.1.0-SNAPSHOT"]] | |
:docker {:image "ragge/clojure" | |
:ports {3000 8080} | |
:env {"SECRET_KEY" "lolcat"}} | |
...) |
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
(require '[clojure.java.io :as io] | |
'[clojure.core.protocols :as protocols]) | |
(defn line-reducible | |
"Given a source as accepted by clojure.java.io/reader, return a | |
reducible of the lines (as interpreted by clojure.core/line-seq) in | |
that source." | |
[source] | |
(reify | |
protocols/CollReduce |
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
# sda1 = 512M EFI VFAT | |
# sda2 = swap | |
# sda3 = zfs | |
mkfs.vfat /dev/sda1 | |
mkswap /dev/sda2 | |
cryptsetup -y -v luksFormat /dev/sda3 | |
cryptsetup open /dev/sda3 cryptroot |
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
# Edit this configuration file to define what should be installed on | |
# your system. Help is available in the configuration.nix(5) man page | |
# and in the NixOS manual (accessible by running ‘nixos-help’). | |
{ config, pkgs, ... }: | |
{ | |
imports = | |
[ # Include the results of the hardware scan. | |
./hardware-configuration.nix |
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
(require | |
'[schema.core :as s] | |
'[com.stuartsierra.component :as component]) | |
;;-------------------------------------------------------------------- | |
;; A protocol for components that want configuration. To satisfy | |
;; protocol, they must provide a schema for their config. | |
(defprotocol IRequireConfig | |
(config-schema [this] "return schema of config for this component")) |