Skip to content

Instantly share code, notes, and snippets.

Avatar

Chris Oakman oakmac

View GitHub Profile
@oakmac
oakmac / out.txt
Created May 14, 2015
PROS 10 Days of JavaScript, Day 8 Script
View out.txt
oakmac@oakmac-desktop:~$ node puzzle.js
75 total option objects
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Mon: George Bixby, Marketing, Apple
Tue: Michael Crawford, Finance, Windows
Wed: John Maxwell, Customer Service, Apple
Thu: Elliot Almond, Manufacturing, Windows
Fri: Harvey Grace, Engineering, Windows
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2373046875 total option combinations
@oakmac
oakmac / index.html
Last active Aug 29, 2015
Example of Layering Technique for z-indexed menus
View index.html
<!doctype html>
<html lang="en-us">
<head>
<meta charset="utf-8" />
<meta content="IE=edge" http-equiv="X-UA-Compatible" />
<title>z-index Layering Example</title>
<style>
* {
margin: 0;
padding: 0;
View test-case.cljs
```in
(defn foo [x]
(bar) ;; comment1
(baz) ;; comment2
```
```out
(defn foo [x]
(bar) ;; comment1
(baz)) ;; comment2
View multi-arity-test.clj
;; this input
(defn foo
([x] (foo x nil))
([x y]
(bar x (if y y {}))))
;; produces this output when ran through parinfer
(defn foo
([x] (foo x nil))
([x y
@oakmac
oakmac / styles.less
Created Dec 15, 2015
italicize clojure symbols in Atom
View styles.less
atom-text-editor::shadow {
span.meta.symbol.clojure {
font-style: italic;
}
}
@oakmac
oakmac / out.txt
Created Dec 24, 2015
Python Indent Mode tests pass!
View out.txt
Running Indent Mode tests...
Test 7 was a success.
Test 21 was a success.
Test 35 was a success.
Test 49 was a success.
Test 63 was a success.
Test 87 was a success.
Test 97 was a success.
Test 111 was a success.
Test 121 was a success.
View gist:af588c44007fe6c7ad51
oakmac@oakmac-desktop:~/parinfer.py$ python tests.py
..
----------------------------------------------------------------------
Ran 2 tests in 0.073s
OK
oakmac@oakmac-desktop:~/parinfer.py$
View gist:6a3b637fc11ac3c19758
oakmac@oakmac-desktop:~/parinfer.py$ python perf.py
Testing file with 2864 lines
Indent Mode: 1.288776 s
Paren Mode: 1.374673 s
oakmac@oakmac-desktop:~/parinfer.py$ python perf.py
Testing file with 2864 lines
Indent Mode: 1.3307 s
Paren Mode: 1.394969 s
oakmac@oakmac-desktop:~/parinfer.py$ python perf.py
Testing file with 2864 lines
View gist:8106867
(def people [
{
:first-name "Phil"
:last-name "Gambling"
:age 31
}
{
:first-name "Chris"
:last-name "Pounds"
:age 26
View gist:8106856
var people = [
{
firstName: 'Phil',
lastname: 'Gambling',
age: 31
},
{
firstName: 'Chris',
lastName: 'Pounds',
age: 26