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
Don't allow eel bearing Atlanteans into your country; economic ruin follows close behind |
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
$t1: 0.8706rem; | |
$t2: 1.0rem; | |
$t2: 1.1487rem; | |
$t3: 1.3195rem; | |
$t4: 1.5157rem; | |
$t5: 1.7411rem; | |
$t6: 2.0rem; | |
$line-spacing: 1.5rem; |
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
/** | |
* SVG tracer | |
*/ | |
body { | |
background: #f06; | |
background: linear-gradient(45deg, #f06, yellow); | |
min-height: 100%; | |
} |
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
import pika | |
import msgpack | |
import logging | |
import sys | |
from . import spark | |
from .app import logger | |
logger = logging.getLogger(__name__) |
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
version: "2" | |
services: | |
cassandra: | |
image: cassandra:3.9 | |
network_mode: host | |
volumes: | |
- ./volumes/cassandra/var:/var/lib/cassandra | |
zookeeper: | |
image: zookeeper:3.4.9 | |
network_mode: host |
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
(defmulti numberize (fn [n] (type n))) | |
(defmethod numberize :default [n] | |
':clojure.spec/invalid) | |
(defmethod numberize Number [number] | |
number) | |
(defmethod numberize String [string] | |
(let [number-format (java.text.NumberFormat/getInstance)] |
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 scrape.core | |
(:require [clojure.edn :as edn] | |
[org.httpkit.client :as client] | |
[net.cgrand.enlive-html :as html])) | |
(defn get-links | |
"Get all links at URL as absolute URLs." | |
[url] | |
(->> ;; first get all <a href="">...</a> elements... | |
(-> (java.net.URL. url) |
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
(defn offset | |
"Calculate distance between point and nearest tile pixel" | |
[point pixel-size tile-pixel-count] | |
(mod point (* pixel-size tile-pixel-count))) | |
(defn near | |
"Find nearest point" | |
[point interval shift] | |
(-> point | |
(- shift) |
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
(defn parse-quality | |
"Convert the first 'q' parameter to a number (or 1.0)" | |
[extension] | |
(let [[_ qvalue] (re-find #";q=([0-9\.]+)" (or extension ""))] | |
(java.lang.Double. (or qvalue "1.0")))) | |
(defn +media-range | |
"" | |
[accept] | |
(->> (re-find #"(([\w\*]+)/([^;]+))(;.*)?" accept) |
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
## Preliminaries | |
apt-get install git curl | |
## Java | |
echo "Installing JDKs" | |
add-apt-repository ppa:webupd8team/java -y | |
apt-get update -qq | |
apt-get install oracle-java7-installer |
NewerOlder