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
import React, { PropTypes } from "react"; | |
import Logo from "../components/Logo"; | |
import slots from "../slots"; | |
const Location = React.createClass({ | |
getInitialState() { | |
return { | |
pushState: true | |
}; | |
}, |
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
static getMapPaths(map) { | |
map = new Map(map); | |
getPaths = (map, result = new List([])) => { | |
if (!Map.isMap(map)) { | |
return result; | |
} | |
return map.flip().toList().reduce((res, k) => { | |
return res.push(getPaths((map.get(k)), result.push(k))); | |
}, new List()); | |
}; |
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
import rules from "./rules"; | |
import Solver from "solvr"; | |
import im from "immutable"; | |
class MySolver extends Solver { | |
get(path) { | |
path = Solver.path(path); | |
if (path.join(".") === "user") { | |
return this.oneOf(["users"]); | |
} |
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
import r from "superagent-bluebird-promise"; | |
import router from "./router"; | |
export default { | |
"request": (req, context) => { | |
let route = router.match(req.url); | |
return context.set("route", route); | |
}, | |
"route": (route, context) => { | |
let {name, params: { id }} = route; |
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
import Router from "../router"; | |
describe('Router', () => { | |
const router = new Router(require('./data/routes')); | |
it('should match correct route name', () => { | |
expect(router.match('http://example.com/users/1/comments').name).toBe('users.comments'); | |
expect(router.match('http://example.com/users').name).toBe('users'); | |
}); | |
it('should match correct route name even with slashes', () => { |
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
➜ gifter git:(master) ✗ http GET 'ggifster.ru/api/gifts;from=a&to=b' | |
HTTP/1.1 200 OK | |
Connection: keep-alive | |
Content-Length: 109 | |
Content-Type: application/json; charset=utf-8 | |
Date: Tue, 19 May 2015 12:50:32 GMT | |
ETag: W/"6d-b75e774" | |
Vary: Accept-Encoding | |
X-Powered-By: Express |
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
import { fbAccessToken } from "../config.js" | |
import assert from "assert"; | |
import vkontakte from "vkontakte"; | |
import Promise from "bluebird"; | |
const join = Promise.join; | |
export default { | |
name: "users", |
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
<script dangerouslySetInnerHTML={{__html: ` | |
window.fbAsyncInit = function() { | |
FB.init({ | |
appId : 'your-app-id', | |
xfbml : true, | |
version : 'v2.3' | |
}); | |
}; | |
(function(d, s, id){ |
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
let | |
VM117:2 Uncaught ReferenceError: let is not defined | |
at <anonymous>:2:1 | |
at Object.InjectedScript._evaluateOn (<anonymous>:887:140) | |
at Object.InjectedScript._evaluateAndWrap (<anonymous>:820:34) | |
at Object.InjectedScript.evaluate (<anonymous>:694:21)(anonymous function) @ VM117:2InjectedScript._evaluateOn @ VM104:887InjectedScript._evaluateAndWrap @ VM104:820InjectedScript.evaluate @ VM104:694 | |
let a = 10; | |
VM152:2 Uncaught SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode | |
at Object.InjectedScript._evaluateOn (<anonymous>:887:140) | |
at Object.InjectedScript._evaluateAndWrap (<anonymous>:820:34) |
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
{ | |
number-param1 | |
[ // and | |
[ | |
[> $min], | |
[= 0] | |
] // or | |
[ | |
[< $max] | |
] |