Skip to content

Instantly share code, notes, and snippets.

@ddillinger
ddillinger / keybase.md
Created September 5, 2017 14:24
keybase.md

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

@ddillinger
ddillinger / gist:5154002
Created March 13, 2013 16:49
every clojure project name. ALL OF THEM.
$ egrep ".*ure$" /usr/share/dict/words | sed -e "s/ure/jure/"
abatjure
abbreviatjure
abjjure
acclimatjure
acrocontractjure
actjure
acuclosjure
acupressjure
>>> db_cluster_list = ["has foo in it", "doesn't match", "has bar in it", "also doesn't match", "also has foo in it", "nothing to see here"]
>>> cluster_ignore_list = ("foo", "bar")
>>> filter(lambda x: [y for y in cluster_ignore_list if y in x], db_cluster_list)
['has foo in it', 'has bar in it', 'also has foo in it']
this short circuits:
>>> def found(x):
... for item in cluster_ignore_list:
... if item in x:
@ddillinger
ddillinger / snet.java
Created April 13, 2012 14:46
snet vs public
public void useSnet(){
if(snet){
}
else{
snet = true;
if(storageURL != null){
storageURL = snetAddr + storageURL.substring(8);
}
}
}
@ddillinger
ddillinger / stephano_zvp.txt
Created April 11, 2012 16:41
Stephano style ZvP
Stephano-style ZvP http://drop.sc/134488
14/15 Pool
15 Hatch
Queen x2
Lings x1
23 Hatch
Queen
40 Lings x2
40 Gas x1
@ddillinger
ddillinger / wat.clj
Created April 11, 2012 13:52
Clojure wat
user=> (def bs '[a 1 b 2])
#'user/bs
user=> (type bs)
clojure.lang.PersistentVector
user=> (vector? bs)
true
user=> (let bs (+ a b))
java.lang.IllegalArgumentException: let requires a vector for its binding (NO_SOURCE_FILE:0)
@ddillinger
ddillinger / gist:2258880
Created March 31, 2012 03:04
Conkeror on Unity
ddillinger@ip-10-150-36-33:~> ./test-query.sh
./test-query.sh
API Location: https://api.dev.discoverstor.net
Account ID: fbc7d50f-bda0-4534-94e9-e65a2b52d692
User: sonian
Password: sonian123
Query: (and (contains body \"S\"))
API Token: https://api.dev.discoverstor.net/fbc7d50f-bda0-4534-94e9-e65a2b52d692/auth/v1/sessions/de6fd20c-ee5c-4637-989b-752fabf32831