Instantly share code, notes, and snippets.

View DYLD_LIBRARY_PATH
export DYLD_LIBRARY_PATH=/usr/local/opt/gdal2/lib:$DYLD_LIBRARY_PATH
View SketchSystems.spec
My Awesome Sketch
First State
some event -> Second State
Second State
click -> First State
View create.sh
#! /usr/bin/env bash
# Insert a USB key.
# if needed initialize it with MS/DOS FAT and MBR
# Download the Mint ISO image
# Convert the ISO -> IMG
hdiutil convert -format UDRW -o linuxmint-18.3-cinnamon-64bit linuxmint-18.3-cinnamon-64bit.iso
# Run a diskutil list to know the device for the USB key, e.g.: /dev/disk3
View keybase.md

Keybase proof

I hereby claim:

  • I am zcaudate on github.
  • I am zcaudate (https://keybase.io/zcaudate) on keybase.
  • I have a public key ASCGkiFF1W_OVVZqtwQZXTIGgu8XZivaCKUZ3rL3jBrRXAo

To claim this, I am signing this object:

View speed_test.clj
(defrecord Simple [value])
(deftype Basic [value])
(with-out-str
(time
(dotimes [i 100000000]
(set! (Basic. i) :value (* 2 i)))))
View count.clj
(defn count-elements [coll1 coll2]
(+ (count coll1) (count coll2) 1))
(defn count-elements-tester [f]
(let [n (rand-int 6)
m (rand-int 6)
output (+ n m)
inputs [(range n) (range m)]
actual (apply f inputs)]
(if (= actual output)
View stats.py
(import [bs4 [BeautifulSoup]]
[operator [itemgetter]]
requests)
(defn project-links [username]
(let [[url (+ "https://clojars.org/users/" username)]
[res (requests.get url)]
[soup (BeautifulSoup res.text)]
[links (-> (soup.find "h1")
(.find-next "h1")
View hara.concurrent.workflow
(ns hara.concurrent.workflow
(:require [hara.common.checks :refer [hash-map? promise?]]
[hara.common.primitives :refer [uuid]]
[hara.data.nested :refer [merge-nil-nested]]
[clojure.set :as set]))
(defn create-registry []
(atom {:tickets {}
:tasks {}
:active #{}
View cassius topology
(def db (connect host port
{:schema {"app" ^{:strategy_class "NetworkTopologyStrategy"
:strategy_options {"dc1" 3, "dc2" : 2}}
{"Users" {"name" ^{:index_type :key
:index_name "user_name_idx"}
[:utf-8]
"age" [:long]}}}})))
View gist:9609112
var CLOSURE_NO_DEPS = true;
var COMPILED = false;
var goog = goog || {};
goog.global = this;
goog.DEBUG = true;
goog.LOCALE = "en";
goog.TRUSTED_SITE = true;
goog.provide = function(name) {
if (!COMPILED) {
if (goog.isProvided_(name)) {