Skip to content

Instantly share code, notes, and snippets.

(def detectives {:columbo "frank"
:morse "endeavour"
:holmes "sherlock"})
@adamneilson
adamneilson / gist:1e3f73231ddf8daf0937c0bd81d6a222
Last active March 30, 2018 12:03
Vertically align values in a hashmap
" Vertically align values in a hashmap
map <C-a> vi{ga-<Space><CR>

Clojure Developer

Do you have the talent to join multi-award winning startup WeFarm?

We are a unique social enterprise providing a vital service for the world's 500 million smallholder farmers who live and work without internet access. This pioneering, peer-to-peer platform enables farmers to access crowdsourced information by SMS, creating social impact on a groundbreaking scale and generating a game-changing data feed through the use of cutting edge AI techniques.

In just one year WeFarm has scaled to more than 72,000 farmers across Kenya, Uganda and Peru, has facilitated over 11.5 million interactions and featured in the FT, Forbes, Wired.co.uk, as well as winning awards from [Google's Impact Challenge](https://impactchallenge.withgoogle.

[
;; ----- User type -----
{:db/id #db/id[:db.part/db]
:db/ident :user/name
:db/valueType :db.type/string
:db/cardinality :db.cardinality/one
:db/doc "A users name"
:db/unique :db.unique/identity
@adamneilson
adamneilson / the.css
Last active December 27, 2015 22:09
Keep varying shaped images looking sweet in a grid (for junkey)
.thumb-container {
width: 266px;
height: 177px;
overflow: hidden;
position: relative;
}
.thumb {
position: absolute;
}
@adamneilson
adamneilson / gist:7230370
Created October 30, 2013 10:31
Generates available domain names
#!/usr/bin/python -O
import random
import string
import subprocess
import threading
import time
# get a list of words with only ASCII characters, and surround them with ^ and $ to demarcate the word boundaries
words = [w.strip().lower() for w in open("/usr/share/dict/words").readlines()]
words = ["^" + w + "$" for w in words if w != "" and all([c in string.ascii_lowercase for c in w])]
##################################
## ROUTE WWW TO ROOT FOR SEO
##################################
server {
listen 80;
server_name www.junkey.com;
# forward everything from www.junkey.com to junkey.com
return 301 $scheme://junkey.com$request_uri;
}
(langohr.core/connect {
:username "harvey"
:password "Elwood"
:host "bunny.junkey.com"
:virtual-host "/"
:port 5672
:type "direct"
:exchange "sorting-room"
:queue "po-box"
:durable true
(let [conn (langohr.core/connect)]
(comment do-stuff))