26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/_drafts/developing-clojurescript-with-figwheel.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | title: "The Coming Straight-Forwardness"
4 | published: true
5 | category:
6 | tags: []
7 | ---
8 |
9 | ## The Coming Straight-Fowardness
10 |
11 | My friend Peter of [Red Sky Shelters](http://redskyshelters.com/) asked
12 |
13 |
14 |
--------------------------------------------------------------------------------
/_drafts/notes.txt:
--------------------------------------------------------------------------------
1 | Notes for tryanny of domain state
2 |
3 | Elevating inputs from there current ephemeral status to the level of
4 | concrete transaction log is preferable.
5 |
6 | This transaction log should be semantic with regard to the
7 | interactions of the application. [:add-todo {:content "buy milk"}]
8 |
9 | Other levels of transaction granularity obscure the users intentions
10 | and mould the transactions into a more general api and thus or mask
11 | the users intention and reveal implementation details.
12 |
13 |
14 |
15 | Downgrading domain state from its current status as root of all truth
16 |
17 |
18 | Inputs
19 |
20 | All interactive programs have inputs. The average client side web
21 | application has many types of inputs.
22 |
23 | - user triggered events
24 | - callbacks from the server
25 | - various browser api callbacks
26 |
27 | These are all examples of inputs to our system.
28 |
29 | Example:
30 |
31 |
32 | Domain State
33 |
34 | The state that an application keeps stored in memory or otherwise to
35 | answer the questions that will be asked of the application. One
36 | general question is "What does the screen look like now?"
37 |
38 | Instances of Todo models and collections of activity feed models are
39 | all
40 |
41 |
42 |
43 | Inputs as Ephemeral
44 |
45 | - at the user interaction level we throw away the inputs
46 |
47 |
48 |
49 |
50 | Domain state regarded as primary
51 |
52 | - we have a preference for our domain models because we like to solve
53 | problems with things we can hold onto
54 |
55 | - we prefer domain state and gravitate towards those data structures
56 | that help us answer the questions that we are designing the
57 | application to answer. Only problem is that the questions change.
58 |
59 |
--------------------------------------------------------------------------------
/_layouts/covid.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
{{ page.title }}
7 |
8 |
9 |
10 |
12 |
13 |
14 |
15 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
71 |
72 | {{ content }}
73 |
74 |
96 |
97 |
98 |
111 |
112 |
113 |
--------------------------------------------------------------------------------
/_layouts/default.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
{{ page.title }}
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
43 |
44 | {{ content }}
45 |
46 |
69 |
70 |
71 |
72 |
85 |
86 |
87 |
--------------------------------------------------------------------------------
/_layouts/inline_edit_post.html:
--------------------------------------------------------------------------------
1 | ---
2 | layout: newdefault
3 | ---
4 |
{{ page.title }}
5 | {% if page.date %}
6 |
{{ page.date | date_to_string }}
7 | {% endif %}
8 |
9 | {{ content }}
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/_layouts/newdefault.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
{{ page.title }}
7 |
8 |
9 |
10 |
11 |
12 |
13 |
18 |
19 |
20 |
21 |
22 |
24 |
25 |
27 |
28 |
29 |
30 |
31 | {% if page.cssUrl %}
32 |
33 | {% endif %}
34 |
35 |
36 |
37 |
38 |
39 |
40 |
44 |
45 | {{ content }}
46 |
47 |
70 |
71 |
72 |
73 | {% if page.javascriptUrl %}
74 |
75 | {% endif %}
76 |
77 |
78 |
--------------------------------------------------------------------------------
/_layouts/post.html:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | ---
4 |
{{ page.title }}
5 | {% if page.date %}
6 |
{{ page.date | date_to_string }}
7 | {% endif %}
8 |
9 | {{ content }}
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/_posts/2010-02-10-console-for-sinatra-on-jruby-appengine.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: Console for Sinatra on jruby_appengine
4 | published: false
5 | ---
6 |
7 | So where is the console for your sinatra jruby app?
8 |
9 | This works when your_sinatra_app.rb is a Sinatra::Base app.
10 |
11 | appcfg.rb run -S irb -r your_sinatra_app.rb
12 |
13 |
--------------------------------------------------------------------------------
/_posts/2010-02-12-deleting-files-with-ido-in-emacs.html:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: Deleting files with ido in Emacs
4 | published: true
5 | listing_hide: true
6 | ---
7 | If you are using ido completion in emacs you can delete a file easily!
When ido is completing a file you can just type Ctrl-k and ido will
ask you if you want to delete it. Nice!
What is ido?
http://www.emacswiki.org/emacs/InteractivelyDoThings
8 |
--------------------------------------------------------------------------------
/_posts/2010-02-12-the-most-important-command-in-ido-for-emacs.html:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: The most important command in Ido for emacs
4 | published: true
5 | listing_hide: true
6 | ---
7 |
I have used Ido for a while with out reading the docs. There often comes a time when I want to create a file with a name that matches another file in the current directory.
The magic command is Ctrl-j
That will make a new file from the name you have just typed.
Now I am off to read the rest of the docs.
http://www.emacswiki.org/emacs/InteractivelyDoThings#toc2
8 |
--------------------------------------------------------------------------------
/_posts/2010-02-13-rm-rf-on-osx-doesn-t-remove-the-git-directory.html:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: rm -rf * on OSX doesn't remove the .git directory
4 | published: false
5 | ---
6 | You might think you just obliterated the project you were working on
with a careless rm -rf * But don't go off and start looking for good
noose making materials. Your .git directory is probably still there so
you can definitely fix things real quick.
You can at least get things back to where they were by saving your
open editor buffers and checking out files from the last commit.
Thank all that is good for this sane default.
I will never put off setting up a github repository for a project
again ... I will not ... I really hope I don't
7 |
--------------------------------------------------------------------------------
/_posts/2010-02-13-setting-width-and-height-of-paperclip-image-upload-on-create.html:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: Setting width and height of Paperclip image upload on create
4 | published: false
5 | listing_hide: true
6 | ---
7 |
I am really liking Paperclip . I like the fact that they have the ImageMagick shell commands baked right in. I also like the fact that they have processors that you can use to process an image further.
8 |
9 |
But it doesn't save the height and width to the model by default and I couldn't find smart code to do it so here is what I did:
10 |
--------------------------------------------------------------------------------
/_posts/2010-02-14-emacs-interactively-find-and-replace-string-patterns-on-multiple-files.html:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "Emacs: Interactively Find and Replace String Patterns on Multiple Files"
4 | published: true
5 | ---
6 | This is such an invaluable tutorial! I posted it before on twitter but here it is again:
7 |
8 | Call "dired" or "find-dired" to list files in dir and all subdirs.
9 | Mark the files you want. You can mark by regex by typing "%m"
10 | Type "Q" to call dired-do-query-replace-regexp.
11 | Type your find regex and replace string.
12 | For each occurance, type "y" to replace, "n" to skip, "!" for replacing all occurances in current file. Type "Ctrl +g "
13 | to abort the whole operation.
14 | To do the replacement on all files without further asking, type "Y". To skip all possible replacement on the rest of the current file, type "N". (These are Emacs 23 only)
15 | Call "ibuffer" to list all opened files.
16 | Type "*u" to mark all unsaved files, type "S" to save all marked files, type "D" to close them all.
17 |
18 |
19 |
There is a much more detailed guide on the page where I got these instructions here:
20 |
--------------------------------------------------------------------------------
/_posts/2010-02-14-making-factory-girl-do-what-you-thought-she-couldn-t.html:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: Making Factory_Girl do what you thought she couldn't
4 | published: false
5 | ---
6 |
You can add custom methods on your factory like this:
7 |
8 |
In this example the :outlets field is a has_many association and the outlet model has the belongs_to :outlet association.
9 |
Read more about this here:
10 |
http://conceptspace.wikidot.com/blog:39
11 |
--------------------------------------------------------------------------------
/_posts/2010-02-22-a-brilliant-way-to-do-templates-in-javascript-.html:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: A brilliant way to do Templates in javascript.
4 | published: false
5 | ---
6 | This comes from John Resig author of jQuery.
Storing the templates in script tags in the head of the document is
just beautiful.
Original post is here:
http://ejohn.org/blog/javascript-micro-templating/
7 |
--------------------------------------------------------------------------------
/_posts/2010-02-23-getting-periodicalexecuter-to-not-depend-on-prototype-.html:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: Getting PeriodicalExecuter to not depend on Prototype.
4 | published: false
5 | ---
6 | I have become accustomed to the PeriodicalExecuter that comes with Prototype.js.
So I made it framework independent.
7 |
--------------------------------------------------------------------------------
/_posts/2010-02-23-sammy-a-tiny-mvcish-javascript-framework-think-sinatra-.html:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: Sammy a tiny MVCish Javascript framework (think Sinatra)
4 | published: false
5 | ---
6 | For a client side javascript framework it looks like Sammy is the bomb
digitty. It's just the right size.
It's modeled after Sinatra.
http://code.quirkey.com/sammy/index.html
If you don't know Sinatra:
http://www.sinatrarb.com
7 |
--------------------------------------------------------------------------------
/_posts/2010-03-02-passing-configuration-options-to-sinatra-middleware.html:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: Passing configuration options to Sinatra Middleware
4 | published: false
5 | ---
6 | When you are using Sinatra::Base apps as middleware it's sometimes
necessary to pass in configuration options.
This is how I do it in my config.ru
MockClient is the Sinatra app.
You can do anything in the configure block that you would normally do
in the configure block in your Sinatra app. Nice eh?
7 |
--------------------------------------------------------------------------------
/_posts/2010-03-02-the-elegant-way-to-make-square-images-in-ruby-avatar-style-.html:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: The elegant way to make square images in Ruby (avatar style)
4 | published: false
5 | ---
6 | The problem: we have an image and you want to make a smaller square
7 |
version of it. We want the smaller version to cropped so that
8 | the
image fills the square.
For example you have this:
9 |
10 |
11 |
And you want to square it and crop off the sides:
12 |
13 |
14 |
15 |
And then end up with a resulting square image:
16 |
17 |
18 |
19 |
20 |
This is a problem that I have solved over and over again. But this is
my favorite solution:
Using mini_magick (
http://github.com/probablycorey/mini_magick)
Dont' miss the '^' in the resize geometry. That resizes to the
closest dimension while maintaining the aspect ratio.
Note that this works when you want to "magically" crop rectangular
images as well.
21 |
--------------------------------------------------------------------------------
/_posts/2010-03-31-spotlight-can-t-find-applications.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: Spotlight can't find Applications
4 | published: false
5 | ---
6 |
7 | So spotlight decided that it didn't know where any of my Applications
8 | were. This really puts a damper in my work flow so here is the
9 | solution.
10 |
11 | In Snow Leopard open Terminal and type:
12 |
13 | arch -i386 mdimport /Applications
14 |
15 | If you aren't using Snow Leopard just skip the 'arch -i386' and it should work.
16 |
17 | This will reindex your Applications directory which will enable Spotlight to find your Applications again.
18 |
--------------------------------------------------------------------------------
/_posts/2010-10-23-here-s-a-warning-triangle-icon-.html:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: Here's a warning
(triangle icon)
4 | published: false
5 | ---
6 |
In frustration after looking for a decent warning triangle icon I
7 | simply made one. Here it is. You can use it free and
8 | clear.
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/_posts/2010-12-10-great-reading-in-computer-science.html:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: Great Reading in Computer Science
4 | published: true
5 | ---
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/_posts/2012-03-16-stuff-that-i-find-very-influential-in-my-current-thinking-about-programming-in-rails.html:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: Stuff that I find very influential in my current thinking about programming in Rails
4 | published: false
5 | ---
6 |
Fast Tests
Having a fast test suite is the best gift we can give ourselves and get out of the depressing time suck of Rails loading for each test run.
Fast tests by Corey Haines.
VIDEO
OOP on Rails
There has been some very good thinking going on lately about what to do to make rails apps more maintainable. This movement has been coming along and the recommendations result in fast test suites and decoupled code. What if you could back out of a feature easily rather than having it's various elements spread throughout your codebase?
Uncle Bob Martins great talk:
This is a terrific (free) book by the author of Exceptional Ruby Advi Grimm:
http://objectsonrails.com/
CSS
There is some good work being done in the CSS world as well. Object oriented CSS for one thing.The idea is that you trade off having more classes on your objects for more maintainable pluggable blocks of display code. Twitter Bootstrap is an example of this methodology.
The payoff of this method is having organized understandable CSS code. The short message is to stop stop the context based CSS madness.
7 |
--------------------------------------------------------------------------------
/_posts/2012-03-19-fast-tests-in-rails.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: Fast tests in Rails make programming fun again
4 | published: false
5 | ---
6 |
7 | ```
8 | dataview TABLE file.name AS "Filename" FROM #book
9 | ```
10 |
11 | Corey Haines said just start with one test file. He was right, once
12 | you take Rails out of the loop your tests will fly. And your life
13 | will change.
14 |
15 | # the big numb numb
16 |
17 | Most Rails projects get big over time and loading the complete
18 | environment takes a significant amount of time. If I want to run a single test in my current project I have to wait 15 - 20 seconds for
19 | the test to start.
20 |
21 | This didn't seem that bad. I was used to it. But now that I have
22 | experienced fast tests, the truth is that
23 | slow tests have been sucking the fun and energy out of my programming.
24 |
25 | These long weighty test runs have been numbing me out. With each successive
26 | slow test run, my attention to the problem fades. I
27 | start to want to just finish this current feature and move on to the
28 | next one so that at the very least I can feel like I got something
29 | done.
30 |
31 | This murders what I consider to be the best part of programming: creativity and problem solving.
32 |
33 | Not good.
34 |
35 | # the gift of time
36 |
37 | So I made a separate spec directory and ported my first test suite
38 | over. The whole process flew. My tests kept time with the pace of my
39 | thought. Tests ran instantaneously. There was nothing to wait for.
40 |
41 | With this new found time I started to do something. REFACTOR!
42 |
43 | With speedy tests I find myself continuously typing
44 | and trying different solutions. My mind is constantly occupied with
45 | the code and the problem that I am working on. The result is more
46 | fun, more problem solving and more refactoring.
47 |
48 | Happiness comes back.
49 |
50 | # Call to action
51 |
52 | If you are test driving a large Rails project this is something you
53 | have to experience for yourself. You just have to try one test.
54 |
55 | Don't hesitate. Don't try and do it perfectly. Don't engage in internal
56 | debates about fast testing best practices. Don't read 5 blog
57 | articles on how to do it. Don't consider how to integrate it with
58 | your continuous testing environment. Don't figure out how to integrate
59 | it with your IDE.
60 |
61 | Just do this:
62 |
63 | Create a
spec_no_rails
directory in the root of your
64 | rails project.
65 |
66 | Take your next Rails feature and write the tests for it in a
67 |
my_feature_test_spec.rb
file that resides in that directory. Do
68 | not require your environment. Only require the files you need to test
69 | the feature. Mock everything that has to do with Rails out.
70 |
71 | Then run this in your root directory.
72 |
73 | rspec spec_no_rails
74 |
75 | Don't try to be artful. Don't try and be clever. This is about
76 | experiencing how fast you can develop when you don't have to load
77 | Rails for every tiny little test run.
78 |
79 | Watch Corey Haines' talk about this [here.](http://www.youtube.com/watch?v=bNn6M2vqxHE)
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
--------------------------------------------------------------------------------
/_posts/2015-05-01-developing-clojurescript-with-figwheel.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "Developing ClojureScript Live with Figwheel - ClojureWest Talk"
4 | published: true
5 | category:
6 | tags: []
7 | ---
8 |
9 | I recently had a lot of fun giving a talk about [Figwheel](https://github.com/bhauman/lein-figwheel) in Portland, at
10 | ClojureWest 2015. Figwheel facilitates an almost effortless live
11 | development workflow when you are working with ClojureScript.
12 |
13 | In the talk, I explained why I created Figwheel and I demonstrated
14 | its current feature set live.
15 |
16 | Below, I have embedded videos that start at the different sections of the talk.
17 |
18 |
19 | VIDEO
20 |
21 |
22 |
23 | ## Jump to Live demo
24 |
25 |
26 | VIDEO
27 |
28 |
29 |
30 | ## Jump to Questions
31 |
32 |
33 | VIDEO
34 |
35 |
36 |
37 | Take advantage of the fact that all the ClojureWest Sessions are [now currently online](https://www.youtube.com/channel/UCaLlzGqiPE2QRj6sSOawJRg).
38 |
39 | ClojureWest was an absolutely amazing experience. I enjoyed meeting some absolutely great folks and I am really looking forward to next year.
40 |
41 | ## Links
42 |
43 | * [This Talk on Youtube](https://www.youtube.com/watch?v=j-kj2qwJa_E&feature=youtu.be)
44 | * [Figwheel](https://github.com/bhauman/lein-figwheel)
45 | * [Crashverse](https://github.com/bhauman/crashverse)
46 | * [ClojureTV](https://www.youtube.com/channel/UCaLlzGqiPE2QRj6sSOawJRg)
47 |
48 |
--------------------------------------------------------------------------------
/_scripts/publish.sh:
--------------------------------------------------------------------------------
1 | bundle exec jekyll build
2 | git checkout master
3 | cp -r _site/* ./
4 | git commit -am"publishing site"
5 | git push
6 | git checkout site-jekyll-source
7 | echo "published site"
8 |
9 |
--------------------------------------------------------------------------------
/assets/3dmodels/frameless_dome_model.skp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/3dmodels/frameless_dome_model.skp
--------------------------------------------------------------------------------
/assets/bootstrap/fonts/glyphicons-halflings-regular.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/bootstrap/fonts/glyphicons-halflings-regular.eot
--------------------------------------------------------------------------------
/assets/bootstrap/fonts/glyphicons-halflings-regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/bootstrap/fonts/glyphicons-halflings-regular.ttf
--------------------------------------------------------------------------------
/assets/bootstrap/fonts/glyphicons-halflings-regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/bootstrap/fonts/glyphicons-halflings-regular.woff
--------------------------------------------------------------------------------
/assets/bootstrap2/img/glyphicons-halflings-white.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/bootstrap2/img/glyphicons-halflings-white.png
--------------------------------------------------------------------------------
/assets/bootstrap2/img/glyphicons-halflings.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/bootstrap2/img/glyphicons-halflings.png
--------------------------------------------------------------------------------
/assets/cljs/devcard-examples/core.cljs:
--------------------------------------------------------------------------------
1 | (ns devcard-examples.core
2 | (:require
3 | [devcards.core :as dc :include-macros true]
4 | [sablono.core :as sab :include-macros true]
5 | [devcard-examples.two-zero :as tz])
6 | (:require-macros
7 | [devcards.core :refer [defcard are= are-not= is]]))
8 |
9 | (enable-console-print!)
10 |
11 | (def host (.-host js/location))
12 |
13 | (def path (.-pathname js/location))
14 |
15 | (def dev-host? (partial = "localhost:3449"))
16 |
17 | (def dev-blog-host? (partial = "localhost:4000"))
18 |
19 | (def prod-host? (partial = "rigsomelight.com"))
20 |
21 | (print (dev-blog-host? host))
22 | (print "Yeahaw")
23 |
24 | (when (dev-host? host)
25 | (dc/start-devcard-ui!)
26 | (dc/start-figwheel-reloader!))
27 |
28 | (when (dev-blog-host? host)
29 | (dc/start-single-card-ui!)
30 | (dc/start-figwheel-reloader! { :websocket-url "ws://localhost:3449/figwheel-ws"})
31 |
32 | (dc/render-single-card [:devcard_examples.two_zero :board-state-1] (js/$ "#tz-board-1"))
33 | (dc/render-single-card [:devcard_examples.two_zero :board-state-2] (js/$ "#tz-board-2"))
34 | (dc/render-single-card [:devcard_examples.two_zero :board-state-3] (js/$ "#tz-board-3")))
35 |
36 | (when (prod-host? host)
37 | (dc/start-single-card-ui!)
38 |
39 | (dc/render-single-card [:devcard_examples.two_zero :board-state-1] (js/$ "#tz-board-1"))
40 | (dc/render-single-card [:devcard_examples.two_zero :board-state-2] (js/$ "#tz-board-2"))
41 | (dc/render-single-card [:devcard_examples.two_zero :board-state-3] (js/$ "#tz-board-3")))
42 |
43 |
--------------------------------------------------------------------------------
/assets/cljs/dots-game-2/core.cljs:
--------------------------------------------------------------------------------
1 | (ns dots-game-2.core
2 | (:require
3 | [cljs.core.async :as async
4 | :refer [! chan close! sliding-buffer put! alts! timeout]]
5 | [jayq.core :refer [$ append ajax css $deferred
6 | done resolve pipe on bind attr
7 | offset] :as jq]
8 | [jayq.util :refer [log]]
9 | [crate.core :as crate]
10 |
11 | [dots-game-2.ex1 :refer [example-1]]
12 | [dots-game-2.ex2 :refer [example-2]]
13 | [dots-game-2.ex3 :refer [log-loop]]
14 |
15 | )
16 | (:require-macros [cljs.core.async.macros :as m :refer [go]]))
17 |
18 | (defn no-scroll-on-touch [selector]
19 | (bind ($ selector) "touchstart" (fn [e] (jq/prevent e)))
20 | (bind ($ selector) "dragstart" (fn [e] (jq/prevent e)))
21 | (bind ($ selector) "drop" (fn [e] (jq/prevent e))))
22 |
23 | ($ (fn []
24 | (go
25 | (! chan close! sliding-buffer put! alts! timeout]]
5 | [jayq.core :refer [$ append ajax html css $deferred
6 | done resolve pipe on bind attr
7 | offset] :as jq]
8 | [jayq.util :refer [log]]
9 | [crate.core :as crate])
10 | (:require-macros [cljs.core.async.macros :as m :refer [go]]))
11 |
12 | (def grid-unit 45)
13 | (def dot-size 20)
14 | (def board-size 6)
15 | (def dot-colors [:blue :green :yellow :purple :red])
16 |
17 | (let [number-colors (count dot-colors)]
18 | (defn rand-color []
19 | (get dot-colors (rand-int number-colors))))
20 |
21 | (defn get-rand-colors [number]
22 | (map (fn [x] (rand-color)) (range number)))
23 |
24 | (defn dot-pos-to-corner-position [dot-pos]
25 | [(+ 25 (* grid-unit (- (dec board-size) dot-pos))) 25])
26 |
27 | (defn dot-templ [i color]
28 | (let [[top left] (dot-pos-to-corner-position i)
29 | class (str "dot " (name color))
30 | style (str "top:" top "px; left: " left "px;")]
31 | [:div {:class class :style style}]))
32 |
33 | (defn create-dot [i color]
34 | {:color color :pos i :elem (crate/html (dot-templ i color))})
35 |
36 | (defn render-state [selector board]
37 | (mapv #(append ($ selector) (:elem %)) board))
38 |
39 | (defn render-example-board [selector]
40 | (render-state selector
41 | (map-indexed create-dot (get-rand-colors board-size))))
42 |
43 | (def example-2 render-example-board)
44 |
--------------------------------------------------------------------------------
/assets/cljs/dots-game-2/ex3.cljs:
--------------------------------------------------------------------------------
1 | (ns dots-game-2.ex3
2 | (:require
3 | [cljs.core.async :as async
4 | :refer [! chan close! sliding-buffer put! alts! timeout]]
5 | [jayq.core :refer [$ append ajax css $deferred
6 | done resolve pipe on bind attr
7 | offset] :as jq]
8 | [jayq.util :refer [log]]
9 | [crate.core :as crate]
10 | [dots-game-2.utils :refer [map-chan apply-to-chan remove-sequential-duplicates]]
11 | [dots-game-2.ex1 :refer [draw-chan]]
12 | [dots-game-2.ex2 :refer [render-example-board grid-unit board-size] :as board])
13 | (:require-macros [cljs.core.async.macros :as m :refer [go]]))
14 |
15 | (def reverse-board-position (partial - (dec board-size)))
16 |
17 | (defn coord->dot-pos [offset {:keys [x y]}]
18 | (let [[x y] (map - [x y] offset [13 13])]
19 | (when (and (< 12 x (+ 12 grid-unit))
20 | (< 12 y (* board-size grid-unit)))
21 | (reverse-board-position (int (/ y grid-unit))))))
22 |
23 | (defn draw-action-msg [board-offset draw-action-chan]
24 | (remove-sequential-duplicates
25 | (map-chan
26 | #(if-let [cur-pos (coord->dot-pos board-offset (last %))] cur-pos)
27 | draw-action-chan)))
28 |
29 | (defn dot-chan [selector]
30 | (let [board-offset ((juxt :left :top) (offset ($ selector)))]
31 | (map-chan #(draw-action-msg board-offset %) (draw-chan selector))))
32 |
33 | (defn log-it [selector in-chan]
34 | (let [log-func (fn [x] (.prepend ($ (str selector "-log"))
35 | (crate/html x)))]
36 | (apply-to-chan log-func in-chan)))
37 |
38 | (defn log-loop [selector]
39 | (let [dot-ch (dot-chan selector)]
40 | (render-example-board selector)
41 | (go
42 | (loop [dot-input-ch (! chan close! sliding-buffer put! alts! timeout]]
5 | [jayq.util :refer [log]])
6 |
7 | (:require-macros [cljs.core.async.macros :as m :refer [go]]))
8 |
9 | (defn tap-until [end-pred in out]
10 | (go (loop []
11 | (if-let [v (! out v)
25 | (if-not (pred-sentinel v)
26 | (recur)
27 | (close! out)))
28 | (close! out))))
29 | out))
30 |
31 | (defn filter-chan [pred in]
32 | (let [out (chan)]
33 | (go (loop []
34 | (if-let [v (! out v))
38 | (recur))
39 | (close! out))
40 | ))
41 | out))
42 |
43 | (defn map-chan [func in]
44 | (let [out (chan)]
45 | (go (loop []
46 | (if-let [v (! out out-v)) ;; no nils in channel
49 | (recur))
50 | (close! out))
51 | ))
52 | out))
53 |
54 | (defn apply-to-chan [func in]
55 | (go (loop []
56 | (if-let [v (! rc msg)
67 | (>! out msg)
68 | (recur))))))
69 | rc))
70 |
71 | (defn siphon
72 | ([in] (siphon in []))
73 | ([in coll]
74 | (go (loop [coll coll]
75 | (if-let [v (! out v))
111 | (recur v))
112 | (close! out))))
113 | out))
114 |
--------------------------------------------------------------------------------
/assets/cljs/dots-game/core.cljs:
--------------------------------------------------------------------------------
1 | (ns dots-game.core
2 | (:require
3 | [cljs.core.async :as async
4 | :refer [! chan close! sliding-buffer put! alts! timeout]]
5 | [jayq.core :refer [$ append ajax inner css $deferred
6 | done resolve pipe on bind attr
7 | offset] :as jq]
8 | [jayq.util :refer [log]]
9 | [crate.core :as crate]
10 | [dots-game.ex1 :refer [example-1]]
11 | [dots-game.ex2 :refer [example-2]]
12 | [dots-game.ex3 :refer [log-loop]]
13 | [dots-game.ex4 :refer [example-4]]
14 | [dots-game.ex5 :refer [example-5]]
15 | [dots-game.ex6 :refer [example-6]]
16 | [dots-game.ex7 :refer [example-7]]
17 | )
18 | (:require-macros [cljs.core.async.macros :as m :refer [go]]))
19 |
20 |
21 |
22 | (defn no-scroll-on-touch [selector]
23 | (bind ($ selector) "touchstart" (fn [e] (jq/prevent e)))
24 | (bind ($ selector) "dragstart" (fn [e] (jq/prevent e)))
25 | (bind ($ selector) "drop" (fn [e] (jq/prevent e))))
26 |
27 | ($ (fn []
28 | (go
29 | (! chan close! sliding-buffer put! alts! timeout]]
5 | [jayq.core :refer [$ append ajax html css $deferred
6 | done resolve pipe on bind attr
7 | offset] :as jq]
8 | [jayq.util :refer [log]]
9 | [crate.core :as crate])
10 | (:require-macros [cljs.core.async.macros :as m :refer [go]]))
11 |
12 | (def grid-unit 45)
13 | (def board-size 6)
14 | (def peice-colors [:blue :green :yellow :purple :red])
15 |
16 | (let [number-colors (count peice-colors)]
17 | (defn rand-color []
18 | (get peice-colors (rand-int number-colors))))
19 |
20 | (defn get-rand-colors [number]
21 | (map (fn [x] (rand-color)) (range number)))
22 |
23 | (defn dot-pos-to-corner-position [dot-pos]
24 | [(+ 23 (* grid-unit (- (dec board-size) dot-pos))) 23])
25 |
26 | (defn dot-templ [i color]
27 | (let [[top left] (dot-pos-to-corner-position i)
28 | class (str "dot " (name color))
29 | style (str "top:" top "px; left: " left "px;")]
30 | [:div {:class class :style style}]))
31 |
32 | (defn create-dot [i color]
33 | {:color color :pos i :elem (crate/html (dot-templ i color))})
34 |
35 | (defn render-state [selector board]
36 | (mapv #(append ($ selector) (:elem %)) board))
37 |
38 | (defn render-example-board [selector]
39 | (render-state selector
40 | (map-indexed create-dot (get-rand-colors board-size))))
41 |
42 | (def example-2 render-example-board)
43 |
--------------------------------------------------------------------------------
/assets/cljs/dots-game/ex3.cljs:
--------------------------------------------------------------------------------
1 | (ns dots-game.ex3
2 | (:require
3 | [cljs.core.async :as async
4 | :refer [! chan close! sliding-buffer put! alts! timeout]]
5 | [jayq.core :refer [$ append ajax inner css $deferred
6 | done resolve pipe on bind attr
7 | offset] :as jq]
8 | [jayq.util :refer [log]]
9 | [crate.core :as crate]
10 | [dots-game.ex1 :refer [draw-chan]]
11 | [dots-game.ex2 :refer [render-example-board grid-unit board-size] :as board])
12 | (:require-macros [cljs.core.async.macros :as m :refer [go]]))
13 |
14 | (def reverse-board-position (partial - (dec board-size)))
15 |
16 | (defn coord->dot-pos [offset {:keys [x y]}]
17 | (let [[x y] (map - [x y] offset [13 13])]
18 | (when (and (< 12 x (+ 12 grid-unit))
19 | (< 12 y (* board-size grid-unit)))
20 | (reverse-board-position (int (/ y grid-unit))))))
21 |
22 | (defn collect-dots [draw-input out-chan board-offset init-msg]
23 | (go
24 | (loop [last-pos nil
25 | msg init-msg]
26 | (when (= :draw (first msg))
27 | (let [cur-pos (coord->dot-pos board-offset (last msg))]
28 | (if (and (not (nil? cur-pos)) (not= cur-pos last-pos))
29 | (put! out-chan [:dot-pos cur-pos]))
30 | (recur (or cur-pos last-pos) (! chan close! sliding-buffer put! alts! timeout]]
5 | [jayq.core :refer [$ append ajax inner css $deferred
6 | done resolve pipe on bind attr
7 | offset] :as jq]
8 | [jayq.util :refer [log]]
9 | [crate.core :as crate]
10 | [dots-game.ex1 :refer [draw-chan]]
11 | [dots-game.ex2 :refer [render-example-board grid-unit board-size
12 | create-dot get-rand-colors
13 | dot-pos-to-corner-position] :as board]
14 | [dots-game.ex3 :refer [dot-chan]])
15 | (:require-macros [cljs.core.async.macros :as m :refer [go]]))
16 |
17 | (def create-dots #(map-indexed create-dot (get-rand-colors %)))
18 |
19 | (defn initial-state [selector]
20 | {:board (create-dots board-size)
21 | :dot-chain []})
22 |
23 | (defn add-dots-to-board [selector dots]
24 | (mapv #(append ($ selector) (:elem %)) dots))
25 |
26 | (defn move-dot-to-pos [dot i]
27 | (let [[top left] (dot-pos-to-corner-position i)]
28 | (css ($ (dot :elem)) {:top top :left left})))
29 |
30 | (defn move-dots-to-new-positions [board]
31 | (go
32 | (loop [i 0 [dot & xdots] board]
33 | (when (not (nil? dot))
34 | (when (not= (dot :pos) i)
35 | (move-dot-to-pos dot i)
36 | (! chan close! sliding-buffer put! alts! timeout]]
5 | [jayq.core :refer [$ append ajax inner css $deferred
6 | done resolve pipe on bind attr
7 | offset] :as jq]
8 | [jayq.util :refer [log]]
9 | [crate.core :as crate]
10 | [dots-game.ex1 :refer [draw-chan]]
11 | [dots-game.ex2 :refer [render-example-board grid-unit board-size
12 | create-dot get-rand-colors
13 | dot-pos-to-corner-position] :as board]
14 | [dots-game.ex3 :refer [dot-chan]])
15 | (:require-macros [cljs.core.async.macros :as m :refer [go]]))
16 |
17 | (def create-dots #(map-indexed create-dot (get-rand-colors %)))
18 |
19 | (defn initial-state [selector]
20 | {:board (create-dots board-size)
21 | :dot-chain []
22 | :selector selector})
23 |
24 | (defn add-dots-to-board [selector dots]
25 | (mapv #(append ($ selector) (:elem %)) dots))
26 |
27 | (defn move-dot-to-pos [dot i]
28 | (let [[top left] (dot-pos-to-corner-position i)]
29 | (css ($ (dot :elem)) {:top top :left left})))
30 |
31 | (defn move-dots-to-new-positions [board]
32 | (go
33 | (loop [i 0 [dot & xdots] board]
34 | (when (not (nil? dot))
35 | (when (not= (dot :pos) i)
36 | (move-dot-to-pos dot i)
37 | ( system
51 | (add-effects [:store-changes data])
52 | (update-in [:todos]
53 | (fn [todos]
54 | (vec (conj todos data))))))
55 |
56 | (defmethod todo-trans :delete-todo [_ system data]
57 | (update-in system
58 | [:todos]
59 | (fn [todos]
60 | (filter #(not= (:id %) (:id data))
61 | todos))))
62 |
63 | (defmulti todo-eff identity)
64 |
65 | (defmethod todo-eff :default [_ system data event-chan])
66 |
67 | (defmethod todo-eff :store-changes [_ system data event-chan]
68 | (put! event-chan [:inc {}])
69 | (log "storing changes"))
70 |
71 | (defrecord ExampleTodos []
72 | iInputFilter
73 | (-filter-input [_ [name data] system]
74 | (if (= name :create-todo)
75 | [name (assoc data :id (rand-int 10000000))]
76 | [name data]))
77 | iPluginInit
78 | (-initialize [o system event-chan]
79 | (log "initializing todos"))
80 | iTransform
81 | (-transform [o msg system]
82 | (todo-trans (first msg) system (last msg)))
83 | iEffect
84 | (-effect [o [name data] system event-chan effect-chan]
85 | (todo-eff name system data event-chan)
86 | (log "affecting 2")
87 | ))
88 |
--------------------------------------------------------------------------------
/assets/cljs/libsrc/frontier/example/core.cljs:
--------------------------------------------------------------------------------
1 | (ns frontier.example.core
2 | (:require
3 | [frontier.core :refer [component-group]]
4 | [frontier.dev-tools :refer [managed-system
5 | managed-renderer
6 | input-controls-renderer]]
7 |
8 | [frontier.example.components :refer [ExampleCounter
9 | ExampleTodos]]
10 | [jayq.core :refer [$ html]]
11 | [jayq.util :refer [log]]))
12 |
13 | (defn create-test-divs [parent-sel count]
14 | (mapv
15 | (fn [x]
16 | (.append ($ parent-sel) (str "
" )))
17 | (range count)))
18 |
19 | (defn run-example [target-sel]
20 |
21 | (create-test-divs target-sel 2)
22 |
23 | (managed-system {}
24 | (component-group
25 | (ExampleCounter.)
26 | (ExampleTodos.))
27 | (managed-renderer "test0"
28 | (input-controls-renderer
29 | [[:create-todo {:content "helloby"}]
30 | [:create-todo {:content "goodbyer"}]
31 | [:create-todo {:content "hellero"}]]))
32 | [[:create-todo {:content "hello"}]
33 | [:create-todo {:content "goodbye"}]
34 | [:create-todo {:content "heller"}]])
35 |
36 | (managed-system {}
37 | (component-group
38 | (ExampleCounter.)
39 | (ExampleTodos.))
40 | (managed-renderer "test1"
41 | (input-controls-renderer
42 | [[:create-todo {:content "helloby"}]
43 | [:create-todo {:content "goodbyer"}]
44 | [:create-todo {:content "hellero"}]]))
45 | [[:create-todo {:id 1 :content "hello"}]
46 | [:create-todo {:id 2 :content "goodbye"}]
47 | [:create-todo {:id 3 :content "heller"}]]))
48 |
49 | #_(log "here we are")
50 |
51 | (run-example "#cmsnew")
52 |
53 |
--------------------------------------------------------------------------------
/assets/cljs/libsrc/frontier/util/edn_renderer.cljs:
--------------------------------------------------------------------------------
1 | (ns frontier.util.edn-renderer
2 | (:require
3 | [sablono.core :as sab :include-macros true]))
4 |
5 | (declare html)
6 |
7 | (defn literal [class x]
8 | [:span {:className class} (prn-str x)])
9 |
10 | (defn join-html [separator coll]
11 | (interpose [:span.separator separator]
12 | (map html coll)))
13 |
14 | (defn html-collection [class opener closer coll]
15 | [:span.collection { :className class }
16 | [:span.opener opener]
17 | [:span.contents (join-html " " coll)]
18 | [:span.closer closer]])
19 |
20 | (defn html-keyval [[k v]]
21 | [:span.keyval
22 | (html k)
23 | [:span.separator " "]
24 | (html v)])
25 |
26 | (defn html-keyvals [coll]
27 | (interpose [:span.separator ", "]
28 | (map html-keyval coll)))
29 |
30 | (defn html-map [coll]
31 | [:span.collection.map
32 | [:span.opener "{"]
33 | [:span.contents (html-keyvals coll)]
34 | [:span.closer "}"]])
35 |
36 | (defn html-string [s]
37 | [:span.string
38 | [:span.opener "\""]
39 | [:span.contents s]
40 | [:span.closer "\""]])
41 |
42 | (defn html [x]
43 | (cond
44 | (number? x) (literal "number" x)
45 | (keyword? x) (literal "keyword" x)
46 | (symbol? x) (literal "symbol" x)
47 | (string? x) (html-string x)
48 | (map? x) (html-map x)
49 | (set? x) (html-collection "set" "#{" "}" x)
50 | (vector? x) (html-collection "vector" "[" "]" x)
51 | (seq? x) (html-collection "seq" "(" ")" x)
52 | :else (literal "literal" x)))
53 |
54 | (defn html-edn [e]
55 | [:div.rendered-edn
56 | (html e)])
57 |
--------------------------------------------------------------------------------
/assets/cljs/libsrc/reactor/core.cljs:
--------------------------------------------------------------------------------
1 | (ns reactor.core
2 | (:require
3 | [cljs.core.async :as async
4 | :refer [! chan close! sliding-buffer put! take! alts! timeout onto-chan map< to-chan filter<]])
5 | (:require-macros [cljs.core.async.macros :as m :refer [go alt! go-loop]]))
6 |
7 | (def Pure
8 | (.createClass js/React
9 | (js-obj
10 | "shouldComponentUpdate"
11 | (fn [next-props next-state]
12 | (this-as this
13 | (not (= (.. this -props -value) (.-value next-props)))))
14 | "render"
15 | (fn []
16 | (this-as this
17 | ((.. this -props -children)))))))
18 |
19 | (def OwnerReference
20 | (.createClass js/React
21 | (js-obj
22 | "render"
23 | (fn []
24 | (this-as this ((.. this -props -children) this))))))
25 |
26 | (defn render-to [react-dom html-node callback]
27 | (.renderComponent js/React react-dom html-node callback))
28 |
29 | (defn react-render [html-node react-dom]
30 | "A blocking render call"
31 | (let [out (chan)]
32 | (render-to react-dom html-node (fn [] (put! out :rendered) (close! out)))
33 | out))
34 |
35 | (defn react-render-loop [html-node react-dom-chan]
36 | (go-loop []
37 | (let [react-dom (js { :dangerouslySetInnerHTML
46 | { :__html
47 | raw-html-str }})))
48 |
49 | (defn set-state [owner new-state-map]
50 | (.setState owner (clj->js new-state-map)))
51 |
52 | (defn get-state-val [owner state-key]
53 | (if-let [state (.-state owner)]
54 | (aget state (name state-key))))
55 |
56 | (defn get-prop-val [owner prop-key]
57 | (if-let [state (.-props owner)]
58 | (aget state (name prop-key))))
59 |
60 | (defn get-children [owner]
61 | (.. owner -props -children))
62 |
63 | (defn get-ref [owner ref-name]
64 | (aget (.-refs owner) (name ref-name)))
65 |
66 | (defn get-node [owner ref-name]
67 | (.getDOMNode (get-ref owner ref-name)))
68 |
69 | (defn input-value [owner ref-name]
70 | (let [node (get-node owner ref-name)]
71 | (condp = (.-type node)
72 | "checkbox" (.-checked node)
73 | (.-value node))))
74 |
75 | (defn form-values [owner refs]
76 | (into {} (map (juxt identity (partial input-value owner)) refs)))
77 |
78 | (defn prevent-default-wrap [f]
79 | (fn [x] (.preventDefault x) (f x)))
80 |
81 | (defn form-submit [owner chan msg fields]
82 | (prevent-default-wrap #(put! chan
83 | (let [form-vals (form-values owner fields)]
84 | (.log js/console "form submit")
85 | (.log js/console form-vals)
86 | [msg form-vals]))))
87 |
--------------------------------------------------------------------------------
/assets/cljs/libsrc/reactor/macros.clj:
--------------------------------------------------------------------------------
1 | (ns reactor.macros)
2 |
3 | (defmacro pure [value children]
4 | `(reactor.core/Pure. (cljs.core/js-obj "value" ~value) (fn [] ~children)))
5 |
6 | (defmacro owner-as [binding children]
7 | `(reactor.core/OwnerReference. (cljs.core/js-obj "value" 5)
8 | (fn [owner#]
9 | (let [~binding owner#]
10 | ~children))))
11 |
12 | (defmacro defpure [name bindings & body]
13 | `(let [render-func# (fn ~bindings ~@body)]
14 | (defn ~name [& args#]
15 | (pure args# (apply render-func# args#)))))
16 |
17 |
--------------------------------------------------------------------------------
/assets/cljs/todos-async/chan-utils.cljs:
--------------------------------------------------------------------------------
1 | (ns todos-async.chan-utils
2 | (:require
3 | [cljs.core.async :as async
4 | :refer [! chan close! sliding-buffer put! alts!]]
5 | [jayq.core :refer [$ append ajax inner $deferred $when done resolve pipe on] :as jq]
6 | [jayq.util :refer [log]])
7 | (:require-macros [cljs.core.async.macros :as m :refer [go alt!]]))
8 |
9 | (defn data-from-event [event]
10 | (-> event .-currentTarget $ .data (js->clj :keywordize-keys true)))
11 |
12 | (defn click-chan [selector msg-name]
13 | (let [rc (chan)]
14 | (on ($ "body") :click selector {}
15 | (fn [e]
16 | (jq/prevent e)
17 | (put! rc [msg-name (data-from-event e)])))
18 | rc))
19 |
20 | (defn fields-value-map [form-selector fields]
21 | (into {} (map
22 | (fn [fld]
23 | [fld (jq/val ($ (str form-selector " input[name=" (name fld) "]")))] )
24 | fields)))
25 |
26 | (defn form-submit-chan [form-selector msg-name fields]
27 | (let [rc (chan)]
28 | (on ($ "body") :submit form-selector {}
29 | (fn [e]
30 | (jq/prevent e)
31 | (put! rc [msg-name (fields-value-map form-selector fields)])))
32 | rc))
33 |
34 | (defn async-some [predicate input-chan]
35 | (go (loop []
36 | (let [msg (! chan close! sliding-buffer put! alts!]]
5 | [jayq.core :refer [$ append ajax inner $deferred $when done resolve pipe on] :as jq]
6 | [jayq.util :refer [log]]
7 | [crate.core :as crate]
8 | [clojure.string :refer [join blank?]]
9 | [todos-async.ex1 :as ex1]
10 | [todos-async.ex2 :as ex2]
11 | [todos-async.ex3 :as ex3]
12 | [todos-async.ex4 :as ex4])
13 | (:require-macros [cljs.core.async.macros :as m :refer [go alt!]]))
14 |
15 |
16 | (ex1/app-loop { :todo-list [{:content "buy milk"}
17 | {:content "buy cheese"}]})
18 |
19 | (ex2/app-loop { :todo-list [{:content "buy carrots"}
20 | {:content "buy arugula"}]})
21 |
22 | (ex3/app-loop { :todo-list [{:content "buy flowers"}
23 | {:content "buy chocolate"}]})
24 |
25 | (ex4/app-loop { :todo-list [{:content "buy a new car"}]})
26 |
27 |
--------------------------------------------------------------------------------
/assets/cljs/todos-async/ex1.cljs:
--------------------------------------------------------------------------------
1 | (ns todos-async.ex1
2 | (:require
3 | [cljs.core.async :as async
4 | :refer [! chan close! sliding-buffer put! alts!]]
5 | [jayq.core :refer [$ append ajax inner html $deferred $when done resolve pipe on] :as jq]
6 | [jayq.util :refer [log]]
7 | [crate.core :as crate]
8 | [clojure.string :refer [join blank?]]
9 | [todos-async.chan-utils :refer [click-chan form-submit-chan]])
10 | (:require-macros [cljs.core.async.macros :as m :refer [go alt!]]))
11 |
12 | (defn modal-form [{:keys [mode task-form] :as state}]
13 | (if mode
14 | [:div.modal-form
15 | [:h4 "Add Task"]
16 | [:form.new-task-form
17 | [:input.form-control.new-task-name {:type "text"
18 | :value (:content task-form)
19 | :name "content"
20 | :placeholder "New Task"}]
21 | [:p
22 | [:a {:href "#" :class "btn cancel-new-todo btn-default"} "cancel"]]]]))
23 |
24 | (defn todo-task [idx task]
25 | [:li (:content task)])
26 |
27 | (defn todo-list [{:keys [todo-list] :as state}]
28 | [:div
29 | [:p
30 | [:a {:href "#" :class "new-todo btn btn-primary"} "Add task"]]
31 | [:ul {:class "todo-list list-unstyled"}
32 | (map-indexed todo-task todo-list)]
33 | (modal-form state)])
34 |
35 | (defn render-templates [state]
36 | (-> ($ "#example1")
37 | (html (crate/html (todo-list state)))))
38 |
39 | (defn app-loop [start-state]
40 | (form-submit-chan "#example1 .new-task-form" :ignore [])
41 | (let [ new-todo-click (click-chan "#example1 a.new-todo" :new-todo)
42 | cancel-new-form-click (click-chan "#example1 a.cancel-new-todo" :cancel-new-form)]
43 | (go
44 | (loop [state start-state]
45 | (render-templates state)
46 | (! chan close! sliding-buffer put! alts!]]
5 | [jayq.core :refer [$ append ajax inner html $deferred $when done resolve pipe on] :as jq]
6 | [jayq.util :refer [log]]
7 | [crate.core :as crate]
8 | [clojure.string :refer [join blank?]]
9 | [todos-async.chan-utils :refer [click-chan form-submit-chan get-next-message]]
10 | [todos-async.ex1 :refer [todo-list]])
11 | (:require-macros [cljs.core.async.macros :as m :refer [go alt!]]))
12 |
13 | (defn render-templates [state]
14 | (-> ($ "#example2")
15 | (html (crate/html (todo-list state)))))
16 |
17 | (defn app-loop [start-state]
18 | (form-submit-chan "#example2 .new-task-form" :ignore []) ;; ignore form
19 | (let [ new-todo-click (click-chan "#example2 a.new-todo" :new-task)
20 | cancel-new-form-click (click-chan "#example2 a.cancel-new-todo" :cancel-new-form)
21 | input-chan (async/merge [new-todo-click cancel-new-form-click])]
22 | (go
23 | (loop [state start-state]
24 | (render-templates state)
25 | (! chan close! sliding-buffer put! alts!]]
5 | [jayq.core :refer [$ append ajax html $deferred $when done resolve pipe on] :as jq]
6 | [jayq.util :refer [log]]
7 | [crate.core :as crate]
8 | [clojure.string :refer [join blank?]]
9 | [todos-async.chan-utils :refer [click-chan form-submit-chan async-some get-next-message]])
10 | (:require-macros [cljs.core.async.macros :as m :refer [go alt!]]))
11 |
12 | (defn modal-form [{:keys [mode task-form] :as state}]
13 | (if mode
14 | [:div.modal-form
15 | [:h4 "Add Task"]
16 | [:form.new-task-form
17 | [:input.new-task-name.form-control {:type "text"
18 | :value (:content task-form)
19 | :name "content"
20 | :placeholder "New Task"}]
21 | [:p
22 | [:input {:type "submit" :value "Save" :class "btn btn-primary"}]
23 | [:a {:href "#" :class " cancel-new-todo btn btn-default"} "cancel"]]]]))
24 |
25 | (defn todo-task [idx task]
26 | [:li (:content task)])
27 |
28 | (defn todo-list [{:keys [todo-list] :as state}]
29 | [:div
30 | [:p
31 | [:a {:href "#" :class "new-todo btn btn-primary"} "Add task"]]
32 | [:ul {:class "todo-list list-unstyled"}
33 | (map-indexed todo-task todo-list)]
34 | (modal-form state)])
35 |
36 | (defn render-templates [state]
37 | (-> ($ "#example3")
38 | (html (crate/html (todo-list state)))))
39 |
40 | (defn add-task [{:keys [todo-list] :as state} task]
41 | (assoc state :todo-list (conj todo-list task)))
42 |
43 | (defn app-loop [start-state]
44 | (let [ new-todo-click (click-chan "#example3 a.new-todo" :new-task)
45 | cancel-new-form-click (click-chan "#example3 a.cancel-new-todo" :cancel-new-form)
46 | task-form-submit (form-submit-chan "#example3 .new-task-form"
47 | :task-form-submit [:content])
48 | input-chan (async/merge [new-todo-click
49 | cancel-new-form-click
50 | task-form-submit])]
51 | (go
52 | (loop [state start-state]
53 | (render-templates state)
54 | ( state
62 | (add-task msg-data)
63 | (dissoc :mode))
64 | )))))))
65 |
66 |
--------------------------------------------------------------------------------
/assets/cljs/todos-async/ex4.cljs:
--------------------------------------------------------------------------------
1 | (ns todos-async.ex4
2 | (:require
3 | [cljs.core.async :as async
4 | :refer [! chan close! sliding-buffer put! alts!]]
5 | [jayq.core :refer [$ append ajax html $deferred $when done resolve pipe on] :as jq]
6 | [jayq.util :refer [log]]
7 | [crate.core :as crate]
8 | [clojure.string :refer [join blank?]]
9 | [todos-async.chan-utils :refer [click-chan form-submit-chan merge-chans filter-chan get-next-message]]
10 | [todos-async.ex3 :refer [modal-form]])
11 | (:require-macros [cljs.core.async.macros :as m :refer [go alt!]]))
12 |
13 |
14 | (defn todo-task [idx {:keys [completed] :as task}]
15 | (let [control (if completed
16 | [:span {:class "glyphicon glyphicon-ok-sign"}]
17 | [:a.complete-todo {:href "#" :data-task-index idx}
18 | [:span {:class "glyphicon glyphicon-ok-circle"}]])]
19 |
20 | [:li
21 | control
22 | " "
23 | [:span {:class (if completed "completed")}
24 | (:content task)]]
25 | ))
26 |
27 | (defn todo-list [{:keys [todo-list] :as state}]
28 | [:div
29 | [:p
30 | [:a {:href "#" :class "new-todo btn btn-primary"} "Add task"]]
31 | [:ul {:class "todo-list list-unstyled"}
32 | (map-indexed todo-task todo-list)]
33 | (modal-form state)])
34 |
35 | (defn render-templates [state]
36 | (-> ($ "#example4")
37 | (html (crate/html (todo-list state)))))
38 |
39 | (defn add-task [{:keys [todo-list] :as state} task]
40 | (assoc state :todo-list (conj todo-list task)))
41 |
42 | (defn complete-task [state task-index]
43 | (assoc-in state [:todo-list task-index :completed] true))
44 |
45 | (defn user-inputs []
46 | (async/merge
47 | [(click-chan "#example4 a.new-todo" :new-task)
48 | (click-chan "#example4 a.complete-todo" :complete-todo)
49 | (click-chan "#example4 a.cancel-new-todo" :cancel-new-form)
50 | (form-submit-chan "#example4 .new-task-form"
51 | :task-form-submit [:content])]))
52 |
53 | (defn add-task-modal [state input-chan]
54 | (go
55 | (render-templates (assoc state :mode :add-todo-form))
56 | (let [[msg-name msg-data] ( state
62 | (add-task msg-data)
63 | (dissoc :mode))
64 | ))))
65 |
66 | (defn main-app [start-state input-chan]
67 | (go
68 | (loop [state start-state]
69 | (render-templates state)
70 | (let [[msg-name msg-data] ( .even,
2 | .chess-board .even > .odd {
3 | background-color: #eee;
4 | }
5 |
6 | .chess-board tr td.nomove {
7 | background-color: #aaa;
8 | }
9 |
10 | table.chess-board.table {
11 | width: 489px;
12 | }
13 |
14 | .chess-board td {
15 | width: 60px;
16 | height: 60px;
17 | }
18 |
19 | .chess-board td.queen {
20 | background: transparent url("../images/queen.jpg") no-repeat center center;
21 | background-size: 60px 60px;
22 | }
23 |
24 | .board-area.has-won td.nomove {
25 | background-color: #dff0d8;
26 | }
27 |
28 | .board-area.has-lost td.nomove {
29 | background-color: #f2dede;
30 | }
31 |
32 | .board-area div.controls {
33 | width: 489px;
34 | height: 30px;
35 | text-align: center;
36 | margin-bottom: 10px;
37 | position: relative;
38 | }
39 |
40 | .board-area span.text-success,
41 | .board-area span.text-warning,
42 | .board-area span.text-danger {
43 | top: 6px;
44 | font-size: 1.12em;
45 | position: relative;
46 | }
47 |
48 | .board-area div.controls .lefter {
49 | position: absolute;
50 | left: 0px;
51 | }
52 |
53 | .board-area div.controls .righter {
54 | position: absolute;
55 | top: 7px;
56 | right: 11px;
57 | }
--------------------------------------------------------------------------------
/assets/css/json_renderer.css:
--------------------------------------------------------------------------------
1 | .json_renderer .atom_name,
2 | .json_renderer .object_name {
3 | color: rgb(196,33,0);
4 | padding-right: 20px;
5 | }
6 |
7 | .json_renderer .atom_value {
8 | padding-right: 20px;
9 | }
10 |
11 | .json_renderer .array_name,
12 | .json_renderer .object_name {
13 | color: rgb(196,33,0);
14 | padding-right: 20px;
15 | display: inline-block;
16 | }
17 |
18 | .json_renderer .array_items {
19 | background-color: rgba(0,0,0,0.01);
20 | display: inline-block;
21 | vertical-align: top;
22 | }
23 |
24 | .json_renderer .hash_items {
25 | padding: 1.8em;
26 | display: inline-block;
27 | vertical-align: top;
28 | }
29 |
30 | .json_renderer .hash {
31 | background-color: rgba(0,0,0,0.02);
32 | }
33 |
34 | .json_renderer .hash:nth-child(even) {
35 | background-color: rgba(0,0,0,0.04);
36 | }
37 |
38 | .json_renderer .array_items > .hash > .object_name,
39 | .json_renderer .array_items > .hash > .array_name,
40 | .json_renderer .array_items > .hash > .atom_name,
41 | .json_renderer .array_items > .atom > .object_name,
42 | .json_renderer .array_items > .atom > .array_name,
43 | .json_renderer .array_items > .atom > .atom_name {
44 | display:none;
45 | }
46 |
47 | .json_renderer .action_taken > .object_name,
48 | .json_renderer .action_taken > .array_name,
49 | .json_renderer .action_taken > .atom_name,
50 | .json_renderer .action_taken_last:last-child > .object_name,
51 | .json_renderer .action_taken_last:last-child > .array_name,
52 | .json_renderer .json_renderer .action_taken_last:last-child > .atom_name {
53 | color: #468847;
54 | background-color: #dff0d8;
55 | }
56 |
57 | .json_renderer .action_taken > .hash_items,
58 | .json_renderer .action_taken > .array_items,
59 | .json_renderer .action_taken > .atom_value,
60 | .json_renderer .action_taken_last:last-child > .hash_items,
61 | .json_renderer .action_taken_last:last-child > .array_items,
62 | .json_renderer .action_taken_last:last-child > .atom_value {
63 | color: #468847;
64 | background-color: #dff0d8;
65 | }
66 |
67 | .json_renderer .hash_items {
68 | position: relative;
69 | }
70 |
71 | .json_renderer .hash_items:before {
72 | content: "{";
73 | color: #999;
74 | position: absolute;
75 | top: 0px;
76 | left: 3px;
77 | }
78 |
79 | .json_renderer .hash_items:after {
80 | content: "}";
81 | color: #999;
82 | position: absolute;
83 | bottom: 0px;
84 | left: 3px;
85 | }
86 |
87 | .json_renderer .array_items {
88 | position: relative;
89 | }
90 |
91 | .json_renderer .array_items:before {
92 | content: "[";
93 | color: #999;
94 | position: absolute;
95 | top: 0px;
96 | left: -10px;
97 | }
98 |
99 | .json_renderer .array_items:after {
100 | content: "]";
101 | color: #999;
102 | position: absolute;
103 | bottom: 0px;
104 | right: -10px;
105 | }
106 |
107 | .json_renderer .empty,
108 | .json_renderer .null_val {
109 | color: #bbb;
110 | }
111 |
112 | .json_renderer .removed {
113 | color: #b94a48;
114 | background-color: #f2dede;
115 | min-width: 200px;
116 | border: 2px solid #eed3d7;
117 | text-align: center;
118 | padding: 1em;
119 | }
120 |
--------------------------------------------------------------------------------
/assets/css/pygments.snytax.css:
--------------------------------------------------------------------------------
1 | .highlight .hll { background-color: #ffffcc }
2 | .highlight .c { color: #60a0b0; font-style: italic } /* Comment */
3 | .highlight .err { border: 1px solid #FF0000 } /* Error */
4 | .highlight .k { color: #007020; font-weight: bold } /* Keyword */
5 | .highlight .o { color: #666666 } /* Operator */
6 | .highlight .cm { color: #60a0b0; font-style: italic } /* Comment.Multiline */
7 | .highlight .cp { color: #007020 } /* Comment.Preproc */
8 | .highlight .c1 { color: #60a0b0; font-style: italic } /* Comment.Single */
9 | .highlight .cs { color: #60a0b0; background-color: #fff0f0 } /* Comment.Special */
10 | .highlight .gd { color: #A00000 } /* Generic.Deleted */
11 | .highlight .ge { font-style: italic } /* Generic.Emph */
12 | .highlight .gr { color: #FF0000 } /* Generic.Error */
13 | .highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */
14 | .highlight .gi { color: #00A000 } /* Generic.Inserted */
15 | .highlight .go { color: #808080 } /* Generic.Output */
16 | .highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */
17 | .highlight .gs { font-weight: bold } /* Generic.Strong */
18 | .highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
19 | .highlight .gt { color: #0040D0 } /* Generic.Traceback */
20 | .highlight .kc { color: #007020; font-weight: bold } /* Keyword.Constant */
21 | .highlight .kd { color: #007020; font-weight: bold } /* Keyword.Declaration */
22 | .highlight .kn { color: #007020; font-weight: bold } /* Keyword.Namespace */
23 | .highlight .kp { color: #007020 } /* Keyword.Pseudo */
24 | .highlight .kr { color: #007020; font-weight: bold } /* Keyword.Reserved */
25 | .highlight .kt { color: #902000 } /* Keyword.Type */
26 | .highlight .m { color: #40a070 } /* Literal.Number */
27 | .highlight .s { color: #4070a0 } /* Literal.String */
28 | .highlight .na { color: #4070a0 } /* Name.Attribute */
29 | .highlight .nb { color: #007020 } /* Name.Builtin */
30 | .highlight .nc { color: #0e84b5; font-weight: bold } /* Name.Class */
31 | .highlight .no { color: #60add5 } /* Name.Constant */
32 | .highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */
33 | .highlight .ni { color: #d55537; font-weight: bold } /* Name.Entity */
34 | .highlight .ne { color: #007020 } /* Name.Exception */
35 | .highlight .nf { color: #06287e } /* Name.Function */
36 | .highlight .nl { color: #002070; font-weight: bold } /* Name.Label */
37 | .highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */
38 | .highlight .nt { color: #062873; font-weight: bold } /* Name.Tag */
39 | .highlight .nv { color: #bb60d5 } /* Name.Variable */
40 | .highlight .ow { color: #007020; font-weight: bold } /* Operator.Word */
41 | .highlight .w { color: #bbbbbb } /* Text.Whitespace */
42 | .highlight .mf { color: #40a070 } /* Literal.Number.Float */
43 | .highlight .mh { color: #40a070 } /* Literal.Number.Hex */
44 | .highlight .mi { color: #40a070 } /* Literal.Number.Integer */
45 | .highlight .mo { color: #40a070 } /* Literal.Number.Oct */
46 | .highlight .sb { color: #4070a0 } /* Literal.String.Backtick */
47 | .highlight .sc { color: #4070a0 } /* Literal.String.Char */
48 | .highlight .sd { color: #4070a0; font-style: italic } /* Literal.String.Doc */
49 | .highlight .s2 { color: #4070a0 } /* Literal.String.Double */
50 | .highlight .se { color: #4070a0; font-weight: bold } /* Literal.String.Escape */
51 | .highlight .sh { color: #4070a0 } /* Literal.String.Heredoc */
52 | .highlight .si { color: #70a0d0; font-style: italic } /* Literal.String.Interpol */
53 | .highlight .sx { color: #c65d09 } /* Literal.String.Other */
54 | .highlight .sr { color: #235388 } /* Literal.String.Regex */
55 | .highlight .s1 { color: #4070a0 } /* Literal.String.Single */
56 | .highlight .ss { color: #517918 } /* Literal.String.Symbol */
57 | .highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */
58 | .highlight .vc { color: #bb60d5 } /* Name.Variable.Class */
59 | .highlight .vg { color: #bb60d5 } /* Name.Variable.Global */
60 | .highlight .vi { color: #bb60d5 } /* Name.Variable.Instance */
61 | .highlight .il { color: #40a070 } /* Literal.Number.Integer.Long */
62 |
--------------------------------------------------------------------------------
/assets/css/rendered_edn.css:
--------------------------------------------------------------------------------
1 | .rendered-edn .keyval > .keyword {
2 | color: rgb(196,33,0);
3 | padding-right: 10px;
4 | }
5 |
6 | .rendered-edn .collection {
7 | position: relative;
8 | }
9 |
10 | .rendered-edn .vector,
11 | .rendered-edn .set {
12 | padding-left: 0.9em;
13 | padding-right: 0.9em;
14 | }
15 |
16 | .rendered-edn .set {
17 | padding-left: 1.2em;
18 | }
19 |
20 | .rendered-edn .collection.map {
21 | padding: 1.8em;
22 | display: block;
23 | vertical-align: top;
24 | }
25 |
26 | .rendered-edn .vector,
27 | .rendered-edn .set {
28 | display: inline-block;
29 | vertical-align: top;
30 | }
31 |
32 | .rendered-edn .vector > .contents {
33 | background-color: rgba(0,0,0,0.01);
34 | }
35 |
36 | .rendered-edn .keyval {
37 | display: inline-block;
38 | }
39 |
40 | .rendered-edn .collection.map > .contents > .separator {
41 | padding-right: 10px;
42 | }
43 |
44 | .rendered-edn .collection .collection > .contents {
45 | /* background-color: rgba(0,0,0,0.02); */
46 | }
47 |
48 | .rendered-edn .collection .contents > .collection:nth-child(even) {
49 | background-color: rgba(0,0,0,0.04);
50 | }
51 |
52 | .rendered-edn .contents {
53 | display: inline-block;
54 | }
55 |
56 | .rendered-edn .opener,
57 | .rendered-edn .closer {
58 | color: #999;
59 | }
60 |
61 |
62 |
63 | .rendered-edn .collection.map > .opener,
64 | .rendered-edn .collection.vector > .opener,
65 | .rendered-edn .collection.set > .opener {
66 | position: absolute;
67 | top: 0px;
68 | left: 3px;
69 | }
70 | .rendered-edn .collection.map > .closer {
71 | position: absolute;
72 | bottom: 0px;
73 | left: 3px;
74 | display: block;
75 | }
76 |
77 | .rendered-edn .collection.vector > .closer,
78 | .rendered-edn .collection.set > .closer {
79 | position: absolute;
80 | bottom: 0px;
81 | right: 0px;
82 | display: block;
83 | }
--------------------------------------------------------------------------------
/assets/css/yome.css:
--------------------------------------------------------------------------------
1 | .yome-widget {
2 | background-color: rgb(24,26,38);
3 | color: white;
4 | font-family: sans-serif;
5 | margin-bottom: 2em;
6 | padding-top: 20px;
7 | padding-bottom: 20px;
8 | }
9 |
10 | .yome-widget svg line,
11 | .yome-widget svg polygon,
12 | .yome-widget svg ellipse {
13 | stroke: #2997ab;
14 | stroke-width: 2;
15 | fill: transparent;
16 | -webkit-animation: yome-widget-appear 0.7s;
17 | }
18 |
19 | .yome-widget .top-control {
20 | width: 208px;
21 | margin: auto;
22 | }
23 |
24 | .yome-widget-body {
25 | position: relative;
26 | width: 500px;
27 | margin: auto;
28 | }
29 |
30 | .control-holder { width: 10px; position: absolute; }
31 |
32 | .yome-widget .window-control-offset {
33 | position: relative;
34 | top: -7px;
35 | left: -25px;
36 | width: 55px;
37 | height: 14px;
38 | }
39 |
40 | .yome-widget .corner-control-offset {
41 | position: relative;
42 | top: -21px;
43 | left: -35px;
44 | height: 42px;
45 | width: 70px;
46 | }
47 |
48 | .yome-widget a {
49 | color: #f2eac4;
50 | text-decoration: none;
51 | display: block;
52 | font-size: 12px;
53 | line-height: 1.2em;
54 | text-align: left;
55 | white-space: nowrap;
56 | }
57 |
58 | .yome-widget a.remove { color: rgb(239, 131, 75);}
59 | .yome-widget a.hidden { visibility: hidden; display:block !important; }
60 |
61 | @-webkit-keyframes yome-widget-appear {
62 | 0% { opacity: 0; }
63 | 100% { opacity: 1;}
64 | }
65 |
66 | @media (max-width: 420px) {
67 | .yome-widget {
68 | border-radius: 0px;
69 | overflow: hidden;
70 | margin-left: -15px;
71 | margin-right: -15px;
72 | }
73 | .yome-widget-body {
74 | margin: 0px;
75 | width: 300px;
76 | height: 400px;
77 | top: -50px;
78 | left: -30px;
79 | -webkit-transform: scale(0.75);
80 | transform: scale(0.75);
81 | }
82 | }
83 |
84 | @media (max-width: 320px) {
85 | .yome-widget {
86 | border-radius: 0px;
87 | overflow: hidden;
88 | margin-left: -15px;
89 | margin-right: -15px;
90 | }
91 | .yome-widget-body {
92 | margin: 0px;
93 | width: 216px;
94 | height: 344px;
95 | top: -50px;
96 | left: -30px;
97 | -webkit-transform: scale(0.60);
98 | transform: scale(0.60);
99 | }
100 | }
101 |
102 |
--------------------------------------------------------------------------------
/assets/css/yome_style.css:
--------------------------------------------------------------------------------
1 | body {
2 | background-color: rgb(24,26,38);
3 | color: white;
4 | font-family: sans-serif;
5 | }
6 |
7 | svg line, svg polygon, svg ellipse {
8 | stroke: #2997ab;
9 | stroke-width: 2;
10 | fill: transparent;
11 | -webkit-animation: appear 0.7s;
12 | }
13 |
14 | .yome-widget-body { position: relative; }
15 | .control-holder { position: absolute; }
16 |
17 | .window-control-offset {
18 | position: relative;
19 | top: -7px;
20 | left: -25px;
21 | }
22 |
23 | .corner-control-offset {
24 | position: relative;
25 | top: -21px;
26 | left: -35px;
27 | }
28 |
29 | a {
30 | color: white;
31 | text-decoration: none;
32 | display: block;
33 | font-size: 12px;
34 | }
35 |
36 |
37 | a.remove { color: rgb(239, 131, 75);}
38 | a.hidden { visibility: hidden;}
39 |
40 | @-webkit-keyframes appear {
41 | 0% { opacity: 0; }
42 | 100% { opacity: 1;}
43 | }
44 |
45 |
--------------------------------------------------------------------------------
/assets/fonts/CartoGothicStd-Bold-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/fonts/CartoGothicStd-Bold-webfont.eot
--------------------------------------------------------------------------------
/assets/fonts/CartoGothicStd-Bold-webfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/fonts/CartoGothicStd-Bold-webfont.ttf
--------------------------------------------------------------------------------
/assets/fonts/CartoGothicStd-Bold-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/fonts/CartoGothicStd-Bold-webfont.woff
--------------------------------------------------------------------------------
/assets/fonts/CartoGothicStd-BoldItalic-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/fonts/CartoGothicStd-BoldItalic-webfont.eot
--------------------------------------------------------------------------------
/assets/fonts/CartoGothicStd-BoldItalic-webfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/fonts/CartoGothicStd-BoldItalic-webfont.ttf
--------------------------------------------------------------------------------
/assets/fonts/CartoGothicStd-BoldItalic-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/fonts/CartoGothicStd-BoldItalic-webfont.woff
--------------------------------------------------------------------------------
/assets/fonts/CartoGothicStd-Book-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/fonts/CartoGothicStd-Book-webfont.eot
--------------------------------------------------------------------------------
/assets/fonts/CartoGothicStd-Book-webfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/fonts/CartoGothicStd-Book-webfont.ttf
--------------------------------------------------------------------------------
/assets/fonts/CartoGothicStd-Book-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/fonts/CartoGothicStd-Book-webfont.woff
--------------------------------------------------------------------------------
/assets/fonts/CartoGothicStd-Italic-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/fonts/CartoGothicStd-Italic-webfont.eot
--------------------------------------------------------------------------------
/assets/fonts/CartoGothicStd-Italic-webfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/fonts/CartoGothicStd-Italic-webfont.ttf
--------------------------------------------------------------------------------
/assets/fonts/CartoGothicStd-Italic-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/fonts/CartoGothicStd-Italic-webfont.woff
--------------------------------------------------------------------------------
/assets/fonts/DroidSerif-Bold-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/fonts/DroidSerif-Bold-webfont.eot
--------------------------------------------------------------------------------
/assets/fonts/DroidSerif-Bold-webfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/fonts/DroidSerif-Bold-webfont.ttf
--------------------------------------------------------------------------------
/assets/fonts/DroidSerif-Bold-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/fonts/DroidSerif-Bold-webfont.woff
--------------------------------------------------------------------------------
/assets/fonts/DroidSerif-BoldItalic-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/fonts/DroidSerif-BoldItalic-webfont.eot
--------------------------------------------------------------------------------
/assets/fonts/DroidSerif-BoldItalic-webfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/fonts/DroidSerif-BoldItalic-webfont.ttf
--------------------------------------------------------------------------------
/assets/fonts/DroidSerif-BoldItalic-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/fonts/DroidSerif-BoldItalic-webfont.woff
--------------------------------------------------------------------------------
/assets/fonts/DroidSerif-Italic-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/fonts/DroidSerif-Italic-webfont.eot
--------------------------------------------------------------------------------
/assets/fonts/DroidSerif-Italic-webfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/fonts/DroidSerif-Italic-webfont.ttf
--------------------------------------------------------------------------------
/assets/fonts/DroidSerif-Italic-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/fonts/DroidSerif-Italic-webfont.woff
--------------------------------------------------------------------------------
/assets/fonts/DroidSerif-Regular-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/fonts/DroidSerif-Regular-webfont.eot
--------------------------------------------------------------------------------
/assets/fonts/DroidSerif-Regular-webfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/fonts/DroidSerif-Regular-webfont.ttf
--------------------------------------------------------------------------------
/assets/fonts/DroidSerif-Regular-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/fonts/DroidSerif-Regular-webfont.woff
--------------------------------------------------------------------------------
/assets/fonts/FontSite License.txt:
--------------------------------------------------------------------------------
1 | This typeface software ("SOFTWARE") is the property of FontSite Inc. Its use by you is covered under the terms of an End-User License Agreement (“EULA”). By exercising your rights to make and use copies of this SOFTWARE, you agree to be bound by the terms of this EULA. If you do not agree to the terms of this EULA, you may not use the SOFTWARE.
2 |
3 | The SOFTWARE may be utilized for production purposes as needed for final output on any surface where the image will be rendered at a fixed size (e.g., document, t-shirt, computer screen).
4 |
5 | EMBEDDING:
6 | Adobe Portable Document Format (“PDF”) Embedding: Users may embed the licensed fonts into any read-only PDF you send to third parties. Unless the SOFTWARE is distributed as outlined below such documents may only be viewable and printable (but not editable) by the recipients.
7 |
8 | HTML Web Page Embedding: Users may embed the licensed fonts into HTML web pages only for the purpose of typesetting the page using any of the following methods and technologies: @font-face Cascading Style Sheet (“CSS”) rules, Adobe Flash files, Microsoft Silverlight files, sIFR, fLIR, Cufón and Typeface.js. Other technologies not listed here that would allow a designer to typeset web pages using the licensed fonts are allowed. The licensed fonts must not be obviously downloadable and must be reasonably hidden from average users with whatever web page embedding method employed.
9 |
10 | Application and Game Embedding: Users may embed the licensed fonts into a computer application or game only with the written permission of FontSite Inc.
11 |
12 | This SOFTWARE is a valuable asset of FontSite Inc. which is protected by copyright laws and international copyright treaties, as well as other intellectual property laws and treaties. The typeface software is licensed, not sold.
13 |
14 | This EULA grants you the following rights:
15 |
16 | You may install and use an unlimited number of copies of this SOFTWARE.
17 | You may reproduce and distribute an unlimited number of copies of this SOFTWARE, provided that each copy shall be a true and complete copy, including all copyright and trademark notices, electronic documentation (user guide in PDF format, etc.), and shall be accompanied by a copy of this EULA. Copies of the SOFTWARE may not be distributed for profit either on a standalone basis or included as part of your own product.
--------------------------------------------------------------------------------
/assets/fonts/GUST e-foundry License.txt:
--------------------------------------------------------------------------------
1 | This is a preliminary version (2006-09-30), barring acceptance from
2 | the LaTeX Project Team and other feedback, of the GUST Font License.
3 | (GUST is the Polish TeX Users Group, http://www.gust.org.pl)
4 |
5 | For the most recent version of this license see
6 | http://www.gust.org.pl/fonts/licenses/GUST-FONT-LICENSE.txt
7 | or
8 | http://tug.org/fonts/licenses/GUST-FONT-LICENSE.txt
9 |
10 | This work may be distributed and/or modified under the conditions
11 | of the LaTeX Project Public License, either version 1.3c of this
12 | license or (at your option) any later version.
13 |
14 | Please also observe the following clause:
15 | 1) it is requested, but not legally required, that derived works be
16 | distributed only after changing the names of the fonts comprising this
17 | work and given in an accompanying "manifest", and that the
18 | files comprising the Work, as listed in the manifest, also be given
19 | new names. Any exceptions to this request are also given in the
20 | manifest.
21 |
22 | We recommend the manifest be given in a separate file named
23 | MANIFEST-
.txt, where is some unique identification
24 | of the font family. If a separate "readme" file accompanies the Work,
25 | we recommend a name of the form README-.txt.
26 |
27 | The latest version of the LaTeX Project Public License is in
28 | http://www.latex-project.org/lppl.txt and version 1.3c or later
29 | is part of all distributions of LaTeX version 2006/05/20 or later.
30 |
--------------------------------------------------------------------------------
/assets/fonts/Google Android License.txt:
--------------------------------------------------------------------------------
1 | Copyright (C) 2008 The Android Open Source Project
2 |
3 | Licensed under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License.
5 | You may obtain a copy of the License at
6 |
7 | http://www.apache.org/licenses/LICENSE-2.0
8 |
9 | Unless required by applicable law or agreed to in writing, software
10 | distributed under the License is distributed on an "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | See the License for the specific language governing permissions and
13 | limitations under the License.
14 |
15 | ##########
16 |
17 | This directory contains the fonts for the platform. They are licensed
18 | under the Apache 2 license.
19 |
--------------------------------------------------------------------------------
/assets/fonts/Kontrapunkt License.txt:
--------------------------------------------------------------------------------
1 | Designed by Bo Linnemann – Kontrapunkt A/S. The font may be used and distributed freely – NOT FOR RESALE. www.kontrapunkt.com
--------------------------------------------------------------------------------
/assets/fonts/Kontrapunkt-Bold-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/fonts/Kontrapunkt-Bold-webfont.eot
--------------------------------------------------------------------------------
/assets/fonts/Kontrapunkt-Bold-webfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/fonts/Kontrapunkt-Bold-webfont.ttf
--------------------------------------------------------------------------------
/assets/fonts/Kontrapunkt-Bold-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/fonts/Kontrapunkt-Bold-webfont.woff
--------------------------------------------------------------------------------
/assets/fonts/Kontrapunkt-Light-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/fonts/Kontrapunkt-Light-webfont.eot
--------------------------------------------------------------------------------
/assets/fonts/Kontrapunkt-Light-webfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/fonts/Kontrapunkt-Light-webfont.ttf
--------------------------------------------------------------------------------
/assets/fonts/Kontrapunkt-Light-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/fonts/Kontrapunkt-Light-webfont.woff
--------------------------------------------------------------------------------
/assets/fonts/Kontrapunkt-LightItalic-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/fonts/Kontrapunkt-LightItalic-webfont.eot
--------------------------------------------------------------------------------
/assets/fonts/Kontrapunkt-LightItalic-webfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/fonts/Kontrapunkt-LightItalic-webfont.ttf
--------------------------------------------------------------------------------
/assets/fonts/Kontrapunkt-LightItalic-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/fonts/Kontrapunkt-LightItalic-webfont.woff
--------------------------------------------------------------------------------
/assets/fonts/demo.html:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
7 |
8 | Font Face Demo
9 |
10 |
24 |
25 |
26 |
27 |
28 |
Font-face Demo for the TeX Gyre Cursor Font
29 |
30 |
31 |
32 |
TeX Gyre Cursor Regular - Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
33 |
34 |
35 |
36 |
TeX Gyre Cursor Italic - Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
37 |
38 |
39 |
40 |
TeX Gyre Cursor Bold - Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
41 |
42 |
43 |
44 |
TeX Gyre Cursor Bold Italic - Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
45 |
46 |
47 |
48 |
49 |
--------------------------------------------------------------------------------
/assets/fonts/stylesheet.css:
--------------------------------------------------------------------------------
1 | /* Generated by Font Squirrel (http://www.fontsquirrel.com) on March 2, 2012 07:56:29 PM America/New_York */
2 |
3 |
4 |
5 | @font-face {
6 | font-family: 'TeXGyreCursorRegular';
7 | src: url('texgyrecursor-regular-webfont.eot');
8 | src: url('texgyrecursor-regular-webfont.eot?#iefix') format('embedded-opentype'),
9 | url('texgyrecursor-regular-webfont.woff') format('woff'),
10 | url('texgyrecursor-regular-webfont.ttf') format('truetype'),
11 | url('texgyrecursor-regular-webfont.svg#TeXGyreCursorRegular') format('svg');
12 | font-weight: normal;
13 | font-style: normal;
14 |
15 | }
16 |
17 | @font-face {
18 | font-family: 'TeXGyreCursorItalic';
19 | src: url('texgyrecursor-italic-webfont.eot');
20 | src: url('texgyrecursor-italic-webfont.eot?#iefix') format('embedded-opentype'),
21 | url('texgyrecursor-italic-webfont.woff') format('woff'),
22 | url('texgyrecursor-italic-webfont.ttf') format('truetype'),
23 | url('texgyrecursor-italic-webfont.svg#TeXGyreCursorItalic') format('svg');
24 | font-weight: normal;
25 | font-style: normal;
26 |
27 | }
28 |
29 | @font-face {
30 | font-family: 'TeXGyreCursorBold';
31 | src: url('texgyrecursor-bold-webfont.eot');
32 | src: url('texgyrecursor-bold-webfont.eot?#iefix') format('embedded-opentype'),
33 | url('texgyrecursor-bold-webfont.woff') format('woff'),
34 | url('texgyrecursor-bold-webfont.ttf') format('truetype'),
35 | url('texgyrecursor-bold-webfont.svg#TeXGyreCursorBold') format('svg');
36 | font-weight: normal;
37 | font-style: normal;
38 |
39 | }
40 |
41 | @font-face {
42 | font-family: 'TeXGyreCursorBoldItalic';
43 | src: url('texgyrecursor-bolditalic-webfont.eot');
44 | src: url('texgyrecursor-bolditalic-webfont.eot?#iefix') format('embedded-opentype'),
45 | url('texgyrecursor-bolditalic-webfont.woff') format('woff'),
46 | url('texgyrecursor-bolditalic-webfont.ttf') format('truetype'),
47 | url('texgyrecursor-bolditalic-webfont.svg#TeXGyreCursorBoldItalic') format('svg');
48 | font-weight: normal;
49 | font-style: normal;
50 |
51 | }
52 |
53 |
--------------------------------------------------------------------------------
/assets/fonts/texgyrecursor-bold-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/fonts/texgyrecursor-bold-webfont.eot
--------------------------------------------------------------------------------
/assets/fonts/texgyrecursor-bold-webfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/fonts/texgyrecursor-bold-webfont.ttf
--------------------------------------------------------------------------------
/assets/fonts/texgyrecursor-bold-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/fonts/texgyrecursor-bold-webfont.woff
--------------------------------------------------------------------------------
/assets/fonts/texgyrecursor-bolditalic-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/fonts/texgyrecursor-bolditalic-webfont.eot
--------------------------------------------------------------------------------
/assets/fonts/texgyrecursor-bolditalic-webfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/fonts/texgyrecursor-bolditalic-webfont.ttf
--------------------------------------------------------------------------------
/assets/fonts/texgyrecursor-bolditalic-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/fonts/texgyrecursor-bolditalic-webfont.woff
--------------------------------------------------------------------------------
/assets/fonts/texgyrecursor-italic-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/fonts/texgyrecursor-italic-webfont.eot
--------------------------------------------------------------------------------
/assets/fonts/texgyrecursor-italic-webfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/fonts/texgyrecursor-italic-webfont.ttf
--------------------------------------------------------------------------------
/assets/fonts/texgyrecursor-italic-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/fonts/texgyrecursor-italic-webfont.woff
--------------------------------------------------------------------------------
/assets/fonts/texgyrecursor-regular-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/fonts/texgyrecursor-regular-webfont.eot
--------------------------------------------------------------------------------
/assets/fonts/texgyrecursor-regular-webfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/fonts/texgyrecursor-regular-webfont.ttf
--------------------------------------------------------------------------------
/assets/fonts/texgyrecursor-regular-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/fonts/texgyrecursor-regular-webfont.woff
--------------------------------------------------------------------------------
/assets/images/coronavirus-cases-march-20-2020.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/images/coronavirus-cases-march-20-2020.png
--------------------------------------------------------------------------------
/assets/images/covid_charts/CanadaConfirmed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/images/covid_charts/CanadaConfirmed.png
--------------------------------------------------------------------------------
/assets/images/covid_charts/CanadaConfirmedLogScale.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/images/covid_charts/CanadaConfirmedLogScale.png
--------------------------------------------------------------------------------
/assets/images/covid_charts/CanadaConfirmedZeroStart.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/images/covid_charts/CanadaConfirmedZeroStart.png
--------------------------------------------------------------------------------
/assets/images/covid_charts/CanadaConfirmedZeroStartLogScale.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/images/covid_charts/CanadaConfirmedZeroStartLogScale.png
--------------------------------------------------------------------------------
/assets/images/covid_charts/CanadaPerCapita.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/images/covid_charts/CanadaPerCapita.png
--------------------------------------------------------------------------------
/assets/images/covid_charts/CanadaPerCapitaZeroStart.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/images/covid_charts/CanadaPerCapitaZeroStart.png
--------------------------------------------------------------------------------
/assets/images/covid_charts/out.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/images/covid_charts/out.png
--------------------------------------------------------------------------------
/assets/images/dome.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/images/dome.jpg
--------------------------------------------------------------------------------
/assets/images/dome/basic_dome_geometry.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/images/dome/basic_dome_geometry.png
--------------------------------------------------------------------------------
/assets/images/dome/bottom_pieces.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/images/dome/bottom_pieces.png
--------------------------------------------------------------------------------
/assets/images/dome/clear_dome.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/images/dome/clear_dome.jpg
--------------------------------------------------------------------------------
/assets/images/dome/first_peice_layout.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/images/dome/first_peice_layout.png
--------------------------------------------------------------------------------
/assets/images/dome/half_hexagon_shape.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/images/dome/half_hexagon_shape.png
--------------------------------------------------------------------------------
/assets/images/dome/hexagon_highlight.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/images/dome/hexagon_highlight.png
--------------------------------------------------------------------------------
/assets/images/dome/inner_dome_patterns.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/images/dome/inner_dome_patterns.png
--------------------------------------------------------------------------------
/assets/images/dome/interior_photo1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/images/dome/interior_photo1.jpg
--------------------------------------------------------------------------------
/assets/images/dome/interior_photo2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/images/dome/interior_photo2.jpg
--------------------------------------------------------------------------------
/assets/images/dome/interior_photo3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/images/dome/interior_photo3.jpg
--------------------------------------------------------------------------------
/assets/images/dome/interior_photo4.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/images/dome/interior_photo4.jpg
--------------------------------------------------------------------------------
/assets/images/dome/interior_photo5.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/images/dome/interior_photo5.jpg
--------------------------------------------------------------------------------
/assets/images/dome/interior_photo6.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/images/dome/interior_photo6.jpg
--------------------------------------------------------------------------------
/assets/images/dome/pentagon_highlight.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/images/dome/pentagon_highlight.png
--------------------------------------------------------------------------------
/assets/images/dome/pentagon_lower_layout.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/images/dome/pentagon_lower_layout.png
--------------------------------------------------------------------------------
/assets/images/dome/pentagon_three_piece.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/images/dome/pentagon_three_piece.png
--------------------------------------------------------------------------------
/assets/images/dome/pentagon_two_peice.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/images/dome/pentagon_two_peice.png
--------------------------------------------------------------------------------
/assets/images/dome/pentagon_two_piece_layout.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/images/dome/pentagon_two_piece_layout.png
--------------------------------------------------------------------------------
/assets/images/dome/self_strut_patent.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/images/dome/self_strut_patent.png
--------------------------------------------------------------------------------
/assets/images/dome/soccerball.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/images/dome/soccerball.jpg
--------------------------------------------------------------------------------
/assets/images/dome/stevemiller_plydome.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/images/dome/stevemiller_plydome.jpg
--------------------------------------------------------------------------------
/assets/images/figconf/badtype.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/images/figconf/badtype.png
--------------------------------------------------------------------------------
/assets/images/figconf/figwheel-at-work.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/images/figconf/figwheel-at-work.jpg
--------------------------------------------------------------------------------
/assets/images/figconf/live-reload-option.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/images/figconf/live-reload-option.png
--------------------------------------------------------------------------------
/assets/images/figconf/mispacement.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/images/figconf/mispacement.png
--------------------------------------------------------------------------------
/assets/images/figconf/mispelling.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/images/figconf/mispelling.png
--------------------------------------------------------------------------------
/assets/images/figconf/missingkey.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/images/figconf/missingkey.png
--------------------------------------------------------------------------------
/assets/images/figwheel-starting-output.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/images/figwheel-starting-output.png
--------------------------------------------------------------------------------
/assets/images/geo_sprite.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/images/geo_sprite.png
--------------------------------------------------------------------------------
/assets/images/geo_sprite@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/images/geo_sprite@2x.png
--------------------------------------------------------------------------------
/assets/images/great_shoes.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/images/great_shoes.jpeg
--------------------------------------------------------------------------------
/assets/images/great_shoes_avatar.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/images/great_shoes_avatar.jpeg
--------------------------------------------------------------------------------
/assets/images/great_shoes_crop.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/images/great_shoes_crop.jpeg
--------------------------------------------------------------------------------
/assets/images/plastic_dome_first.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/images/plastic_dome_first.jpg
--------------------------------------------------------------------------------
/assets/images/plastic_dome_second.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/images/plastic_dome_second.jpg
--------------------------------------------------------------------------------
/assets/images/plydome_first.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/images/plydome_first.jpg
--------------------------------------------------------------------------------
/assets/images/queen.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/images/queen.jpg
--------------------------------------------------------------------------------
/assets/images/warning_triangle.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/images/warning_triangle.png
--------------------------------------------------------------------------------
/assets/images/yome.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/images/yome.jpg
--------------------------------------------------------------------------------
/assets/js/eight-queens/eight-queens.js:
--------------------------------------------------------------------------------
1 | goog.addDependency("base.js", ['goog'], []);
2 | goog.addDependency("../cljs/core.js", ['cljs.core'], ['goog.string', 'goog.array', 'goog.object', 'goog.string.StringBuffer']);
3 | goog.addDependency("../cljs/core/async/impl/protocols.js", ['cljs.core.async.impl.protocols'], ['cljs.core']);
4 | goog.addDependency("../cljs/core/async/impl/ioc_helpers.js", ['cljs.core.async.impl.ioc_helpers'], ['cljs.core', 'cljs.core.async.impl.protocols']);
5 | goog.addDependency("../cljs/core/async/impl/buffers.js", ['cljs.core.async.impl.buffers'], ['cljs.core', 'cljs.core.async.impl.protocols']);
6 | goog.addDependency("../cljs/core/async/impl/dispatch.js", ['cljs.core.async.impl.dispatch'], ['cljs.core.async.impl.buffers', 'cljs.core']);
7 | goog.addDependency("../cljs/core/async/impl/channels.js", ['cljs.core.async.impl.channels'], ['cljs.core.async.impl.buffers', 'cljs.core', 'cljs.core.async.impl.dispatch', 'cljs.core.async.impl.protocols']);
8 | goog.addDependency("../cljs/core/async/impl/timers.js", ['cljs.core.async.impl.timers'], ['cljs.core', 'cljs.core.async.impl.channels', 'cljs.core.async.impl.dispatch', 'cljs.core.async.impl.protocols']);
9 | goog.addDependency("../cljs/core/async.js", ['cljs.core.async'], ['cljs.core.async.impl.ioc_helpers', 'cljs.core.async.impl.buffers', 'cljs.core', 'cljs.core.async.impl.channels', 'cljs.core.async.impl.dispatch', 'cljs.core.async.impl.protocols', 'cljs.core.async.impl.timers']);
10 | goog.addDependency("../reactor/core.js", ['reactor.core'], ['cljs.core', 'cljs.core.async']);
11 | goog.addDependency("../frontier/core.js", ['frontier.core'], ['cljs.core', 'cljs.core.async']);
12 | goog.addDependency("../jayq/util.js", ['jayq.util'], ['cljs.core']);
13 | goog.addDependency("../clojure/walk.js", ['clojure.walk'], ['cljs.core']);
14 | goog.addDependency("../clojure/string.js", ['clojure.string'], ['cljs.core', 'goog.string', 'goog.string.StringBuffer']);
15 | goog.addDependency("../sablono/util.js", ['sablono.util'], ['cljs.core', 'clojure.string', 'goog.Uri']);
16 | goog.addDependency("../sablono/render.js", ['sablono.render'], ['cljs.core', 'clojure.walk', 'clojure.string', 'sablono.util']);
17 | goog.addDependency("../sablono/core.js", ['sablono.core'], ['cljs.core', 'clojure.walk', 'clojure.string', 'sablono.util', 'sablono.render']);
18 | goog.addDependency("../frontier/util/edn_renderer.js", ['frontier.util.edn_renderer'], ['sablono.core', 'cljs.core']);
19 | goog.addDependency("../frontier/dev_tools.js", ['frontier.dev_tools'], ['sablono.core', 'cljs.core', 'frontier.core', 'reactor.core', 'jayq.util', 'frontier.util.edn_renderer', 'cljs.core.async']);
20 | goog.addDependency("../frontier/example/components.js", ['frontier.example.components'], ['cljs.core', 'frontier.core', 'jayq.util', 'cljs.core.async']);
21 | goog.addDependency("../cljs/reader.js", ['cljs.reader'], ['cljs.core', 'goog.string']);
22 | goog.addDependency("../jayq/core.js", ['jayq.core'], ['cljs.core', 'clojure.string', 'cljs.reader']);
23 | goog.addDependency("../frontier/example/core.js", ['frontier.example.core'], ['frontier.example.components', 'cljs.core', 'frontier.core', 'jayq.util', 'frontier.dev_tools', 'jayq.core']);
24 | goog.addDependency("../clojure/set.js", ['clojure.set'], ['cljs.core']);
25 | goog.addDependency("../cljs/core/logic.js", ['cljs.core.logic'], ['cljs.core', 'clojure.walk', 'clojure.set']);
26 | goog.addDependency("../eight_queens/core.js", ['eight_queens.core'], ['cljs.core.logic', 'cljs.core', 'frontier.core', 'cljs.core.async', 'frontier.dev_tools']);
--------------------------------------------------------------------------------
/assets/js/eight-queens/out/cljs/core/async/impl/buffers.cljs:
--------------------------------------------------------------------------------
1 | ;; Copyright (c) Rich Hickey and contributors. All rights reserved.
2 | ;; The use and distribution terms for this software are covered by the
3 | ;; Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
4 | ;; which can be found in the file epl-v10.html at the root of this distribution.
5 | ;; By using this software in any fashion, you are agreeing to be bound by
6 | ;; the terms of this license.
7 | ;; You must not remove this notice, or any other, from this software.
8 |
9 | (ns cljs.core.async.impl.buffers
10 | (:require [cljs.core.async.impl.protocols :as impl]))
11 |
12 | ;; -----------------------------------------------------------------------------
13 | ;; DO NOT USE, this is internal buffer representation
14 |
15 | (defn acopy [src src-start dest dest-start len]
16 | (loop [cnt 0]
17 | (when (< cnt len)
18 | (aset dest
19 | (+ dest-start cnt)
20 | (aget src (+ src-start cnt)))
21 | (recur (inc cnt)))))
22 |
23 | (deftype RingBuffer [^:mutable head ^:mutable tail ^:mutable length ^:mutable arr]
24 | Object
25 | (pop [_]
26 | (when-not (zero? length)
27 | (let [x (aget arr tail)]
28 | (aset arr tail nil)
29 | (set! tail (js-mod (inc tail) (alength arr)))
30 | (set! length (dec length))
31 | x)))
32 |
33 | (unshift [_ x]
34 | (aset arr head x)
35 | (set! head (js-mod (inc head) (alength arr)))
36 | (set! length (inc length))
37 | nil)
38 |
39 | (unbounded-unshift [this x]
40 | (if (== (inc length) (alength arr))
41 | (.resize this))
42 | (.unshift this x))
43 |
44 | ;; Doubles the size of the buffer while retaining all the existing values
45 | (resize
46 | [_]
47 | (let [new-arr-size (* (alength arr) 2)
48 | new-arr (make-array new-arr-size)]
49 | (cond
50 | (< tail head)
51 | (do (acopy arr tail new-arr 0 length)
52 | (set! tail 0)
53 | (set! head length)
54 | (set! arr new-arr))
55 |
56 | (> tail head)
57 | (do (acopy arr tail new-arr 0 (- (alength arr) tail))
58 | (acopy arr 0 new-arr (- (alength arr) tail) head)
59 | (set! tail 0)
60 | (set! head length)
61 | (set! arr new-arr))
62 |
63 | (== tail head)
64 | (do (set! tail 0)
65 | (set! head 0)
66 | (set! arr new-arr)))))
67 |
68 | (cleanup [this keep?]
69 | (dotimes [x length]
70 | (let [v (.pop this)]
71 | (when ^boolean (keep? v)
72 | (.unshift this v))))))
73 |
74 | (defn ring-buffer [n]
75 | (assert (> n 0) "Can't create a ring buffer of size 0")
76 | (RingBuffer. 0 0 0 (make-array n)))
77 |
78 | ;; -----------------------------------------------------------------------------
79 |
80 | (deftype FixedBuffer [buf n]
81 | impl/Buffer
82 | (full? [this]
83 | (== (.-length buf) n))
84 | (remove! [this]
85 | (.pop buf))
86 | (add! [this itm]
87 | (assert (not (impl/full? this)) "Can't add to a full buffer")
88 | (.unshift buf itm))
89 | cljs.core/ICounted
90 | (-count [this]
91 | (.-length buf)))
92 |
93 | (defn fixed-buffer [n]
94 | (FixedBuffer. (ring-buffer n) n))
95 |
96 | (deftype DroppingBuffer [buf n]
97 | impl/UnblockingBuffer
98 | impl/Buffer
99 | (full? [this]
100 | false)
101 | (remove! [this]
102 | (.pop buf))
103 | (add! [this itm]
104 | (when-not (== (.-length buf) n)
105 | (.unshift buf itm)))
106 | cljs.core/ICounted
107 | (-count [this]
108 | (.-length buf)))
109 |
110 | (defn dropping-buffer [n]
111 | (DroppingBuffer. (ring-buffer n) n))
112 |
113 | (deftype SlidingBuffer [buf n]
114 | impl/UnblockingBuffer
115 | impl/Buffer
116 | (full? [this]
117 | false)
118 | (remove! [this]
119 | (.pop buf))
120 | (add! [this itm]
121 | (when (== (.-length buf) n)
122 | (impl/remove! this))
123 | (.unshift buf itm))
124 | cljs.core/ICounted
125 | (-count [this]
126 | (.-length buf)))
127 |
128 | (defn sliding-buffer [n]
129 | (SlidingBuffer. (ring-buffer n) n))
130 |
--------------------------------------------------------------------------------
/assets/js/eight-queens/out/cljs/core/async/impl/dispatch.cljs:
--------------------------------------------------------------------------------
1 | (ns cljs.core.async.impl.dispatch
2 | (:require [cljs.core.async.impl.buffers :as buffers]))
3 |
4 | (def message-channel nil)
5 | (def tasks (buffers/ring-buffer 32))
6 | (def ^:boolean running? false)
7 | (def ^:boolean queued? false)
8 |
9 | (def TASK_BATCH_SIZE 1024)
10 |
11 | (declare queue-dispatcher)
12 |
13 | (defn process-messages []
14 | (set! running? true)
15 | (set! queued? false)
16 | (loop [count 0]
17 | (let [m (.pop tasks)]
18 | (when-not (nil? m)
19 | (m)
20 | (when (< count TASK_BATCH_SIZE)
21 | (recur (inc count))))))
22 | (set! running? false)
23 | (when (> (.-length tasks) 0)
24 | (queue-dispatcher)))
25 |
26 | (when (exists? js/MessageChannel)
27 | (set! message-channel (js/MessageChannel.))
28 | (set! (.. message-channel -port1 -onmessage)
29 | (fn [msg]
30 | (process-messages))))
31 |
32 | (defn queue-dispatcher []
33 | (when-not ^boolean (and ^boolean queued?
34 | running?)
35 | (set! queued? true)
36 | (cond
37 | (exists? js/MessageChannel) (.postMessage (.-port2 message-channel) 0)
38 | (exists? js/setImmediate) (js/setImmediate process-messages)
39 | :else (js/setTimeout process-messages 0))))
40 |
41 | (defn run [f]
42 | (.unbounded-unshift tasks f)
43 | (queue-dispatcher))
44 |
45 | (defn queue-delay [f delay]
46 | (js/setTimeout f delay))
47 |
48 |
--------------------------------------------------------------------------------
/assets/js/eight-queens/out/cljs/core/async/impl/dispatch.js:
--------------------------------------------------------------------------------
1 | // Compiled by ClojureScript 0.0-2138
2 | goog.provide('cljs.core.async.impl.dispatch');
3 | goog.require('cljs.core');
4 | goog.require('cljs.core.async.impl.buffers');
5 | goog.require('cljs.core.async.impl.buffers');
6 | cljs.core.async.impl.dispatch.message_channel = null;
7 | cljs.core.async.impl.dispatch.tasks = cljs.core.async.impl.buffers.ring_buffer.call(null,32);
8 | cljs.core.async.impl.dispatch.running_QMARK_ = false;
9 | cljs.core.async.impl.dispatch.queued_QMARK_ = false;
10 | cljs.core.async.impl.dispatch.TASK_BATCH_SIZE = 1024;
11 | cljs.core.async.impl.dispatch.process_messages = (function process_messages(){cljs.core.async.impl.dispatch.running_QMARK_ = true;
12 | cljs.core.async.impl.dispatch.queued_QMARK_ = false;
13 | var count_13968 = 0;while(true){
14 | var m_13969 = cljs.core.async.impl.dispatch.tasks.pop();if((m_13969 == null))
15 | {} else
16 | {m_13969.call(null);
17 | if((count_13968 < cljs.core.async.impl.dispatch.TASK_BATCH_SIZE))
18 | {{
19 | var G__13970 = (count_13968 + 1);
20 | count_13968 = G__13970;
21 | continue;
22 | }
23 | } else
24 | {}
25 | }
26 | break;
27 | }
28 | cljs.core.async.impl.dispatch.running_QMARK_ = false;
29 | if((cljs.core.async.impl.dispatch.tasks.length > 0))
30 | {return cljs.core.async.impl.dispatch.queue_dispatcher.call(null);
31 | } else
32 | {return null;
33 | }
34 | });
35 | if(typeof MessageChannel !== 'undefined')
36 | {cljs.core.async.impl.dispatch.message_channel = (new MessageChannel());
37 | cljs.core.async.impl.dispatch.message_channel.port1.onmessage = (function (msg){return cljs.core.async.impl.dispatch.process_messages.call(null);
38 | });
39 | } else
40 | {}
41 | cljs.core.async.impl.dispatch.queue_dispatcher = (function queue_dispatcher(){if(cljs.core.truth_((function (){var and__3410__auto__ = cljs.core.async.impl.dispatch.queued_QMARK_;if(and__3410__auto__)
42 | {return cljs.core.async.impl.dispatch.running_QMARK_;
43 | } else
44 | {return and__3410__auto__;
45 | }
46 | })()))
47 | {return null;
48 | } else
49 | {cljs.core.async.impl.dispatch.queued_QMARK_ = true;
50 | if(typeof MessageChannel !== 'undefined')
51 | {return cljs.core.async.impl.dispatch.message_channel.port2.postMessage(0);
52 | } else
53 | {if(typeof setImmediate !== 'undefined')
54 | {return setImmediate(cljs.core.async.impl.dispatch.process_messages);
55 | } else
56 | {if(new cljs.core.Keyword(null,"else","else",1017020587))
57 | {return setTimeout(cljs.core.async.impl.dispatch.process_messages,0);
58 | } else
59 | {return null;
60 | }
61 | }
62 | }
63 | }
64 | });
65 | cljs.core.async.impl.dispatch.run = (function run(f){cljs.core.async.impl.dispatch.tasks.unbounded_unshift(f);
66 | return cljs.core.async.impl.dispatch.queue_dispatcher.call(null);
67 | });
68 | cljs.core.async.impl.dispatch.queue_delay = (function queue_delay(f,delay){return setTimeout(f,delay);
69 | });
70 |
71 | //# sourceMappingURL=dispatch.js.map
--------------------------------------------------------------------------------
/assets/js/eight-queens/out/cljs/core/async/impl/dispatch.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,
2 | "file":
3 | "/Users/bhauman/workspace/bhauman.github.com/assets/js/eight-queens/out/cljs/core/async/impl/dispatch.js",
4 | "sources":["dispatch.cljs"],
5 | "lineCount":71,
6 | "mappings":
7 | ";AAAA;;;;AAGA,gDAAA,hDAAKA;AACL,AAAKC,sCAAM,mDAAA,nDAACC;AACZ,+CAAA,/CAAeC;AACf,8CAAA,9CAAeC;AAEf,gDAAA,hDAAKC;AAEL,AAAA,AAEA,iDAAA,6BAAA,9EAAMC,8EACJ,+CAAA,/CAAMH;AACN,8CAAA,9CAAMC;AACN,kBAAA,dAAOG;AAAP,AACE,wDAAA,pDAAMC,UAAE,AAAMP,0CACZ,GAAU,YAAA,XAAMO;CAAhB;CAAA,AACE,AAACA;AACD,GAAM,CAAGD,cAAMF;CAAf,AACE;eAAO,eAAA,dAAKE;;;;;CADd;;;;AAEN,+CAAA,/CAAMJ;AACN,GAAM,8CAAA,7CAAG,AAAUF;CAAnB,AACE,OAACQ;;CADH;;;AAGF,GAAM,OAASC;CAAf,AACE,AAAMV,gDAAgB,KAAAU;AACtB,AAAM,AAAA,AAAIV,gEACJ,gBAAA,LAAKW,KACH,OAACL;;;CAJX;AAMA,iDAAA,6BAAA,9EAAMG,8EACJ,oBAAU,iBAAAG,gEAAA,AAAA,GAAAA,/CAAuBR;CACTD;;CADdS;;;CAAV;;CAAA,AAEE,8CAAA,9CAAMR;AACN,GACC,OAASM;CAAmB,uEAAA,hEAAc,AAASV;;CADpD,GAEC,OAASa;CAAiB,OAACA,aAAgBP;;CAF5C,GAAA;CAGO,iEAAA,1DAACQ,WAAcR;;CAHtB;;;;;;AAKJ,oCAAA,iBAAA,rDAAMS,kDAAKC,GACT,AAAoBf,sDAAMe;AAC1B,OAACP;;AAEH,4CAAA,+BAAA,3EAAMQ,kEAAaD,EAAEE,OACnB,OAACJ,WAAcE,EAAEE",
8 | "names":
9 | ["cljs.core.async.impl.dispatch/message-channel",
10 | "cljs.core.async.impl.dispatch/tasks",
11 | "cljs.core.async.impl.buffers/ring-buffer",
12 | "cljs.core.async.impl.dispatch/running?",
13 | "cljs.core.async.impl.dispatch/queued?",
14 | "cljs.core.async.impl.dispatch/TASK_BATCH_SIZE",
15 | "cljs.core.async.impl.dispatch/process-messages", "count", "m",
16 | "cljs.core.async.impl.dispatch/queue-dispatcher",
17 | "js/MessageChannel", "msg", "and__3410__auto__", "js/setImmediate",
18 | "js/setTimeout", "cljs.core.async.impl.dispatch/run", "f",
19 | "cljs.core.async.impl.dispatch/queue-delay", "delay"]}
--------------------------------------------------------------------------------
/assets/js/eight-queens/out/cljs/core/async/impl/protocols.cljs:
--------------------------------------------------------------------------------
1 | ;; Copyright (c) Rich Hickey and contributors. All rights reserved.
2 | ;; The use and distribution terms for this software are covered by the
3 | ;; Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
4 | ;; which can be found in the file epl-v10.html at the root of this distribution.
5 | ;; By using this software in any fashion, you are agreeing to be bound by
6 | ;; the terms of this license.
7 | ;; You must not remove this notice, or any other, from this software.
8 |
9 | (ns cljs.core.async.impl.protocols)
10 |
11 | (def ^:const MAX-QUEUE-SIZE 1024)
12 |
13 | (defprotocol ReadPort
14 | (take! [port fn1-handler] "derefable val if taken, nil if take was enqueued"))
15 |
16 | (defprotocol WritePort
17 | (put! [port val fn0-handler] "derefable nil if put, nil if put was enqueued. Must throw on nil val."))
18 |
19 | (defprotocol Channel
20 | (close! [chan]))
21 |
22 | (defprotocol Handler
23 | (active? [h] "returns true if has callback. Must work w/o lock")
24 | #_(lock-id [h] "a unique id for lock acquisition order, 0 if no lock")
25 | (commit [h] "commit to fulfilling its end of the transfer, returns cb. Must be called within lock"))
26 |
27 | (defprotocol Buffer
28 | (full? [b])
29 | (remove! [b])
30 | (add! [b itm]))
31 |
32 | ;; Defines a buffer that will never block (return true to full?)
33 | (defprotocol UnblockingBuffer)
34 |
--------------------------------------------------------------------------------
/assets/js/eight-queens/out/clojure/walk.cljs:
--------------------------------------------------------------------------------
1 | ; Copyright (c) Rich Hickey. All rights reserved.
2 | ; The use and distribution terms for this software are covered by the
3 | ; Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
4 | ; which can be found in the file epl-v10.html at the root of this distribution.
5 | ; By using this software in any fashion, you are agreeing to be bound by
6 | ; the terms of this license.
7 | ; You must not remove this notice, or any other, from this software.
8 |
9 | ;;; walk.cljs - generic tree walker with replacement
10 |
11 | ;; by Stuart Sierra
12 | ;; Jul5 17, 2011
13 |
14 | ;; CHANGE LOG:
15 | ;;
16 | ;; * July 17, 2011: Port to ClojureScript
17 | ;;
18 | ;; * December 15, 2008: replaced 'walk' with 'prewalk' & 'postwalk'
19 | ;;
20 | ;; * December 9, 2008: first version
21 |
22 |
23 | (ns
24 | ^{:author "Stuart Sierra",
25 | :doc "This file defines a generic tree walker for Clojure data
26 | structures. It takes any data structure (list, vector, map, set,
27 | seq), calls a function on every element, and uses the return value
28 | of the function in place of the original. This makes it fairly
29 | easy to write recursive search-and-replace functions, as shown in
30 | the examples.
31 |
32 | Note: \"walk\" supports all Clojure data structures EXCEPT maps
33 | created with sorted-map-by. There is no (obvious) way to retrieve
34 | the sorting function."}
35 | clojure.walk)
36 |
37 | (defn walk
38 | "Traverses form, an arbitrary data structure. inner and outer are
39 | functions. Applies inner to each element of form, building up a
40 | data structure of the same type, then applies outer to the result.
41 | Recognizes all Clojure data structures. Consumes seqs as with doall."
42 |
43 | {:added "1.1"}
44 | [inner outer form]
45 | (cond
46 | (seq? form) (outer (doall (map inner form)))
47 | (coll? form) (outer (into (empty form) (map inner form)))
48 | :else (outer form)))
49 |
50 | (defn postwalk
51 | "Performs a depth-first, post-order traversal of form. Calls f on
52 | each sub-form, uses f's return value in place of the original.
53 | Recognizes all Clojure data structures. Consumes seqs as with doall."
54 | {:added "1.1"}
55 | [f form]
56 | (walk (partial postwalk f) f form))
57 |
58 | (defn prewalk
59 | "Like postwalk, but does pre-order traversal."
60 | {:added "1.1"}
61 | [f form]
62 | (walk (partial prewalk f) identity (f form)))
63 |
64 | (defn keywordize-keys
65 | "Recursively transforms all map keys from strings to keywords."
66 | {:added "1.1"}
67 | [m]
68 | (let [f (fn [[k v]] (if (string? k) [(keyword k) v] [k v]))]
69 | ;; only apply to maps
70 | (postwalk (fn [x] (if (map? x) (into {} (map f x)) x)) m)))
71 |
72 | (defn stringify-keys
73 | "Recursively transforms all map keys from keywords to strings."
74 | {:added "1.1"}
75 | [m]
76 | (let [f (fn [[k v]] (if (keyword? k) [(name k) v] [k v]))]
77 | ;; only apply to maps
78 | (postwalk (fn [x] (if (map? x) (into {} (map f x)) x)) m)))
79 |
80 | (defn prewalk-replace
81 | "Recursively transforms form by replacing keys in smap with their
82 | values. Like clojure/replace but works on any data structure. Does
83 | replacement at the root of the tree first."
84 | {:added "1.1"}
85 | [smap form]
86 | (prewalk (fn [x] (if (contains? smap x) (smap x) x)) form))
87 |
88 | (defn postwalk-replace
89 | "Recursively transforms form by replacing keys in smap with their
90 | values. Like clojure/replace but works on any data structure. Does
91 | replacement at the leaves of the tree first."
92 | {:added "1.1"}
93 | [smap form]
94 | (postwalk (fn [x] (if (contains? smap x) (smap x) x)) form))
95 |
--------------------------------------------------------------------------------
/assets/js/eight-queens/out/clojure/walk.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,
2 | "file":
3 | "/Users/bhauman/workspace/bhauman.github.com/assets/js/eight-queens/out/clojure/walk.js",
4 | "sources":["walk.cljs"],
5 | "lineCount":91,
6 | "mappings":
7 | ";AAsBA;;AAcA;;;;;;oBAAA,iCAAA,rDAAMA,mCAOHC,MAAMC,MAAMC,MACb,GACC,AAACC,+BAAKD;CAAM,OAACD,gBAAM,AAACG,0BAAM,AAACC,wBAAIL,MAAME;;CADtC,GAEC,AAACI,gCAAMJ;CAAM,OAACD,gBAAM,AAACM,yBAAK,AAACC,0BAAMN,MAAM,AAACG,wBAAIL,MAAME;;CAFnD,GAAA;CAGO,OAACD,gBAAMC;;CAHd;;;;;AAKF;;;;;wBAAA,2BAAA,nDAAMO,2CAKHC,EAAER,MACH,OAACH,4BAAK,AAACY,4BAAQC,SAASF,GAAGA,EAAER;;AAE/B;;;uBAAA,0BAAA,jDAAMW,yCAGHH,EAAER,MACH,OAACH,4BAAK,AAACY,4BAAQG,QAAQJ,GAAGK,mBAAS,AAACL,YAAER;;AAExC;;;+BAAA,6BAAA,5DAAMc,yDAGHC,GACD,IAAMP,IAAE,WAAAQ,UAAA,AAAA,IAAAC,aAAAD,iBAAA,AAAAE,wBAAAD,WAAA,EAAA,cAAA,AAAAC,wBAAAD,WAAA,EAAA,MAAA,lGAAME,mDAAEC,+CAAI,GAAI,OAASD;CAAb,0FAAiB,AAACE,4BAAQF,GAAGC;;CAA7B,0FAAiCD,EAAEC;;GAAvD,AAEE,OAACb,gCAAS,cAAA,HAAKe,GAAG,GAAI,AAACC,+BAAKD;CAAG,gCAAA,zBAACjB,4DAAQ,AAACF,wBAAIK,EAAEc;;CAAIA;;GAAIP;;AAE3D;;;8BAAA,4BAAA,1DAAMS,uDAGHT,GACD,IAAMP,IAAE,WAAAiB,UAAA,AAAA,IAAAC,aAAAD,iBAAA,AAAAP,wBAAAQ,WAAA,EAAA,cAAA,AAAAR,wBAAAQ,WAAA,EAAA,MAAA,lGAAMP,mDAAEC,+CAAI,GAAI,cAAAO,bAAUR;CAAd,0FAAkB,AAACS,yBAAKT,GAAGC;;CAA3B,0FAA+BD,EAAEC;;GAArD,AAEE,OAACb,gCAAS,cAAA,HAAKe,GAAG,GAAI,AAACC,+BAAKD;CAAG,gCAAA,zBAACjB,4DAAQ,AAACF,wBAAIK,EAAEc;;CAAIA;;GAAIP;;AAE3D;;;;;+BAAA,qCAAA,pEAAMc,yDAKHC,KAAK9B,MACN,OAACW,+BAAQ,cAAA,HAAKW,GAAG,GAAI,AAACS,oCAAUD,KAAKR;CAAG,OAACQ,eAAKR;;CAAGA;;GAAItB;;AAEvD;;;;;gCAAA,sCAAA,tEAAMgC,2DAKHF,KAAK9B,MACN,OAACO,gCAAS,cAAA,HAAKe,GAAG,GAAI,AAACS,oCAAUD,KAAKR;CAAG,OAACQ,eAAKR;;CAAGA;;GAAItB",
8 | "names":
9 | ["clojure.walk/walk", "inner", "outer", "form", "cljs.core/seq?",
10 | "cljs.core/doall", "cljs.core/map", "cljs.core/coll?",
11 | "cljs.core/into", "cljs.core/empty", "clojure.walk/postwalk", "f",
12 | "cljs.core/partial", "postwalk", "clojure.walk/prewalk", "prewalk",
13 | "cljs.core/identity", "clojure.walk/keywordize-keys", "m",
14 | "p__10376", "vec__10377", "cljs.core/nth", "k", "v",
15 | "cljs.core/keyword", "x", "cljs.core/map?",
16 | "clojure.walk/stringify-keys", "p__10380", "vec__10381",
17 | "cljs.core/Keyword", "cljs.core/name",
18 | "clojure.walk/prewalk-replace", "smap", "cljs.core/contains?",
19 | "clojure.walk/postwalk-replace"]}
--------------------------------------------------------------------------------
/assets/js/eight-queens/out/frontier/example/components.cljs:
--------------------------------------------------------------------------------
1 | (ns frontier.example.components
2 | (:require
3 | [frontier.core :refer [iInputFilter
4 | iPluginInit
5 | iTransform
6 | iEffect
7 | iDerive
8 | add-effects]]
9 | [cljs.core.async :as async :refer [put!]]
10 | [jayq.util :refer [log]]))
11 |
12 | (defmulti count-trans identity)
13 |
14 | (defmethod count-trans :default [_ system data] system)
15 |
16 | (defmethod count-trans :inc [_ system data]
17 | (assoc system :count
18 | (inc (:count system))))
19 |
20 | (defmethod count-trans :dec [_ system data]
21 | (assoc system :count
22 | (dec (:count system))))
23 |
24 | (defrecord ExampleCounter []
25 | iInputFilter
26 | (-filter-input [_ [name data] system]
27 | [name data])
28 | iPluginInit
29 | (-initialize [o system event-chan]
30 | (log "initializing counter"))
31 | iTransform
32 | (-transform [o msg system]
33 | (count-trans (first msg) system (last msg)))
34 | iDerive
35 | (-derive [o system]
36 | (if (:count system)
37 | (assoc system :double (* 2 (:count system)))
38 | system))
39 | iEffect
40 | (-effect [o msg system event-chan effect-chan]
41 | (log "affecting")
42 | )
43 | )
44 |
45 | (defmulti todo-trans identity)
46 |
47 | (defmethod todo-trans :default [_ system data] system)
48 |
49 | (defmethod todo-trans :create-todo [_ system data]
50 | (-> system
51 | (add-effects [:store-changes data])
52 | (update-in [:todos]
53 | (fn [todos]
54 | (vec (conj todos data))))))
55 |
56 | (defmethod todo-trans :delete-todo [_ system data]
57 | (update-in system
58 | [:todos]
59 | (fn [todos]
60 | (filter #(not= (:id %) (:id data))
61 | todos))))
62 |
63 | (defmulti todo-eff identity)
64 |
65 | (defmethod todo-eff :default [_ system data event-chan])
66 |
67 | (defmethod todo-eff :store-changes [_ system data event-chan]
68 | (put! event-chan [:inc {}])
69 | (log "storing changes"))
70 |
71 | (defrecord ExampleTodos []
72 | iInputFilter
73 | (-filter-input [_ [name data] system]
74 | (if (= name :create-todo)
75 | [name (assoc data :id (rand-int 10000000))]
76 | [name data]))
77 | iPluginInit
78 | (-initialize [o system event-chan]
79 | (log "initializing todos"))
80 | iTransform
81 | (-transform [o msg system]
82 | (todo-trans (first msg) system (last msg)))
83 | iEffect
84 | (-effect [o [name data] system event-chan effect-chan]
85 | (todo-eff name system data event-chan)
86 | (log "affecting 2")
87 | ))
88 |
--------------------------------------------------------------------------------
/assets/js/eight-queens/out/frontier/example/core.cljs:
--------------------------------------------------------------------------------
1 | (ns frontier.example.core
2 | (:require
3 | [frontier.core :refer [component-group]]
4 | [frontier.dev-tools :refer [managed-system
5 | managed-renderer
6 | input-controls-renderer]]
7 |
8 | [frontier.example.components :refer [ExampleCounter
9 | ExampleTodos]]
10 | [jayq.core :refer [$ html]]
11 | [jayq.util :refer [log]]))
12 |
13 | (defn create-test-divs [parent-sel count]
14 | (mapv
15 | (fn [x]
16 | (.append ($ parent-sel) (str "
" )))
17 | (range count)))
18 |
19 | (defn run-example [target-sel]
20 |
21 | (create-test-divs target-sel 2)
22 |
23 | (managed-system {}
24 | (component-group
25 | (ExampleCounter.)
26 | (ExampleTodos.))
27 | (managed-renderer "test0"
28 | (input-controls-renderer
29 | [[:create-todo {:content "helloby"}]
30 | [:create-todo {:content "goodbyer"}]
31 | [:create-todo {:content "hellero"}]]))
32 | [[:create-todo {:content "hello"}]
33 | [:create-todo {:content "goodbye"}]
34 | [:create-todo {:content "heller"}]])
35 |
36 | (managed-system {}
37 | (component-group
38 | (ExampleCounter.)
39 | (ExampleTodos.))
40 | (managed-renderer "test1"
41 | (input-controls-renderer
42 | [[:create-todo {:content "helloby"}]
43 | [:create-todo {:content "goodbyer"}]
44 | [:create-todo {:content "hellero"}]]))
45 | [[:create-todo {:id 1 :content "hello"}]
46 | [:create-todo {:id 2 :content "goodbye"}]
47 | [:create-todo {:id 3 :content "heller"}]]))
48 |
49 | #_(log "here we are")
50 |
51 | (run-example "#cmsnew")
52 |
53 |
--------------------------------------------------------------------------------
/assets/js/eight-queens/out/frontier/example/core.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,
2 | "file":
3 | "/Users/bhauman/workspace/bhauman.github.com/assets/js/eight-queens/out/frontier/example/core.js",
4 | "sources":["core.cljs"],
5 | "lineCount":23,
6 | "mappings":
7 | ";AAAA;;;;;;;;;;;;AAYA,yCAAA,6CAAA,tFAAMA,oEAAkBC,WAAWC,OACjC,OAACC,yBACA,cAAA,HAAKC,GACH,OAAS,AAACC,sBAAEJ,mBAAY,eAAA,gDAAA,jBAAqBG;GAC/C,AAACE,0BAAMJ;;AAEV,oCAAA,kCAAA,tEAAMK,0DAAaC,YAEjB,4DAAA,5DAACR,iDAAiBQ;AAElB,4CAAA,2rCAAA,mFAAA,mFAAA,mEAAA,2CAAA,2DAAA,wBAAA,mFAAA,mEAAA,2CAAA,2DAAA,0BAAA,mFAAA,mEAAA,2CAAA,2DAAA,hmEAACC,+EACe,AAACC,wCACA,KAAAC,8CACA,KAAAC,6CACD,8CAAA,9CAACC,sDACiB,qDAAA,mFAAA,mFAAA,mEAAA,2CAAA,2DAAA,0BAAA,mFAAA,mEAAA,2CAAA,2DAAA,2BAAA,mFAAA,mEAAA,2CAAA,2DAAA,j7BAACC;AAQnC,mDAAA,2rCAAA,mFAAA,mFAAA,mEAAA,2CAAA,iDAAA,EAAA,2DAAA,wBAAA,mFAAA,mEAAA,2CAAA,iDAAA,EAAA,2DAAA,0BAAA,mFAAA,mEAAA,2CAAA,iDAAA,EAAA,2DAAA,zvEAACL,+EACe,AAACC,wCACA,KAAAC,8CACA,KAAAC,6CACD,8CAAA,9CAACC,sDACiB,qDAAA,mFAAA,mFAAA,mEAAA,2CAAA,2DAAA,0BAAA,mFAAA,mEAAA,2CAAA,2DAAA,2BAAA,mFAAA,mEAAA,2CAAA,2DAAA,j7BAACC;;AAUrC,4CAAA,5CAACP",
8 | "names":
9 | ["frontier.example.core/create-test-divs", "parent-sel", "count",
10 | "cljs.core/mapv", "x", "jayq.core/$", "cljs.core/range",
11 | "frontier.example.core/run-example", "target-sel",
12 | "frontier.dev-tools/managed-system", "frontier.core/component-group",
13 | "frontier.example.components/ExampleCounter",
14 | "frontier.example.components/ExampleTodos",
15 | "frontier.dev-tools/managed-renderer",
16 | "frontier.dev-tools/input-controls-renderer"]}
--------------------------------------------------------------------------------
/assets/js/eight-queens/out/frontier/util/edn_renderer.cljs:
--------------------------------------------------------------------------------
1 | (ns frontier.util.edn-renderer
2 | (:require
3 | [sablono.core :as sab :include-macros true]))
4 |
5 | (declare html)
6 |
7 | (defn literal [class x]
8 | [:span {:className class} (prn-str x)])
9 |
10 | (defn join-html [separator coll]
11 | (interpose [:span.separator separator]
12 | (map html coll)))
13 |
14 | (defn html-collection [class opener closer coll]
15 | [:span.collection { :className class }
16 | [:span.opener opener]
17 | [:span.contents (join-html " " coll)]
18 | [:span.closer closer]])
19 |
20 | (defn html-keyval [[k v]]
21 | [:span.keyval
22 | (html k)
23 | [:span.separator " "]
24 | (html v)])
25 |
26 | (defn html-keyvals [coll]
27 | (interpose [:span.separator ", "]
28 | (map html-keyval coll)))
29 |
30 | (defn html-map [coll]
31 | [:span.collection.map
32 | [:span.opener "{"]
33 | [:span.contents (html-keyvals coll)]
34 | [:span.closer "}"]])
35 |
36 | (defn html-string [s]
37 | [:span.string
38 | [:span.opener "\""]
39 | [:span.contents s]
40 | [:span.closer "\""]])
41 |
42 | (defn html [x]
43 | (cond
44 | (number? x) (literal "number" x)
45 | (keyword? x) (literal "keyword" x)
46 | (symbol? x) (literal "symbol" x)
47 | (string? x) (html-string x)
48 | (map? x) (html-map x)
49 | (set? x) (html-collection "set" "#{" "}" x)
50 | (vector? x) (html-collection "vector" "[" "]" x)
51 | (seq? x) (html-collection "seq" "(" ")" x)
52 | :else (literal "literal" x)))
53 |
54 | (defn html-edn [e]
55 | [:div.rendered-edn
56 | (html e)])
57 |
--------------------------------------------------------------------------------
/assets/js/eight-queens/out/frontier/util/edn_renderer.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,
2 | "file":
3 | "/Users/bhauman/workspace/bhauman.github.com/assets/js/eight-queens/out/frontier/util/edn_renderer.js",
4 | "sources":["edn_renderer.cljs"],
5 | "lineCount":61,
6 | "mappings":
7 | ";AAAA;;;;AAIA,AAAA,AAEA,qCAAA,4BAAA,AAAA,0FAAA,qDAAA,2CAAA,3PAAMA,uDAASC,OAAMC,4PACAD,eAAO,AAACE,4BAAQD;;AAErC,uCAAA,oCAAA,3EAAME,2DAAWC,UAAUC,MACzB,qCAAA,mFAAA,jHAACC,0LAA2BF,kBACjB,AAACG,wBAAIC,gCAAKH;;AAEvB,6CAAA,qDAAA,AAAA,0FAAA,2EAAA,2CAAA,8EAAA,mFAAA,kFAAA,mFAAA,wIAAA,mFAAA,n1BAAMI,uEAAiBT,OAAMU,OAAOC,OAAON,qRACTL,qKACjBU,yKACE,+CAAA,/CAACP,mDAAcE,oKACjBM;;AAEjB,yCAAA,sBAAAC,UAAA,AAAA,IAAAC,aAAAD,iBAAA,AAAAE,wBAAAD,WAAA,EAAA,cAAA,AAAAC,wBAAAD,WAAA,EAAA,MAAA,AAAA,0FAAA,gHAAA,mFAAA,yEAAA,/iBAAME,uGAAcC,mDAAEC,4MAEnB,AAACT,0CAAKQ,2KAEN,AAACR,0CAAKS;;AAET,0CAAA,6BAAA,vEAAMC,iEAAcb,MAClB,qCAAA,mFAAA,yEAAA,1LAACC,uMACU,AAACC,wBAAIQ,uCAAYV;;AAE9B,sCAAA,yBAAA,AAAA,0FAAA,mFAAA,mFAAA,mEAAA,YAAA,mFAAA,uIAAA,mFAAA,mEAAA,9vBAAMc,yDAAUd,+eAGG,AAACa,kDAAab;;AAGjC,yCAAA,yBAAA,AAAA,0FAAA,mEAAA,mFAAA,mEAAA,aAAA,mFAAA,iFAAA,mFAAA,mEAAA,5rBAAMe,+DAAaC,6dAGAA;;AAGnB,kCAAA,kBAAA,pDAAMb,iDAAMP,GACV,GACC,OAASA;CAAI,oDAAA,7CAACF,sDAAiBE;;CADhC,GAEC,cAAAqB,bAAUrB;CAAG,oDAAA,7CAACF,uDAAkBE;;CAFjC,GAGC,cAAAsB,bAAStB;CAAI,oDAAA,7CAACF,sDAAiBE;;CAHhC,GAIC,OAASA;CAAI,OAACmB,iDAAYnB;;CAJ3B,GAKC,AAACuB,+BAAKvB;CAAO,OAACkB,8CAASlB;;CALxB,GAMC,AAACwB,+BAAKxB;CAAO,4DAAA,MAAA,KAAA,hEAACQ,oEAAkCR;;CANjD,GAOC,AAACyB,kCAAQzB;CAAI,4DAAA,SAAA,IAAA,lEAACQ,sEAAiCR;;CAPhD,GAQC,AAAC0B,+BAAK1B;CAAO,4DAAA,MAAA,IAAA,/DAACQ,mEAAiCR;;CARhD,GAAA;CASc,oDAAA,7CAACF,uDAAkBE;;CATjC;;;;;;;;;;;AAWF,sCAAA,sBAAA,AAAA,0FAAA,tJAAM2B,yDAAUC,0KAEb,AAACrB,0CAAKqB",
8 | "names":
9 | ["frontier.util.edn-renderer/literal", "class", "x",
10 | "cljs.core/prn-str", "frontier.util.edn-renderer/join-html",
11 | "separator", "coll", "cljs.core/interpose", "cljs.core/map",
12 | "frontier.util.edn-renderer/html",
13 | "frontier.util.edn-renderer/html-collection", "opener", "closer",
14 | "p__10131", "vec__10133", "cljs.core/nth",
15 | "frontier.util.edn-renderer/html-keyval", "k", "v",
16 | "frontier.util.edn-renderer/html-keyvals",
17 | "frontier.util.edn-renderer/html-map",
18 | "frontier.util.edn-renderer/html-string", "s", "cljs.core/Keyword",
19 | "cljs.core/Symbol", "cljs.core/map?", "cljs.core/set?",
20 | "cljs.core/vector?", "cljs.core/seq?",
21 | "frontier.util.edn-renderer/html-edn", "e"]}
--------------------------------------------------------------------------------
/assets/js/eight-queens/out/goog/debug/error.js:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Closure Library Authors. All Rights Reserved.
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS-IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | /**
16 | * @fileoverview Provides a base class for custom Error objects such that the
17 | * stack is correctly maintained.
18 | *
19 | * You should never need to throw goog.debug.Error(msg) directly, Error(msg) is
20 | * sufficient.
21 | *
22 | */
23 |
24 | goog.provide('goog.debug.Error');
25 |
26 |
27 |
28 | /**
29 | * Base class for custom error objects.
30 | * @param {*=} opt_msg The message associated with the error.
31 | * @constructor
32 | * @extends {Error}
33 | */
34 | goog.debug.Error = function(opt_msg) {
35 |
36 | // Ensure there is a stack trace.
37 | if (Error.captureStackTrace) {
38 | Error.captureStackTrace(this, goog.debug.Error);
39 | } else {
40 | this.stack = new Error().stack || '';
41 | }
42 |
43 | if (opt_msg) {
44 | this.message = String(opt_msg);
45 | }
46 | };
47 | goog.inherits(goog.debug.Error, Error);
48 |
49 |
50 | /** @override */
51 | goog.debug.Error.prototype.name = 'CustomError';
52 |
--------------------------------------------------------------------------------
/assets/js/eight-queens/out/goog/deps.js:
--------------------------------------------------------------------------------
1 | goog.addDependency("string/string.js", ['goog.string', 'goog.string.Unicode'], []);
2 | goog.addDependency("debug/error.js", ['goog.debug.Error'], []);
3 | goog.addDependency("asserts/asserts.js", ['goog.asserts', 'goog.asserts.AssertionError'], ['goog.debug.Error', 'goog.string']);
4 | goog.addDependency("array/array.js", ['goog.array', 'goog.array.ArrayLike'], ['goog.asserts']);
5 | goog.addDependency("object/object.js", ['goog.object'], []);
6 | goog.addDependency("string/stringbuffer.js", ['goog.string.StringBuffer'], []);
7 | goog.addDependency("useragent/useragent.js", ['goog.userAgent'], ['goog.string']);
8 | goog.addDependency("uri/utils.js", ['goog.uri.utils', 'goog.uri.utils.ComponentIndex', 'goog.uri.utils.QueryArray', 'goog.uri.utils.QueryValue', 'goog.uri.utils.StandardQueryParam'], ['goog.asserts', 'goog.string', 'goog.userAgent']);
9 | goog.addDependency("structs/structs.js", ['goog.structs'], ['goog.array', 'goog.object']);
10 | goog.addDependency("iter/iter.js", ['goog.iter', 'goog.iter.Iterator', 'goog.iter.StopIteration'], ['goog.array', 'goog.asserts']);
11 | goog.addDependency("structs/map.js", ['goog.structs.Map'], ['goog.iter.Iterator', 'goog.iter.StopIteration', 'goog.object', 'goog.structs']);
12 | goog.addDependency("uri/uri.js", ['goog.Uri', 'goog.Uri.QueryData'], ['goog.array', 'goog.string', 'goog.structs', 'goog.structs.Map', 'goog.uri.utils', 'goog.uri.utils.ComponentIndex']);
--------------------------------------------------------------------------------
/assets/js/eight-queens/out/goog/string/stringbuffer.js:
--------------------------------------------------------------------------------
1 | // Copyright 2006 The Closure Library Authors. All Rights Reserved.
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS-IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | /**
16 | * @fileoverview Utility for fast string concatenation.
17 | */
18 |
19 | goog.provide('goog.string.StringBuffer');
20 |
21 |
22 |
23 | /**
24 | * Utility class to facilitate string concatenation.
25 | *
26 | * @param {*=} opt_a1 Optional first initial item to append.
27 | * @param {...*} var_args Other initial items to
28 | * append, e.g., new goog.string.StringBuffer('foo', 'bar').
29 | * @constructor
30 | */
31 | goog.string.StringBuffer = function(opt_a1, var_args) {
32 | if (opt_a1 != null) {
33 | this.append.apply(this, arguments);
34 | }
35 | };
36 |
37 |
38 | /**
39 | * Internal buffer for the string to be concatenated.
40 | * @type {string}
41 | * @private
42 | */
43 | goog.string.StringBuffer.prototype.buffer_ = '';
44 |
45 |
46 | /**
47 | * Sets the contents of the string buffer object, replacing what's currently
48 | * there.
49 | *
50 | * @param {*} s String to set.
51 | */
52 | goog.string.StringBuffer.prototype.set = function(s) {
53 | this.buffer_ = '' + s;
54 | };
55 |
56 |
57 | /**
58 | * Appends one or more items to the buffer.
59 | *
60 | * Calling this with null, undefined, or empty arguments is an error.
61 | *
62 | * @param {*} a1 Required first string.
63 | * @param {*=} opt_a2 Optional second string.
64 | * @param {...*} var_args Other items to append,
65 | * e.g., sb.append('foo', 'bar', 'baz').
66 | * @return {goog.string.StringBuffer} This same StringBuffer object.
67 | * @suppress {duplicate}
68 | */
69 | goog.string.StringBuffer.prototype.append = function(a1, opt_a2, var_args) {
70 | // Use a1 directly to avoid arguments instantiation for single-arg case.
71 | this.buffer_ += a1;
72 | if (opt_a2 != null) { // second argument is undefined (null == undefined)
73 | for (var i = 1; i < arguments.length; i++) {
74 | this.buffer_ += arguments[i];
75 | }
76 | }
77 | return this;
78 | };
79 |
80 |
81 | /**
82 | * Clears the internal buffer.
83 | */
84 | goog.string.StringBuffer.prototype.clear = function() {
85 | this.buffer_ = '';
86 | };
87 |
88 |
89 | /**
90 | * @return {number} the length of the current contents of the buffer.
91 | */
92 | goog.string.StringBuffer.prototype.getLength = function() {
93 | return this.buffer_.length;
94 | };
95 |
96 |
97 | /**
98 | * @return {string} The concatenated string.
99 | * @override
100 | */
101 | goog.string.StringBuffer.prototype.toString = function() {
102 | return this.buffer_;
103 | };
104 |
--------------------------------------------------------------------------------
/assets/js/eight-queens/out/jayq/util.cljs:
--------------------------------------------------------------------------------
1 | (ns jayq.util)
2 |
3 | (defn wait [ms func]
4 | (js* "setTimeout(~{func}, ~{ms})"))
5 |
6 | (defn log [v & text]
7 | (let [vs (if (string? v)
8 | (apply str v text)
9 | v)]
10 | (. js/console (log vs))
11 | v))
12 |
--------------------------------------------------------------------------------
/assets/js/eight-queens/out/jayq/util.js:
--------------------------------------------------------------------------------
1 | // Compiled by ClojureScript 0.0-2138
2 | goog.provide('jayq.util');
3 | goog.require('cljs.core');
4 | jayq.util.wait = (function wait(ms,func){return setTimeout(func, ms);
5 | });
6 | /**
7 | * @param {...*} var_args
8 | */
9 | jayq.util.log = (function() {
10 | var log__delegate = function (v,text){var vs = ((typeof v === 'string')?cljs.core.apply.call(null,cljs.core.str,v,text):v);console.log(vs);
11 | return v;
12 | };
13 | var log = function (v,var_args){
14 | var text = null;if (arguments.length > 1) {
15 | text = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1),0);}
16 | return log__delegate.call(this,v,text);};
17 | log.cljs$lang$maxFixedArity = 1;
18 | log.cljs$lang$applyTo = (function (arglist__14167){
19 | var v = cljs.core.first(arglist__14167);
20 | var text = cljs.core.rest(arglist__14167);
21 | return log__delegate(v,text);
22 | });
23 | log.cljs$core$IFn$_invoke$arity$variadic = log__delegate;
24 | return log;
25 | })()
26 | ;
27 |
28 | //# sourceMappingURL=util.js.map
--------------------------------------------------------------------------------
/assets/js/eight-queens/out/jayq/util.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,
2 | "file":
3 | "/Users/bhauman/workspace/bhauman.github.com/assets/js/eight-queens/out/jayq/util.js",
4 | "sources":["util.cljs"],
5 | "lineCount":28,
6 | "mappings":
7 | ";AAAA;;AAEA,iBAAA,wBAAA,zCAAMA,gCAAMC,GAAGC,MACb;;AAEF;;;gBAAA,hBAAMC;sCAAN,RAAWC,EAAIC,MACb,qFAAA,jFAAMC,KAAG,EAAI,OAASF,gBACX,AAACG,0BAAMC,cAAIJ,EAAEC,MACbD,GACT,AAAGK,YAAgBH;AACnBF;;oBALOA;IAAIC;EAAAA;+BAAJD,EAAIC;;;IAAJD;IAAIC;qBAAJD,EAAIC",
8 | "names":
9 | ["jayq.util/wait", "ms", "func", "jayq.util/log", "v", "text", "vs",
10 | "cljs.core/apply", "cljs.core/str", "js/console"]}
--------------------------------------------------------------------------------
/assets/js/eight-queens/out/reactor/core.cljs:
--------------------------------------------------------------------------------
1 | (ns reactor.core
2 | (:require
3 | [cljs.core.async :as async
4 | :refer [! chan close! sliding-buffer put! take! alts! timeout onto-chan map< to-chan filter<]])
5 | (:require-macros [cljs.core.async.macros :as m :refer [go alt! go-loop]]))
6 |
7 | (def Pure
8 | (.createClass js/React
9 | (js-obj
10 | "shouldComponentUpdate"
11 | (fn [next-props next-state]
12 | (this-as this
13 | (not (= (.. this -props -value) (.-value next-props)))))
14 | "render"
15 | (fn []
16 | (this-as this
17 | ((.. this -props -children)))))))
18 |
19 | (def OwnerReference
20 | (.createClass js/React
21 | (js-obj
22 | "render"
23 | (fn []
24 | (this-as this ((.. this -props -children) this))))))
25 |
26 | (defn render-to [react-dom html-node callback]
27 | (.renderComponent js/React react-dom html-node callback))
28 |
29 | (defn react-render [html-node react-dom]
30 | "A blocking render call"
31 | (let [out (chan)]
32 | (render-to react-dom html-node (fn [] (put! out :rendered) (close! out)))
33 | out))
34 |
35 | (defn react-render-loop [html-node react-dom-chan]
36 | (go-loop []
37 | (let [react-dom (js { :dangerouslySetInnerHTML
46 | { :__html
47 | raw-html-str }})))
48 |
49 | (defn set-state [owner new-state-map]
50 | (.setState owner (clj->js new-state-map)))
51 |
52 | (defn get-state-val [owner state-key]
53 | (if-let [state (.-state owner)]
54 | (aget state (name state-key))))
55 |
56 | (defn get-prop-val [owner prop-key]
57 | (if-let [state (.-props owner)]
58 | (aget state (name prop-key))))
59 |
60 | (defn get-children [owner]
61 | (.. owner -props -children))
62 |
63 | (defn get-ref [owner ref-name]
64 | (aget (.-refs owner) (name ref-name)))
65 |
66 | (defn get-node [owner ref-name]
67 | (.getDOMNode (get-ref owner ref-name)))
68 |
69 | (defn input-value [owner ref-name]
70 | (let [node (get-node owner ref-name)]
71 | (condp = (.-type node)
72 | "checkbox" (.-checked node)
73 | (.-value node))))
74 |
75 | (defn form-values [owner refs]
76 | (into {} (map (juxt identity (partial input-value owner)) refs)))
77 |
78 | (defn prevent-default-wrap [f]
79 | (fn [x] (.preventDefault x) (f x)))
80 |
81 | (defn form-submit [owner chan msg fields]
82 | (prevent-default-wrap #(put! chan
83 | (let [form-vals (form-values owner fields)]
84 | (.log js/console "form submit")
85 | (.log js/console form-vals)
86 | [msg form-vals]))))
87 |
--------------------------------------------------------------------------------
/assets/js/eight-queens/out/sablono/render.cljs:
--------------------------------------------------------------------------------
1 | (ns sablono.render
2 | (:refer-clojure :exclude [replace])
3 | (:require [clojure.string :refer [blank? join replace split]]
4 | [clojure.walk :refer [postwalk]]
5 | [sablono.util :refer [normalize-element react-symbol]])
6 | )
7 |
8 | (defprotocol HtmlRenderer
9 | (render-html [this] "Render a Clojure data structure via Facebook's React."))
10 |
11 | (defprotocol IJSValue
12 | (to-js [x]))
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 | (defn render-attrs [attrs]
56 | (let [attrs (clj->js attrs)
57 | class (join " " (flatten (seq (.-className attrs))))]
58 | (if-not (blank? class)
59 | (set! (.-className attrs) class))
60 | attrs))
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 | (defn render-element
73 | "Render an element vector as a HTML element."
74 | [element]
75 | (let [[tag attrs content] (normalize-element element)
76 | dom-fn (aget js/React.DOM (name tag))]
77 | (if content
78 | (dom-fn (render-attrs attrs) (render-html content))
79 | (dom-fn (render-attrs attrs)))))
80 |
81 | (defn- render-seq [s]
82 | (into-array (map render-html s)))
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 | (extend-protocol HtmlRenderer
101 | Cons
102 | (render-html [this]
103 | (render-seq this))
104 | ChunkedSeq
105 | (render-html [this]
106 | (render-seq this))
107 | LazySeq
108 | (render-html [this]
109 | (render-seq this))
110 | List
111 | (render-html [this]
112 | (render-seq this))
113 | IndexedSeq
114 | (render-html [this]
115 | (render-seq this))
116 | PersistentVector
117 | (render-html [this]
118 | (render-element this))
119 | default
120 | (render-html [this]
121 | this)
122 | nil
123 | (render-html [this]
124 | nil))
125 |
126 | ;;;;;;;;;;;; This file autogenerated from src/sablono/render.cljx
127 |
--------------------------------------------------------------------------------
/assets/js/eight-queens/out/sablono/render.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,
2 | "file":
3 | "/Users/bhauman/workspace/bhauman.github.com/assets/js/eight-queens/out/sablono/render.js",
4 | "sources":["render.cljs"],
5 | "lineCount":96,
6 | "mappings":
7 | ";AAAA;;;;;;;;AAOA,AAAA,AAAA,8BAAA,iBAAAA,WAAA,GAAA,AAAAA,7DAAaO;;AAAb,6BAAA,6BAAA,AAAA,GAAA,iBAAAN,0BAAA,AAAA,GAAAA,3GACGO,mDAAaC,+CAAAA;CADhB,OACgBA;;CADhBR;;;CAAA,OACgBQ,sDAAAA;;CADhB,IAAAP,kBAAA,EAAA,UAAA,OAAA,YAAA,AAAA,OAAA,iBAAAC,mBAAA,CAAAC,2BAAA,AAAAC,YAAAH,mBAAA,AAAA,GAAAC,rIACgBM,qBAAAA;CADhBN;;CAAA,IAAAA,uBAAA,CAAAC,2BAAA,MAAA,AAAA,GAAAD;CAAAA;;CAAA,MAAA,AAAAG,qCAAA,2BACgBG;;;eAAAA;;;AADhB,AAGA,AAAA,AAAA,0BAAA,iBAAAC,WAAA,GAAA,AAAAA,zDAAaE;;AAAb,uBAAA,mBAAA,AAAA,GAAA,iBAAAX,sBAAA,AAAA,GAAAA,vFACGY,uCAAOC,2CAAAA;CADV,OACUA;;CADVb;;;CAAA,OACUa,wCAAAA;;CADV,IAAAZ,kBAAA,EAAA,MAAA,OAAA,QAAA,AAAA,OAAA,iBAAAC,mBAAA,CAAAQ,qBAAA,AAAAN,YAAAH,mBAAA,AAAA,GAAAC,vHACUW,iBAAAA;CADVX;;CAAA,IAAAA,uBAAA,CAAAQ,qBAAA,MAAA,AAAA,GAAAR;CAAAA;;CAAA,MAAA,AAAAG,qCAAA,iBACUQ;;;eAAAA;;;AADV,AA4CA,8BAAA,8BAAA,5DAAMC,qDAAcC,OAClB,gLAAA,5KAAMA,YAAM,AAACC,+BAAQD,WACfE,SAAM,8BAAA,9BAACC,kCAAS,AAACC,4BAAQ,AAACC,wBAAI,AAAaL,uBAC/C,GAAA,AAAAM,wBAAQ,AAACC,sCAAOL;CACd,AAAM,AAAaF,sBAAOE;;CAD5B;AAEAF;;AAYJ;;;gCAAA,kCAAA,lEAAMQ,yDAEHC,SACD,IAAAC,yEAAA,AAAAC,wBAAAD,WAAA,EAAA,kBAAA,AAAAC,wBAAAD,WAAA,EAAA,oBAAA,AAAAC,wBAAAD,WAAA,EAAA,8DAAA,zNAAOE,qDAAIZ,uDAAMa,lKAAS,AAACC,yCAAkBL,kLACvCM,SAAO,CAAMC,UAAa,AAACC,yBAAKL,OACpC,oBAAIC;CACF,OAACE,iBAAO,AAAChB,sCAAaC,OAAO,AAACR,qCAAYqB;;CAC1C,OAACE,iBAAO,AAAChB,sCAAaC;;;AAE5B,4BAAA,wBAAA,pDAAOkB,iDAAYC,GACjB,OAACC,+BAAW,AAACC,wBAAI7B,2BAAY2B;;AAkB/B,AAAA,AAAA,CAAA5B,4BAAA,UAAA;AAAA,CAAAC,2BAAA,UAuBE,kBAAA,AAAA,PAAcC;;AAvBhB,AAAA,CAAAF,4BAAA,OAAA;AAAA,CAAAC,2BAAA,OAoBE,kBAAA,PAAcC,OACZA;;AArBJ,AAAA,AAAA,AAAA,oEAAA,pEAgBEkC;AAhBF,AAAA,AAAA,AAgBEA,uFACA,kBAAA,AAAA,gBAAA,KAAA,5BAAclC,WAAAA,iBACZ,OAACe,wCAAef;;AAlBpB,AAAA,AAAA,AAAA,8DAAA,9DAaEiC;AAbF,AAAA,AAAA,AAaEA,iFACA,kBAAA,AAAA,gBAAA,KAAA,5BAAcjC,WAAAA,iBACZ,OAACyB,oCAAWzB;;AAfhB,AAAA,AAAA,AAAA,wDAAA,xDAUEgC;AAVF,AAAA,AAAA,AAUEA,2EACA,kBAAA,AAAA,gBAAA,KAAA,5BAAchC,WAAAA,iBACZ,OAACyB,oCAAWzB;;AAZhB,AAAA,AAAA,AAAA,2DAAA,3DAOE+B;AAPF,AAAA,AAAA,AAOEA,8EACA,kBAAA,AAAA,gBAAA,KAAA,5BAAc/B,WAAAA,iBACZ,OAACyB,oCAAWzB;;AAThB,AAAA,AAAA,AAAA,8DAAA,9DAIE8B;AAJF,AAAA,AAAA,AAIEA,iFACA,kBAAA,AAAA,gBAAA,KAAA,5BAAc9B,WAAAA,iBACZ,OAACyB,oCAAWzB;;AANhB,AAAA,AAAA,AAAA,wDAAA,xDACE6B;AADF,AAAA,AAAA,AACEA,2EACA,kBAAA,AAAA,gBAAA,KAAA,5BAAc7B,WAAAA,iBACZ,OAACyB,oCAAWzB",
8 | "names":
9 | ["obj14136", "and__3410__auto__", "x__4043__auto__",
10 | "or__3422__auto__", "sablono/render.render-html", "goog/typeOf",
11 | "cljs.core/missing-protocol", "sablono.render/HtmlRenderer",
12 | "sablono.render/render-html", "this", "obj14138",
13 | "sablono/render.to-js", "sablono.render/IJSValue",
14 | "sablono.render/to-js", "x", "sablono.render/render-attrs", "attrs",
15 | "cljs.core/clj->js", "class", "clojure.string/join",
16 | "cljs.core/flatten", "cljs.core/seq", "cljs.core/not",
17 | "clojure.string/blank?", "sablono.render/render-element", "element",
18 | "vec__14140", "cljs.core/nth", "tag", "content",
19 | "sablono.util/normalize-element", "dom-fn", "js/React.DOM",
20 | "cljs.core/name", "sablono.render/render-seq", "s",
21 | "cljs.core/into-array", "cljs.core/map", "cljs.core/Cons",
22 | "cljs.core/ChunkedSeq", "cljs.core/LazySeq", "cljs.core/List",
23 | "cljs.core/IndexedSeq", "cljs.core/PersistentVector"]}
--------------------------------------------------------------------------------
/assets/js/eight-queens/out/sablono/util.cljs:
--------------------------------------------------------------------------------
1 | (ns sablono.util
2 | (:import goog.Uri)
3 | (:require [clojure.string :refer [join split]]))
4 |
5 | (def ^:dynamic *base-url* nil)
6 |
7 | (def ^{:doc "Regular expression that parses a CSS-style id and class from an element name." :private true}
8 | re-tag #"([^\s\.#]+)(?:#([^\s\.#]+))?(?:\.([^\s#]+))?")
9 |
10 | (defprotocol ToString
11 | (to-str [x] "Convert a value into a string."))
12 |
13 | (defprotocol ToURI
14 | (to-uri [x] "Convert a value into a URI."))
15 |
16 | (defn as-str
17 | "Converts its arguments into a string using to-str."
18 | [& xs]
19 | (apply str (map to-str xs)))
20 |
21 | (defn compact-map
22 | "Removes all map entries where value is nil."
23 | [m]
24 | (reduce
25 | (fn [m k]
26 | (if-let [v (get m k)]
27 | m (dissoc m k)))
28 | m (keys m)))
29 |
30 | (defn merge-with-class
31 | "Like clojure.core/merge but concat :className entries."
32 | [& maps]
33 | (let [classes (->> (mapcat #(cond
34 | (list? %1) [%1]
35 | (vector? %1) %1
36 | :else [%1])
37 | (map :className maps))
38 | (remove nil?) vec)
39 | maps (apply merge maps)]
40 | (if (empty? classes)
41 | maps (assoc maps :className classes))))
42 |
43 | (defn normalize-element
44 | "Ensure an element vector is of the form [tag-name attrs content]."
45 | [[tag & content]]
46 | (when (not (or (keyword? tag) (symbol? tag) (string? tag)))
47 | (throw (ex-info (str tag " is not a valid element name.") {:tag tag :content content})))
48 | (let [[_ tag id class] (re-matches re-tag (name tag))
49 | tag-attrs {:id id :className (if class (split class #"\."))}
50 | map-attrs (first content)]
51 | (if (map? map-attrs)
52 | [tag (compact-map (merge-with-class tag-attrs map-attrs)) (next content)]
53 | [tag (compact-map tag-attrs) content])))
54 |
55 | (defn join-classes
56 | "Join the `classes` with a whitespace."
57 | [classes]
58 | (join " " (flatten classes)))
59 |
60 | (defn react-symbol
61 | "Returns the React function to render `tag` as a symbol."
62 | [tag]
63 | (symbol "js" (str "React.DOM." (name tag))))
64 |
65 |
66 | (extend-protocol ToString
67 | cljs.core.Keyword
68 | (to-str [x]
69 | (name x))
70 | goog.Uri
71 | (to-str [x]
72 | (if (or (. x (hasDomain))
73 | (nil? (. x (getPath)))
74 | (not (re-matches #"^/.*" (. x (getPath)))))
75 | (str x)
76 | (let [base (str *base-url*)]
77 | (if (re-matches #".*/$" base)
78 | (str (subs base 0 (dec (count base))) x)
79 | (str base x)))))
80 | nil
81 | (to-str [_]
82 | "")
83 | number
84 | (to-str [x]
85 | (str x))
86 | default
87 | (to-str [x]
88 | (str x)))
89 |
90 |
91 | (extend-protocol ToURI
92 | Uri
93 | (to-uri [x] x)
94 | default
95 | (to-uri [x] (Uri. (str x))))
96 |
97 | ;;;;;;;;;;;; This file autogenerated from src/sablono/util.cljx
98 |
--------------------------------------------------------------------------------
/assets/js/jquery.browser.js:
--------------------------------------------------------------------------------
1 | jQuery.uaMatch = function( ua ) {
2 | ua = ua.toLowerCase();
3 |
4 | var match = /(chrome)[ \/]([\w.]+)/.exec( ua ) ||
5 | /(webkit)[ \/]([\w.]+)/.exec( ua ) ||
6 | /(opera)(?:.*version|)[ \/]([\w.]+)/.exec( ua ) ||
7 | /(msie) ([\w.]+)/.exec( ua ) ||
8 | ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec( ua ) ||
9 | [];
10 |
11 | return {
12 | browser: match[ 1 ] || "",
13 | version: match[ 2 ] || "0"
14 | };
15 | };
16 |
17 | // Don't clobber any existing jQuery.browser in case it's different
18 | if ( !jQuery.browser ) {
19 | matched = jQuery.uaMatch( navigator.userAgent );
20 | browser = {};
21 |
22 | if ( matched.browser ) {
23 | browser[ matched.browser ] = true;
24 | browser.version = matched.version;
25 | }
26 |
27 | // Chrome is Webkit, but Webkit is also Safari.
28 | if ( browser.chrome ) {
29 | browser.webkit = true;
30 | } else if ( browser.webkit ) {
31 | browser.safari = true;
32 | }
33 |
34 | jQuery.browser = browser;
35 | }
36 |
--------------------------------------------------------------------------------
/assets/js/json_renderer.js:
--------------------------------------------------------------------------------
1 | // Generated by CoffeeScript 1.6.1
2 | (function() {
3 | var JSONRenderer;
4 |
5 | JSONRenderer = {
6 | render_json: function(json) {
7 | var result;
8 | result = this.render_json_helper(json);
9 | return "" + result + "
";
10 | },
11 | render_json_helper: function(json) {
12 | var items, items_rend, result,
13 | _this = this;
14 | return result = json instanceof Array ? (items = _.pairs(json).map(function(pair) {
15 | return _this.render_pair(pair[0], pair[1]);
16 | }), items_rend = items.length === 0 ? "empty " : _(items).join(""), " " + items_rend + "
") : json == null ? "null " : typeof json === "object" ? (items = (_.pairs(json).map(function(pair) {
17 | return _this.render_pair(pair[0], pair[1]);
18 | })).join(""), items_rend = items.length === 0 ? "empty " : _(items).join(""), " " + items_rend + "
") : "" + json;
19 | },
20 | render_pair: function(key, value) {
21 | if (value instanceof Array) {
22 | return "" + key + " :
" + (this.render_json_helper(value)) + "
";
23 | } else if (typeof value === "object") {
24 | return "" + key + " :
" + (this.render_json_helper(value)) + "
";
25 | } else {
26 | return "" + key + " : " + (this.render_json_helper(value)) + "
";
27 | }
28 | }
29 | };
30 |
31 | }).call(this);
32 |
--------------------------------------------------------------------------------
/assets/js/json_renderer_leaves.js:
--------------------------------------------------------------------------------
1 | // Generated by CoffeeScript 1.6.1
2 | var JSONRenderer;
3 |
4 | JSONRenderer = {
5 | render_json: function(json) {
6 | var result;
7 | result = this.render_json_helper(json);
8 | return "" + result + "
";
9 | },
10 | render_json_helper: function(json) {
11 | var items, items_rend, result,
12 | _this = this;
13 | return result = json instanceof Array ? (items = _.pairs(json).map(function(pair) {
14 | return _this.render_pair(pair[0], pair[1]);
15 | }), items_rend = items.length === 0 ? "empty " : _(items).join(""), " " + items_rend + "
") : json == null ? "null " : typeof json === "object" ? (items = (_.pairs(json).map(function(pair) {
16 | return _this.render_pair(pair[0], pair[1]);
17 | })).join(""), items_rend = items.length === 0 ? "empty " : _(items).join(""), " " + items_rend + "
") : "" + json;
18 | },
19 | render_pair: function(key, value) {
20 | if (value instanceof Array) {
21 | return "" + key + " :
" + (this.render_json_helper(value)) + "
";
22 | } else if (typeof value === "object") {
23 | return "" + key + " :
" + (this.render_json_helper(value)) + "
";
24 | } else {
25 | return "" + key + " : " + (this.render_json_helper(value)) + "
";
26 | }
27 | }
28 | };
29 |
--------------------------------------------------------------------------------
/assets/js/moriscore.js:
--------------------------------------------------------------------------------
1 | // Generated by CoffeeScript 1.7.1
2 | (function() {
3 | var arg_first, coll_last, dont_chain, end_of_chain, exports, m_, previousDef, previousDef$, result, root,
4 | __slice = [].slice;
5 |
6 | root = this;
7 |
8 | previousDef = root.m_;
9 |
10 | previousDef$ = root.m$;
11 |
12 | m_ = function(obj) {
13 | if (obj instanceof m_) {
14 | return obj;
15 | } else if (!(this instanceof m_)) {
16 | return new m_(obj);
17 | } else {
18 | this._wrapped = mori.is_collection(obj) ? obj : mori.js_to_clj(obj);
19 | }
20 | };
21 |
22 | if (typeof exports !== 'undefined') {
23 | if (typeof module !== 'undefined' && module.exports) {
24 | exports = module.exports = m_;
25 | } else {
26 | exports.m_ = m_;
27 | }
28 | } else {
29 | root.m_ = m_;
30 | }
31 |
32 | m_.noConflict = function() {
33 | root.m_ = previousDef;
34 | root.m$ = previousDef$;
35 | return m_;
36 | };
37 |
38 | m_.prototype.to_js = function() {
39 | return mori.clj_to_js(this._wrapped);
40 | };
41 |
42 | m_.chain = function(obj) {
43 | return m_(obj).chain();
44 | };
45 |
46 | root.m$ = m_.chain;
47 |
48 | m_.prototype.chain = function() {
49 | this._chain = true;
50 | return this;
51 | };
52 |
53 | m_.prototype.value = function() {
54 | return this._wrapped;
55 | };
56 |
57 | dont_chain = mori.list("list", "vector", "hash_map", "set", "sorted_set", "range", "iterate", "repeat", "repeatedly", "prim_seq", "identity", "constantly", "inc", "dec", "sum", "is_even", "is_odd", "comp", "juxt", "knit", "pipeline", "partial", "curry", "fnil", "js_to_clj", "clj_to_js", "equals", "hash");
58 |
59 | mori.each(dont_chain, function(name) {
60 | return m_[name] = mori[name];
61 | });
62 |
63 | end_of_chain = m_.list("is_list", "is_seq", "is_vector", "is_map", "is_set", "is_collection", "is_sequential", "is_associative", "is_counted", "is_indexed", "is_reduceable", "is_seqable", "is_reversible");
64 |
65 | mori.each(end_of_chain, function(name) {
66 | m_[name] = mori[name];
67 | return m_.prototype[name] = function() {
68 | return mori[name](this._wrapped);
69 | };
70 | });
71 |
72 | arg_first = m_.list("conj", "into", "assoc", "dissoc", "empty", "get", "get_in", "has_key", "find", "nth", "last", "assoc_in", "update_in", "count", "is_empty", "peek", "pop", "zipmap", "reverse", "each", "subvec", "keys", "vals", "disj", "union", "intersection", "difference", "is_subset", "is_superset", "first", "rest", "seq", "concat", "flatten", "into_array");
73 |
74 | result = function(obj) {
75 | if (this._chain) {
76 | return m_(obj).chain();
77 | } else {
78 | return obj;
79 | }
80 | };
81 |
82 | mori.each(arg_first, function(name) {
83 | m_[name] = mori[name];
84 | return m_.prototype[name] = function() {
85 | var args;
86 | args = 1 <= arguments.length ? __slice.call(arguments, 0) : [];
87 | args.unshift(this._wrapped);
88 | return result.call(this, mori[name].apply(mori, args));
89 | };
90 | });
91 |
92 | coll_last = m_.list("cons", "map", "mapcat", "filter", "remove", "reduce", "reduce_kv", "take", "take_while", "drop", "drop_while", "some", "every", "sort", "sort_by", "interpose", "interleave", "partition", "partition_by", "group_by");
93 |
94 | mori.each(coll_last, function(name) {
95 | m_[name] = mori[name];
96 | return m_.prototype[name] = function() {
97 | var args;
98 | args = 1 <= arguments.length ? __slice.call(arguments, 0) : [];
99 | args.push(this._wrapped);
100 | return result.call(this, mori[name].apply(mori, args));
101 | };
102 | });
103 |
104 | }).call(this);
105 |
--------------------------------------------------------------------------------
/assets/mud/BOSS-computer-room.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/mud/BOSS-computer-room.jpg
--------------------------------------------------------------------------------
/assets/mud/concrete-starter-room.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/mud/concrete-starter-room.jpg
--------------------------------------------------------------------------------
/assets/mud/conference-room.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/mud/conference-room.jpg
--------------------------------------------------------------------------------
/assets/mud/dark-wood-study.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/mud/dark-wood-study.jpg
--------------------------------------------------------------------------------
/assets/mud/deadly-pit.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/mud/deadly-pit.jpg
--------------------------------------------------------------------------------
/assets/mud/exit-to-freedom.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/mud/exit-to-freedom.jpg
--------------------------------------------------------------------------------
/assets/mud/laboratory.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/mud/laboratory.jpg
--------------------------------------------------------------------------------
/assets/mud/library.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/mud/library.jpg
--------------------------------------------------------------------------------
/assets/mud/monorail-cart.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/mud/monorail-cart.jpg
--------------------------------------------------------------------------------
/assets/mud/monorail-station.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/mud/monorail-station.jpg
--------------------------------------------------------------------------------
/assets/mud/utility-room.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/assets/mud/utility-room.jpg
--------------------------------------------------------------------------------
/css/main.css:
--------------------------------------------------------------------------------
1 | /*****************************************************************************/
2 | /*
3 | /* Common
4 | /*
5 | /*****************************************************************************/
6 |
7 | /* Global Reset */
8 | * {
9 | margin: 0;
10 | padding: 0;
11 | }
12 |
13 | html, body { height: 100%; }
14 |
15 | body {
16 | background-color: #FFF;
17 | font: 13.34px Helvetica, Arial, sans-serif;
18 | font-size: small;
19 | text-align: center;
20 | }
21 |
22 | h1, h2, h3, h4, h5, h6 {
23 | font-size: 100%; }
24 |
25 | h1 { margin-bottom: 1em; }
26 | p { margin: 1em 0; }
27 |
28 | a { color: #00a; }
29 | a:hover { color: #000; }
30 | a:visited { color: #a0a; }
31 |
32 | table {
33 | font-size: inherit;
34 | font: 100%;
35 | }
36 |
37 | /*****************************************************************************/
38 | /*
39 | /* Home
40 | /*
41 | /*****************************************************************************/
42 | ul.posts {
43 | list-style-type: none;
44 | margin-bottom: 2em;
45 | }
46 |
47 | ul.posts li {
48 | line-height: 1.75em;
49 | }
50 |
51 | ul.posts span {
52 | color: #aaa;
53 | font-family: Monaco, "Courier New", monospace;
54 | font-size: 80%;
55 | }
56 |
57 | /*****************************************************************************/
58 | /*
59 | /* Site
60 | /*
61 | /*****************************************************************************/
62 |
63 | .site {
64 | font-size: 115%;
65 | text-align: justify;
66 | width: 42em;
67 | margin: 3em auto 2em;
68 | line-height: 1.5em;
69 | }
70 |
71 |
72 | .site .header a {
73 | font-weight: bold;
74 | text-decoration: none;
75 | }
76 |
77 | .site .header h1.title {
78 | display: inline-block;
79 | margin-bottom: 2em;
80 | }
81 |
82 | .site .header h1.title a {
83 | color: #a00;
84 | }
85 |
86 | .site .header h1.title a:hover {
87 | color: #000;
88 | }
89 |
90 | .site .header a.extra {
91 | color: #aaa;
92 | margin-left: 1em;
93 | }
94 |
95 | .site .header a.extra:hover {
96 | color: #000;
97 | }
98 |
99 | .site .meta {
100 | color: #aaa;
101 | }
102 |
103 | .site .footer {
104 | font-size: 80%;
105 | color: #666;
106 | border-top: 4px solid #eee;
107 | margin-top: 2em;
108 | overflow: hidden;
109 | }
110 |
111 | .site .footer .contact {
112 | float: left;
113 | margin-right: 3em;
114 | }
115 |
116 | .site .footer .contact a {
117 | color: #8085C1;
118 | }
119 |
120 | .site .footer .rss {
121 | margin-top: 1.1em;
122 | margin-right: -.2em;
123 | float: right;
124 | }
125 |
126 | .site .footer .rss img {
127 | border: 0;
128 | }
129 |
130 | /*****************************************************************************/
131 | /*
132 | /* Posts
133 | /*
134 | /*****************************************************************************/
135 |
136 | /* standard */
137 | .post pre {
138 | border: 1px solid #ddd;
139 | background-color: #eef;
140 | padding: 0 .4em;
141 | }
142 |
143 | .post ul, .post ol {
144 | margin-left: 1.35em;
145 | }
146 |
147 | .post code {
148 | border: 1px solid #ddd;
149 | background-color: #eef;
150 | padding: 0 .2em;
151 | }
152 |
153 | .post pre code {
154 | border: none;
155 | }
156 |
157 | /* terminal */
158 | .post pre.terminal {
159 | border: 1px solid #000;
160 | background-color: #333;
161 | color: #FFF;
162 | }
163 |
164 | .post pre.terminal code {
165 | background-color: #333;
166 | }
167 |
--------------------------------------------------------------------------------
/css/syntax.css:
--------------------------------------------------------------------------------
1 | .highlight { background: #ffffff; }
2 | .highlight .c { color: #999988; font-style: italic } /* Comment */
3 | .highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
4 | .highlight .k { font-weight: bold } /* Keyword */
5 | .highlight .o { font-weight: bold } /* Operator */
6 | .highlight .cm { color: #999988; font-style: italic } /* Comment.Multiline */
7 | .highlight .cp { color: #999999; font-weight: bold } /* Comment.Preproc */
8 | .highlight .c1 { color: #999988; font-style: italic } /* Comment.Single */
9 | .highlight .cs { color: #999999; font-weight: bold; font-style: italic } /* Comment.Special */
10 | .highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
11 | .highlight .gd .x { color: #000000; background-color: #ffaaaa } /* Generic.Deleted.Specific */
12 | .highlight .ge { font-style: italic } /* Generic.Emph */
13 | .highlight .gr { color: #aa0000 } /* Generic.Error */
14 | .highlight .gh { color: #999999 } /* Generic.Heading */
15 | .highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
16 | .highlight .gi .x { color: #000000; background-color: #aaffaa } /* Generic.Inserted.Specific */
17 | .highlight .go { color: #888888 } /* Generic.Output */
18 | .highlight .gp { color: #555555 } /* Generic.Prompt */
19 | .highlight .gs { font-weight: bold } /* Generic.Strong */
20 | .highlight .gu { color: #aaaaaa } /* Generic.Subheading */
21 | .highlight .gt { color: #aa0000 } /* Generic.Traceback */
22 | .highlight .kc { font-weight: bold } /* Keyword.Constant */
23 | .highlight .kd { font-weight: bold } /* Keyword.Declaration */
24 | .highlight .kp { font-weight: bold } /* Keyword.Pseudo */
25 | .highlight .kr { font-weight: bold } /* Keyword.Reserved */
26 | .highlight .kt { color: #445588; font-weight: bold } /* Keyword.Type */
27 | .highlight .m { color: #009999 } /* Literal.Number */
28 | .highlight .s { color: #d14 } /* Literal.String */
29 | .highlight .na { color: #008080 } /* Name.Attribute */
30 | .highlight .nb { color: #0086B3 } /* Name.Builtin */
31 | .highlight .nc { color: #445588; font-weight: bold } /* Name.Class */
32 | .highlight .no { color: #008080 } /* Name.Constant */
33 | .highlight .ni { color: #800080 } /* Name.Entity */
34 | .highlight .ne { color: #990000; font-weight: bold } /* Name.Exception */
35 | .highlight .nf { color: #990000; font-weight: bold } /* Name.Function */
36 | .highlight .nn { color: #555555 } /* Name.Namespace */
37 | .highlight .nt { color: #000080 } /* Name.Tag */
38 | .highlight .nv { color: #008080 } /* Name.Variable */
39 | .highlight .ow { font-weight: bold } /* Operator.Word */
40 | .highlight .w { color: #bbbbbb } /* Text.Whitespace */
41 | .highlight .mf { color: #009999 } /* Literal.Number.Float */
42 | .highlight .mh { color: #009999 } /* Literal.Number.Hex */
43 | .highlight .mi { color: #009999 } /* Literal.Number.Integer */
44 | .highlight .mo { color: #009999 } /* Literal.Number.Oct */
45 | .highlight .sb { color: #d14 } /* Literal.String.Backtick */
46 | .highlight .sc { color: #d14 } /* Literal.String.Char */
47 | .highlight .sd { color: #d14 } /* Literal.String.Doc */
48 | .highlight .s2 { color: #d14 } /* Literal.String.Double */
49 | .highlight .se { color: #d14 } /* Literal.String.Escape */
50 | .highlight .sh { color: #d14 } /* Literal.String.Heredoc */
51 | .highlight .si { color: #d14 } /* Literal.String.Interpol */
52 | .highlight .sx { color: #d14 } /* Literal.String.Other */
53 | .highlight .sr { color: #009926 } /* Literal.String.Regex */
54 | .highlight .s1 { color: #d14 } /* Literal.String.Single */
55 | .highlight .ss { color: #990073 } /* Literal.String.Symbol */
56 | .highlight .bp { color: #999999 } /* Name.Builtin.Pseudo */
57 | .highlight .vc { color: #008080 } /* Name.Variable.Class */
58 | .highlight .vg { color: #008080 } /* Name.Variable.Global */
59 | .highlight .vi { color: #008080 } /* Name.Variable.Instance */
60 | .highlight .il { color: #009999 } /* Literal.Number.Integer.Long */
61 |
--------------------------------------------------------------------------------
/feed.xml:
--------------------------------------------------------------------------------
1 | ---
2 | layout: none
3 | ---
4 |
5 |
6 |
7 | {{ site.name }}
8 | {{ site.description }}
9 | {{ site.url }}
10 |
11 | {% for post in site.posts limit:10 %}
12 | -
13 |
{{ post.title }}
14 | {{ post.excerpt | strip_html }}
15 | {{ post.date | date: "%a, %d %b %Y %H:%M:%S %z" }}
16 | {{ site.url }}{{ post.url }}
17 | {{ site.url }}{{ post.url }}
18 |
19 | {% endfor %}
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | title: Rig Some Light
4 | ---
5 |
6 |
7 |
8 | {% for post in site.posts %}
9 | {{ post.date | date_to_string }} {{ post.title }}
10 | {% endfor %}
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/inline-edit/deps.edn:
--------------------------------------------------------------------------------
1 |
2 | {:deps {org.clojure/clojure {:mvn/version "1.12.0"}
3 | org.clojure/clojurescript {:mvn/version "1.11.132"}
4 | org.clojure/data.json {:mvn/version "2.5.1"}
5 | org.babashka/sci {:mvn/version "0.9.44"}
6 | inline-editor/inline-editor {:local/root "../../inline-editor"}}
7 | :paths ["src" "resources"]
8 | :aliases {:fig {:extra-deps
9 | {com.bhauman/rebel-readline-cljs {:mvn/version "0.1.4"}
10 | com.bhauman/figwheel-main {:mvn/version "0.2.21-SNAPSHOT"}
11 | org.slf4j/slf4j-nop {:mvn/version "2.0.16"}}
12 | :extra-paths ["target" "test"]}
13 | :build {:main-opts ["-m" "figwheel.main" "-b" "dev" "-r"]}
14 | :clean {:main-opts ["-m" "figwheel.main" "--clean" "dev"]}
15 | :simple {:main-opts ["-m" "figwheel.main" "-O" "simple" "-bo" "dev"]}
16 | :min {:main-opts ["-m" "figwheel.main" "-O" "advanced" "-bo" "dev"]}
17 | :test {:main-opts ["-m" "figwheel.main" "-co" "test.cljs.edn" "-m" "inline-editor.test-runner"]}}}
18 |
--------------------------------------------------------------------------------
/inline-edit/dev.cljs.edn:
--------------------------------------------------------------------------------
1 | ^{:watch-dirs ["src"]
2 | :open-url false
3 | ; :css-dirs ["resources/public/css"]
4 | }
5 | {:main inline-e.post
6 | :output-dir "../assets/inline-edit/out"
7 | :output-to "../assets/inline-edit/main.js"
8 | :asset-path "/assets/inline-edit/out"}
9 |
--------------------------------------------------------------------------------
/inline-edit/src/inline_e/post.cljs:
--------------------------------------------------------------------------------
1 | (ns inline-e.post
2 | (:require [inline-editor.inline-editor :as ie]))
3 |
4 |
5 | (js/console.log "I'm herer")
6 |
--------------------------------------------------------------------------------
/keybase.txt:
--------------------------------------------------------------------------------
1 | ---
2 | permalink: /.well-known/keybase.txt
3 | ---
4 | ==================================================================
5 | https://keybase.io/bhauman
6 | --------------------------------------------------------------------
7 |
8 | I hereby claim:
9 |
10 | * I am an admin of https://rigsomelight.com
11 | * I am bhauman (https://keybase.io/bhauman) on keybase.
12 | * I have a public key ASBhQeHtmPegp3_31bd9Tlz33dt9MtLWXwjgGFugHrCAkwo
13 |
14 | To do so, I am signing this object:
15 |
16 | {
17 | "body": {
18 | "key": {
19 | "eldest_kid": "01202c99186003c9081716d1cd51c41ef1bc49f3cb4210e4168bd4fc65c822c90bfa0a",
20 | "host": "keybase.io",
21 | "kid": "01206141e1ed98f7a0a77ff7d5b77d4e5cf7dddb7d32d2d65f08e0185ba01eb080930a",
22 | "uid": "2635cb7877c6b0840c7d713c3c23c719",
23 | "username": "bhauman"
24 | },
25 | "merkle_root": {
26 | "ctime": 1556926799,
27 | "hash": "a4e5818a65ef703f797498436d163bd0d625f1ad6a0b8f48c39aab3250b58ea75025fd2fb20817fb55a2487659d20f8fefe7944ad0068ccef7329523c9fe44dc",
28 | "hash_meta": "3d5f8eaeb4823b294933c30ebcb92e5f626285610f474f7ab8754adc2e52b64d",
29 | "seqno": 5293793
30 | },
31 | "service": {
32 | "entropy": "P8DHl1vcWdQ2IhdgBEasfAix",
33 | "hostname": "rigsomelight.com",
34 | "protocol": "https:"
35 | },
36 | "type": "web_service_binding",
37 | "version": 2
38 | },
39 | "client": {
40 | "name": "keybase.io go client",
41 | "version": "3.2.2"
42 | },
43 | "ctime": 1556926850,
44 | "expire_in": 504576000,
45 | "prev": "c8553a8df4ce8965d4b5724098e8cdb6f113f5fcc65e02e7298e30a614c8a285",
46 | "seqno": 20,
47 | "tag": "signature"
48 | }
49 |
50 | which yields the signature:
51 |
52 | hKRib2R5hqhkZXRhY2hlZMOpaGFzaF90eXBlCqNrZXnEIwEgYUHh7Zj3oKd/99W3fU5c993bfTLS1l8I4BhboB6wgJMKp3BheWxvYWTESpcCFMQgyFU6jfTOiWXUtXJAmOjNtvET9fzGXgLnKY4wphTIooXEIK1lA+r8yKF9kiEFq7DfLQXjpM3VM7QKiT+TxgQAoXTvAgHCo3NpZ8RAoeNQLVCen8ZXyf+NOy4RaSPsgEKkfo1/bhkSfPuhRYEgJ9M0ulbJubHcURVob0P63ddZ3uDy87hUX0d6MR8JCqhzaWdfdHlwZSCkaGFzaIKkdHlwZQildmFsdWXEIBDE5Ydab/dwmZTVpIbZL6F6P5DM/1zftgz7OudVzyJOo3RhZ80CAqd2ZXJzaW9uAQ==
53 |
54 | And finally, I am proving ownership of this host by posting or
55 | appending to this document.
56 |
57 | View my publicly-auditable identity here: https://keybase.io/bhauman
58 |
59 | ==================================================================
60 |
--------------------------------------------------------------------------------
/resources/public/devcards/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/resources/public/devcards/rendered_edn.css:
--------------------------------------------------------------------------------
1 | .rendered-edn .keyval > .keyword {
2 | color: rgb(196,33,0);
3 | padding-right: 10px;
4 | }
5 |
6 | .rendered-edn .collection {
7 | position: relative;
8 | }
9 |
10 | .rendered-edn .vector,
11 | .rendered-edn .set,
12 | .rendered-edn .seq {
13 | padding-left: 0.9em;
14 | padding-right: 0.9em;
15 | }
16 |
17 | .rendered-edn .set {
18 | padding-left: 1.2em;
19 | }
20 |
21 | .rendered-edn .collection.map {
22 | padding: 1.8em;
23 | display: inline-block;
24 | vertical-align: top;
25 | }
26 |
27 | .rendered-edn .vector,
28 | .rendered-edn .set,
29 | .rendered-edn .seq {
30 | display: inline-block;
31 | vertical-align: top;
32 | }
33 |
34 | .rendered-edn .vector > .contents {
35 | background-color: rgba(0,0,0,0.01);
36 | }
37 |
38 | .rendered-edn .keyval {
39 | display: inline-block;
40 | }
41 |
42 | .rendered-edn .collection.map > .contents > .separator {
43 | padding-right: 10px;
44 | }
45 |
46 | .rendered-edn .collection .collection > .contents {
47 | /* background-color: rgba(0,0,0,0.02); */
48 | }
49 |
50 | .rendered-edn .collection .contents > .collection:nth-child(even) {
51 | background-color: rgba(0,0,0,0.04);
52 | }
53 |
54 | .rendered-edn .contents {
55 | display: inline-block;
56 | }
57 |
58 | .rendered-edn .opener,
59 | .rendered-edn .closer {
60 | color: #999;
61 | }
62 |
63 | .rendered-edn .collection.map > .opener,
64 | .rendered-edn .collection.vector > .opener,
65 | .rendered-edn .collection.seq > .opener,
66 | .rendered-edn .collection.set > .opener {
67 | position: absolute;
68 | top: 0px;
69 | left: 3px;
70 | }
71 | .rendered-edn .collection.map > .closer {
72 | position: absolute;
73 | bottom: 0px;
74 | left: 3px;
75 | display: block;
76 | }
77 |
78 | .rendered-edn .collection.vector > .closer,
79 | .rendered-edn .collection.seq > .closer,
80 | .rendered-edn .collection.set > .closer {
81 | position: absolute;
82 | bottom: 0px;
83 | right: 0px;
84 | display: block;
85 | }
--------------------------------------------------------------------------------
/resources/public/fonts/glyphicons-halflings-regular.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/resources/public/fonts/glyphicons-halflings-regular.eot
--------------------------------------------------------------------------------
/resources/public/fonts/glyphicons-halflings-regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/resources/public/fonts/glyphicons-halflings-regular.ttf
--------------------------------------------------------------------------------
/resources/public/fonts/glyphicons-halflings-regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bhauman/bhauman.github.com/846d87735f5fe63ae4bb4f13de15260c6d55878f/resources/public/fonts/glyphicons-halflings-regular.woff
--------------------------------------------------------------------------------