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
[stample-web] $ it:testOnly *CategoryService*
Extract /home/sebastien/.embedmongo/linux/mongodb-linux-x86_64-2.4.10.tgz START
Extract /home/sebastien/.embedmongo/linux/mongodb-linux-x86_64-2.4.10.tgz DONE
Oct 16, 2014 10:43:24 AM MongodExecutable start
INFO: de.flapdoodle.embed.mongo.config.MongodConfigBuilder$ImmutableMongodConfig@27514bba
STARTED EMBEDDED MONGODB
[info] service.CategoryServiceTest
[info] CategoryServiceTest
[info]
[info] CategoryService service getSubCategories(user,categoryId) should
sebastien@sebastien-xps:stample-Phonegap (master $)$ cd ../Stampl;e
bash: cd: ../Stampl: No such file or directory
e: command not found
sebastien@sebastien-xps:stample-Phonegap (master $)$ cd ../Stample
sebastien@sebastien-xps:Stample (master $%)$ ./sbt
###################################################################################
### PREPARING SBT OPTIONS
#########################
Dev: won't send errors by mail
Dev: will start JVM in debug mode on port 9876
var MenuSection = AtomReact.createPureClass("MenuSection",{
propTypes: {
appStateCursor: AtomReact.PropTypes.isCursor
},
render: function() {
return (
<section id="menu">
<Menu
currentUserCursor={this.props.appStateCursor.follow("stores","currentUser","user").asyncSuccess()}
interactionStoreCursor={this.props.appStateCursor.follow("stores","interaction")}
module.exports = AtomReact.newStore("currentSpace",{
handleEvent: function(event) {
switch (event.name) {
case AppEvents.Names.APPLICATION_STARTED:
var initialRouting = event.data.initialRouting;
this.selectSpace(initialRouting.selectedSpace);
break;
case AppEvents.Names.ROUTING_STATE_POPPED:
exports.highlightStampleDescription = function highlightBlock(descriptionDiv) {
//$(descriptionDiv).find("pre").first().remove();
console.error("##################################################");
console.debug("DOM node in document?",document.contains(descriptionDiv));
console.debug("DOM node has parent?",descriptionDiv.parentNode);
var codeDivs = $(descriptionDiv).find("pre").get();
console.debug("codeDivs",codeDivs);
_.each(codeDivs,function(codeDiv) {
var WithStopPropagation = React.createClass({
propTypes: {
children: React.PropTypes.node.isRequired,
eventNames: React.PropTypes.arrayOf(React.PropTypes.string).isRequired
},
componentDidMount: function() {
this.props.eventNames.forEach(function(eventName) {
$(this.getDOMNode()).on(eventName,function(e) {
e.stopPropagation();
var WithStopPropagation = React.createClass({
propTypes: {
children: React.PropTypes.node.isRequired,
eventNames: React.PropTypes.arrayOf(React.PropTypes.string).isRequired
},
stopPropagation: function(e){
e.stopPropagation();
},
@slorber
slorber / gist:49c2ea9cad0489b16d17
Created February 20, 2015 17:24
GetSentry request
Remote Address:173.193.138.213:443
Request URL:https://app.getsentry.com/api/38297/store/?sentry_version=4&sentry_client=raven-js/1.1.15&sentry_key=a92f6c9edba84731880255132945c7e2&sentry_data=%7B%22project%22%3A%2238297%22%2C%22logger%22%3A%22javascript%22%2C%22platform%22%3A%22javascript%22%2C%22request%22%3A%7B%22url%22%3A%22http%3A%2F%2Flocalhost%3A9000%2F%22%2C%22headers%22%3A%7B%22User-Agent%22%3A%22Mozilla%2F5.0%20(X11%3B%20Linux%20x86_64)%20AppleWebKit%2F537.36%20(KHTML%2C%20like%20Gecko)%20Chrome%2F37.0.2062.120%20Safari%2F537.36%22%7D%7D%2C%22exception%22%3A%7B%22type%22%3A%22Error%22%2C%22value%22%3A%22Async%20value%20completion%20for%20path%20stores%2CspaceOverview%2CspaceOverview%20but%20swap%3Dfalse%22%7D%2C%22stacktrace%22%3A%7B%22frames%22%3A%5B%7B%22filename%22%3A%22http%3A%2F%2Flocalhost%3A8080%2Fapp.js%22%2C%22lineno%22%3A1077%2C%22colno%22%3A36%2C%22function%22%3A%22%3F%22%2C%22post_context%22%3A%5B%22%20%20%20%20%20%20%20%20%20%20%20%20%7D%20catch%20(error)%20%7B%22%2C%22%20%20%20%20%20%2
<script id="IntercomSettingsScriptTag">
var creationDate = @bootstrapData.user.userData.creationDate;
var creationDateString = creationDate.toString();
var creationDateTruncated = creationDateString.substring(0,10);
window.intercomSettings = {
name: "@bootstrapData.user.userData.fullname",
user_id: "@bootstrapData.user.userData.id",
email: "@bootstrapData.user.userData.email",
created_at: creationDateTruncated,
user_hash: "@bootstrapData.intercomConfig.userHash",
@slorber
slorber / AbstractStampleUnitTest.java
Created July 5, 2012 12:57
ElasticSearch mapping multi_field analyzer
package com.stample.search;
import com.google.common.collect.Collections2;
import com.stample.search.engine.SearchEngineBuilder;
import com.stample.search.enums.EnumIndex;
import com.stample.search.enums.EnumType;
import org.elasticsearch.action.admin.indices.analyze.AnalyzeResponse;
import org.elasticsearch.action.index.IndexResponse;
import org.elasticsearch.client.AdminClient;
import org.elasticsearch.client.Client;