Skip to content

Instantly share code, notes, and snippets.

Note

This is my dot-file, therefore it’s prone to have broken-ness in it. I’m trying to clean it up and make sure it’s sane.

Things currently not the way i’d like

  • escreen is nice, but i have to init it each time and set it up to use it… i’d like a working revive+ config, but I haven’t gotten it working correctly yet. see my twittering section for an example of how i use excreen

Org-Mode_Plus_Calc_Plus_Macro_Magic

Know thy tools, to know thyself

Emacs has some incredibly powerful tools by themselves, but combined you can have superpowers.

example

ÿØÿàJFIFHHÿÛC

   ÿÛC   ÿÂ@kÿÄÿÄÿÚ þ© À š8Í
@hhutch
hhutch / maze.clj
Last active August 29, 2015 14:22 — forked from cgrand/maze.clj
; http://groups.google.com/group/clojure/browse_thread/thread/974e2c7f89e27231/5f4bff3e58dfa36f
; output images http://i.imgur.com/gSASS.png (square maze)
; http://i.imgur.com/uEqaq.png (hex maze)
;; generic Wilson's algorithm implementation
(defn maze
"Returns a random maze carved out of walls; walls is a set of
2-item sets #{a b} where a and b are locations.
The returned maze is a set of the remaining walls."
[walls]
(ns maze.core)
(def *size* 20)
(defn walk [start]
(iterate (fn [[x y]]
(first (shuffle (filter (fn [lst]
(every? (fn [k]
(< -1 k *size*))
lst))
;; Datomic sample code
;; schema query for attribute types in specified namespaces
(q '[:find ?attr
:in $ [?include-ns ...] ;; bind ?include-ns once for each item in collection
:where
[?e :db/valueType] ;; all schema types (must have a valueType)
[?e :db/ident ?attr] ;; schema type name
[(datomic.Util/namespace ?attr) ?ns] ;; namespace of name
[(= ?ns ?include-ns)]] ;; must match one of the ?include-ns
@hhutch
hhutch / gist:ea2496e23add73deb12e
Created August 6, 2015 13:27
great cross-language explanation of a tuple
bhuga_is_too_long_to_ [8:26 PM]
there is no limit to the number of things in a tuple. they are indeed the same as an array
bhuga_is_too_long_to_ [8:27 PM]
tuple is just a word that expresses that the array is expected to have a given length (2-tuple, 3-tuple, 4-tuple, etc), and that each element of the array is of an expected type in an expected location
bhuga_is_too_long_to_ [8:27 PM]
you can make a tuple type out of this concept, wrapping the array. nothing wrong with that either
bhuga_is_too_long_to_ [8:28 PM]
@hhutch
hhutch / fib.clj
Last active September 15, 2015 22:13 — forked from nasser/fib.clj
Fibonacci sequence in Clojure/LLVM
;; https://pauladamsmith.com/blog/2015/01/how-to-get-started-with-llvm-c-api.html
(import LLVM
LLVMModuleRef
LLVMTypeRef
Wrap
LLVMBool
LLVMLinkage)
(def genstr (comp str gensym))