Skip to content

Instantly share code, notes, and snippets.

@st-h
st-h / components.content-editable.js
Last active January 15, 2018 14:07
contenteditable
import Ember from 'ember';
export default Ember.Component.extend({
attributeBindings: ['contenteditable'],
contenteditable: true,
didInsertElement() {
this._super(...arguments);
var observer = new MutationObserver((mutationsList) => {
@st-h
st-h / Database Session Plugin: mongo persister
Created February 23, 2014 21:51
Persister implementation for Database Session Plugin http://grails.org/plugin/database-session , which uses MongoDB as a datastore.
package org.songreel.session
import java.util.List;
import org.codehaus.groovy.grails.web.servlet.GrailsApplicationAttributes;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.util.Assert;
import com.mongodb.BasicDBObject
import com.mongodb.DB;