Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

Pavel Lang langpavel

🏠
Working from home
Block or report user

Report or block langpavel

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@langpavel
langpavel / GraphQLTimestamp.js
Last active Jul 26, 2019
GraphQLTimestamp.js
View GraphQLTimestamp.js
import { Kind } from 'graphql/language';
import { GraphQLScalarType } from 'graphql';
function serializeDate(value) {
if (value instanceof Date) {
return value.getTime();
} else if (typeof value === 'number') {
return Math.trunc(value);
} else if (typeof value === 'string') {
return Date.parse(value);
@steida
steida / staticRender.js
Created Jan 6, 2016
Gulp task for static rendering for Este
View staticRender.js
gulp.task('static-render', done => {
args.production = true;
const pages = {
'/': 'index.html',
'/foo-bla-bar': '404.html'
};
const fetch = path => new Promise((resolve, reject) => {
require('http').get({host: 'localhost', path, port: 8000}, res => {
View gist:598fa75e22bdfa44cf47

2015-01-29 Unofficial Relay FAQ

Compilation of questions and answers about Relay from React.js Conf.

Disclaimer: I work on Relay at Facebook. Relay is a complex system on which we're iterating aggressively. I'll do my best here to provide accurate, useful answers, but the details are subject to change. I may also be wrong. Feedback and additional questions are welcome.

What is Relay?

Relay is a new framework from Facebook that provides data-fetching functionality for React applications. It was announced at React.js Conf (January 2015).

View gist:272956
# How to echobot with XMPP, BOSH, and Strophe
1. Setup ejabberd(http://www.ejabberd.im/) server and setup account admin@localhost.local
NOTE: localhost should be enough. If you setup something else, make sure you add it at /etc/hosts like this
#/etc/hosts
127.0.0.1 localhost.local
NOTE: Also download Psi(http://psi-im.org/), and make sure you can connect to your ejabberd server.
2. Download strophe(http://code.stanziq.com/strophe/) and place it (eg: /Users/makoto/work/sample/strophejs-1.0)
You can’t perform that action at this time.