I hereby claim:
- I am jstejada on github.
- I am jstejada (https://keybase.io/jstejada) on keybase.
- I have a public key whose fingerprint is 7CEC C04A BE26 D6FE 5603 6D8A 1639 4B5A F841 1902
To claim this, I am signing this object:
/* | |
Nice things about this approach: | |
- No need to expose $refs to users. Just use regular IDs instead. | |
- No need for double-composition (just compose React components, not queries). | |
- Composition becomes less magical (since we're passing regular IDs around). | |
- Collapse Query and Fragment concepts into Query. | |
- Take advantage of existing template strings to pass in query variables. |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
; (itp "Fooo #{x} #{bar}") | |
; (str "Foooo" x " " bar) | |
(require '[clojure.string :as str]) | |
(defn make-result | |
[re string] | |
(let |
let env = { | |
'+': (...args)=> args.reduce((mem, cur)=> mem + cur), | |
'*': (...args)=> args.reduce((mem, cur)=> mem * cur), | |
'-': (...args)=> args.reduce((mem, cur)=> mem - cur), | |
'/': (...args)=> args.reduce((mem, cur)=> mem / cur), | |
}; | |
function tokenize(expr) { | |
return expr.replace(/\(|\)/g, ' $& ').trim().split(/\s+/); |
React = require 'React' | |
R = React.DOM | |
ColorPicker = React.createClass( | |
render: -> | |
R.a | |
className: "pla-color-picker collapsed" | |
href: "##{@props.colorPaletteId}" |
function _hash(key, size) { | |
key = key.toString(); | |
var hash = 5381; | |
for(var i in key){ | |
var c = key[i]; | |
hash = ((hash << 5) + hash) + c.charCodeAt(0); /* hash * 33 + c */ | |
} | |
return hash % size; | |
} |
charMap: | |
'á': normal: 'a', regexp: new RegExp('[á]', 'gi') | |
'é': normal: 'e', regexp: new RegExp('[é]', 'gi') | |
'í': normal: 'i', regexp: new RegExp('[í]', 'gi') | |
'ó': normal: 'o', regexp: new RegExp('[ó]', 'gi') | |
'ú': normal: 'u', regexp: new RegExp('[ú]', 'gi') | |
'Á': normal: 'A', regexp: new RegExp('[Á]', 'gi') | |
'É': normal: 'E', regexp: new RegExp('[É]', 'gi') | |
'Í': normal: 'I', regexp: new RegExp('[Í]', 'gi') | |
'Ó': normal: 'O', regexp: new RegExp('[Ó]', 'gi') |
React = require 'react/addons' | |
TestUtils = React.addons.TestUtils | |
# Component | |
Comp = React.createClass( | |
handleSubmit: (e)-> | |
@props.handleSubmit() | |
handleInputChange: (e)-> |
serverRootUri = "http://127.0.0.1:8000" | |
mochaPhantomJsTestRunner = serverRootUri + "/browser/test/index.html" | |
module.exports = (grunt) -> | |
grunt.initConfig | |
pkg: grunt.file.readJSON("package.json") | |
coffeelint: | |
gruntfile: | |
src: '<%= watch.gruntfile.files %>' |
# Monkeypatching BSON::Object | |
module BSON | |
class ObjectId | |
# These aliases override default JSON representation of an ObjectId | |
# Spits a string id '540f51de6d61632c74020000', instead of | |
# { "$oid": '540f51de6d61632c74020000' } | |
alias :to_json :to_s | |
alias :as_json :to_s | |
end | |
end |
I hereby claim:
To claim this, I am signing this object: