Skip to content

Instantly share code, notes, and snippets.

View nick-orton's full-sized avatar

Person nick-orton

View GitHub Profile
@nick-orton
nick-orton / Python-setup-notes.md
Last active June 25, 2017 16:54
Setting up Atom editor for Python stuff

Keybase proof

I hereby claim:

  • I am nick-orton on github.
  • I am no (https://keybase.io/no) on keybase.
  • I have a public key whose fingerprint is A779 E43A 980A F130 FC00 911D FA9A B11D 2A48 AB24

To claim this, I am signing this object:

data:text/html, <style type="text/css">#e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div id="e"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("e");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/clojure");</script>
@nick-orton
nick-orton / arch-config.md
Created July 5, 2012 01:57
arch installation 7/4/12

My Arch Configuration

These are the instructions for setting up an Arch Linux box the way I like it. This setup includes X windows using xmonad, mpd, zsh, vim, screen, and cups.

Install from CD

  • Choose core-local packages and vi as editor.
  • Set the time and zone.
@nick-orton
nick-orton / sequencer.clj
Created July 30, 2011 03:23
dirty sequencer
(def metro (metronome 128))
(def sequencer {0 [kick]
0.5 [c-hat]
1 [kick snare]
1.5 [c-hat]
2 [kick]
2.5 [c-hat]
3 [kick snare]
3.5 [c-hat]})
@nick-orton
nick-orton / lazy.java
Created June 8, 2011 01:06
Lazy Evaluation
Operation
Result apply(Object element)
void stack(Operation operation)
Result
void apply(Collection c)
Chain.evaluate()
Collection c = Create.newCollection()
@nick-orton
nick-orton / deftype-doc-string.clj
Created May 13, 2011 06:12
marginalia ignoring deftype doc strings
(deftype TestDeftypeDocstring
"This doc string does not appear on the left hand side of the uberdoc on Marginalia 0.5.1"
[state]
Object
(toString [self]
(str "Bag: " (:state self))))
@nick-orton
nick-orton / pop-if.clj
Created January 30, 2011 02:50
remove the top element if predicate matches
(defn pop-if
[predicate stack]
(if (predicate (first stack))
(rest stack)
stack))
@nick-orton
nick-orton / arrow.clj
Created January 30, 2011 02:44
when calls are 3 deep or more then use arrow
(lambda3
(lambda2 (lambda1 arg1) arg2))
(-> (lambda1 arg1)
(lambda2 arg2)
(lambda3))
@nick-orton
nick-orton / test.clj
Created January 30, 2011 02:39
assert false
(use 'clojure.test)
(defmacro isnt [thing]
`(is (not ~thing)))