This file contains 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's say you have a table full of work: | |
CREATE TABLE tasks ( | |
id UUID PRIMARY KEY NOT NULL DEFAULT gen_random_uuid(), | |
status TEXT NOT NULL DEFAULT 'pending', | |
payload JSON NOT NULL, -- or just have meaningful columns! | |
created_at TIMESTAMP NOT NULL DEFAULT NOW() | |
); |
This file contains 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
(ns frontend.view.editor | |
(:require [reagent.core :as reagent] | |
[goog.dom :as dom]) | |
(:import [goog.editor Field ContentEditableField Command] | |
[goog.ui.editor DefaultToolbar ToolbarController ToolbarFactory] | |
[goog.editor.plugins BasicTextFormatter RemoveFormatting ListTabHandler | |
SpacesTabHandler EnterHandler HeaderFormatter TableEditor])) | |
(defn editor-view [] | |
(let [field-name (gensym) |
This file contains 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
# graphite-web install is hardcoded in setup.cfg to /opt/graphite | |
sudo mkdir /opt/graphite | |
sudo chown brad.users /opt/graphite | |
# run under python2.7 virtualenv | |
virtualenv --python=python2.7 ~/ve/graphite | |
source ~/ve/graphite/bin/activate | |
# install the necessary python packages (simplejson is for flot graphs) | |
pip install graphite-web carbon whisper django django-tagging uwsgi simplejson |