Skip to content

Instantly share code, notes, and snippets.

View slorber's full-sized avatar
🏠
Working from home

Sébastien Lorber slorber

🏠
Working from home
View GitHub Profile
var app = {
initialize: function() {
this.bindEvents();
},
bindEvents: function() {
document.addEventListener('deviceready', this.onDeviceReady, false);
},
onDeviceReady: function() {
app.receivedEvent('deviceready');
org.apache.commons.mail.EmailException: Sending the email to the following server failed : in.mailjet.com:587
at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1242) ~[org.apache.commons.commons-email-1.2.jar:1.2]
at org.apache.commons.mail.Email.send(Email.java:1267) ~[org.apache.commons.commons-email-1.2.jar:1.2]
at com.typesafe.plugin.CommonsMailer.send(MailerPlugin.scala:242) ~[com.typesafe.play-plugins-mailer_2.10-2.2.0.jar:2.2.0]
at com.typesafe.plugin.MailerBuilder$class.sendHtml(MailerPlugin.scala:204) ~[com.typesafe.play-plugins-mailer_2.10-2.2.0.jar:2.2.0]
at com.typesafe.plugin.CommonsMailer.sendHtml(MailerPlugin.scala:215) ~[com.typesafe.play-plugins-mailer_2.10-2.2.0.jar:2.2.0]
at services.impl.DefaultEmailServiceComponent$DefaultEmailService$$anonfun$send$1.apply$mcV$sp(DefaultEmailServiceComponent.scala:132) ~[stample-web.stample-web-1.0.jar:1.0]
at akka.actor.Scheduler$$anon$11.run(Scheduler.scala:118) ~[com.typesafe.akka.akka-actor_2.10-2.2.0.jar:2.2.0]
at akka.dispatch.Task
exports.FR = {
"selectTargetType.title": "Ou souhaites-tu déplacer cette bibliothèque?",
"selectTargetType.description": "Tu es admin d'au moins une équipe. Tu as la possibilité de déplacer cette bibliothèque dans une de tes équipes, ou tu peux simplement déplacer cette bibliothèque dans une autre bibliothèque",
"selectTargetType.moveToFolderLike": "Dans une bibliothèque",
"selectTargetType.moveToTeam": "Dans une équipe",
"use strict";
exports.name = "onboardingSignupResult";
exports.FR = {
"title": "Résumé de ton inscription sur Stample",
"use strict";
exports.name = "onboardingHotspots";
exports.FR = {
"menu-search": "Recherche universelle: trouve des bibliothèques, dossiers, personnes et stamples",
"menu-contacts": "Parcours tes contacts et regarde leur profile",
'use strict';
import React, { PropTypes } from 'react';
import $ from 'jquery';
import _ from 'lodash';
import shallowCompare from 'react-addons-shallow-compare';
@slorber
slorber / findOldestKnownFatherSideAncestor.js
Last active August 14, 2016 10:54
Future/promise vs JS generators
function* findOldestKnownFatherSideAncestor(person) {
let currentPerson = person;
while (currentPerson.fatherId) {
currentPerson = yield call(PersonAPI.getById,currentPerson.fatherId);
}
return currentPerson
}
@slorber
slorber / appIdentity.md
Last active August 14, 2016 16:22
A useful trick to share more easily React components across different applications

Intro

This pattern is for those of you that maintain multiple applications and need to build components that can be reused across all these apps. It won’t be useful if you build components meant to be reused in the same application.

Your typical app structure

If you use smart/dumb, or container/presentational components, which you should if you want your components to be at least a little reusable, your typical application might look like this:

@slorber
slorber / do notation.js
Last active November 17, 2016 17:10
Use do { } makes React render() method more readable
// FP languages permit to evaluate if/else expressions as values.
// In many cases it permits to avoid using mutable variables (var/let), multiple returns, or nested ternary operators
// This is the do { } notation (stage 0), that permits to write the following right now with Babel.
const Users = ({users}) => (
<div>
{users.map(user =>
<UserCard key={user.id} user={user}/>