BOOM Analytics: Exploring Data-Centric, Declarative Programming for the Cloud
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| operator (<~) 49 | |
| { $channel } => #{ yield csp.take($channel) } | |
| operator (~>) 50 right | |
| { $value, $channel } => #{ yield csp.put($channel, $value) } | |
| macro (<~alts) { | |
| rule { } => { | |
| yield csp.alts | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ;;; To add a tooltip, write (tooltip {:className "foo"}) instead of #js {:className "foo"} | |
| ;;; You can simplify this and just show what you need: #js {:title (pr-str (om/...))}. | |
| ;;; testfoo.core (cljs) | |
| (ns testfoo.core | |
| (:require-macros [testfoo.macros :refer (tooltip)]) | |
| (:require [om.core :as om :include-macros true] | |
| [om.dom :as dom :include-macros true] | |
| [cljs.reader :as reader])) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| # Proof of concept for a HAProxy maintenance mode | |
| # | |
| # | |
| # Control the maintenance page during runtime using the stats socket: | |
| # | |
| # To put the whole site in maintenance mode (for all IPs): | |
| # > add acl #0 0.0.0.0/0 | |
| # | |
| # To exclude your own ip, so you are able to test things out: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var Dialog = React.createClass({ | |
| render: function() { | |
| // 1) render nothing, this way the DOM diff will never try to do | |
| // anything to it again, and we get a node to mess with | |
| return React.DOM.div(); | |
| }, | |
| componentDidMount: function() { | |
| // 2) do DOM lib stuff | |
| this.node = this.getDOMNode(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (ns creator.core | |
| (:require-macros [cljs.core.async.macros :refer [go]]) | |
| (:require [om.core :as om :include-macros true] | |
| [cljs.core.async :as async :refer [chan <! >! put!]] | |
| [om-tools.core :refer-macros [defcomponent]] | |
| [cljs.reader :as reader] | |
| [goog.dom :as gdom] | |
| [om-tools.dom :as dom :include-macros true]) | |
| (:import [goog.net XhrIo])) |
Tools that read through a directory, stream or tree and create an Application Cache manifest for you.
AppCache is still a douche but luckily there are tools available to take the pain out of generating your initial manifest files:
- Grunt: grunt-manifest is currently the de facto option, but the project lead is looking for a new maintainer. In light of that grunt-appcache is an alternative in case you're looking for more active support.
- Gulp: gulp-manifest is inspired by grunt-manifest and has a similar set of options.
- Broccoli: broccoli-manifest brings manifest file compilation based on trees.
Do review what is generated. As with any automation tooling, be careful that what is being generated is what you actually intend on being cached. I generally rel
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Solarized | |
| #FDF6E3,#EEE8D5,#93A1A1,#FDF6E3,#EEE8D5,#657B83,#2AA198,#DC322F | |
| Solarized Dark | |
| #073642,#002B36,#B58900,#FDF6E3,#CB4B16,#FDF6E3,#2AA198,#DC322F | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (defmacro html [body] | |
| `(if-not (:render-colors? initial-query-map) | |
| (html/html ~body) | |
| (let [body# ~body] | |
| (try | |
| (let [[tag# & rest#] body# | |
| attrs# (if (map? (first rest#)) | |
| (first rest#) | |
| {}) | |
| rest# (if (map? (first rest#)) |
If you have a Flame reference device and wanna try out alternate versions of Firefox OS apart from the stock one, but not willing to build from source, then follow this mini-manual.
You can download the packages from the Nightly Build directories of Mozilla FTP. You specifically need the following two files:
- b2g-XX.0a1.en-US.android-arm.tar.gz (XX is the version number)
- gaia.zip