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
;; Updated tutorial code for Om 0.1.6, 2014-01-16 | |
;; http://www.lexicallyscoped.com/2013/12/25/slice-of-reactjs-and-cljs.html | |
;; See comments below for details on the changes. | |
(def app-state | |
(atom {:comments [{:author "Pete Hunt" :text "This is a comment."} | |
{:author "Jordan Walke" :text "This is *another* coment"}]})) | |
(defn comment [{:keys [author text]} owner] | |
(om/component |
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
define([ | |
], function() { | |
return { | |
componentDidMount: function() { | |
this._boundForceUpdate = this.forceUpdate.bind(this, null); | |
this.getBackboneObject().on("all", this._boundForceUpdate, this); | |
}, | |
componentWillUnmount: function() { | |
this.getBackboneObject().off("all", this._boundForceUpdate); | |
}, |
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
ADD NEW SUBMODULE | |
============== | |
$ git submodule add http://github.com/scrooloose/nerdtree.git vim/bundle/nerdtree | |
$ git submodule init | |
$ git commit -m 'add nerd tree plugin as submodule' | |
UPDATING | |
====== | |
Git submodules are locked to specific commits in their respective |
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
shibuya.el | |
dazza.el | |
elpa/ | |
places | |
eshell/ | |
.smex-items | |
ac-comphist.dat | |
projectile-bookmarks.eld |
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
/** | |
* Creates an ArrayBuffer, converts the binary to a Uint8 Array, and | |
* places the buffer in a DataView, which is needed to create a Blob | |
**/ | |
_makeBlob: function(binary) { | |
var data = new ArrayBuffer(binary.length), | |
mimeString = "text/plain", | |
ui8a = new Uint8Array(data, 0), | |
dataView, | |
blob; |
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
<? | |
// Quicksilver Score | |
// | |
// A port of the Quicksilver string ranking algorithm | |
// (re-ported from Javascript to PHP by Kenzie Campbell) | |
// http://route19.com/logbook/view/quicksilver-score-in-php | |
// | |
// score("hello world","axl") //=> 0.0 | |
// score("hello world","ow") //=> 0.6 |
NewerOlder