Skip to content

Instantly share code, notes, and snippets.

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

Ravindra R. Jaju jaju

🏠
Working from home
View GitHub Profile
@purcell
purcell / taskqueues.sql
Last active March 19, 2021 08:35
Easy task queues using PostgreSQL
-- 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()
);
@Deraen
Deraen / editor.cljs
Last active March 27, 2021 15:34
ClojureScript goog.editor
(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)
@bohde
bohde / graphite_pip_uwsgi_recipe.sh
Created November 28, 2011 18:08 — forked from bfritz/graphite_pip_uwsgi_recipe.sh
installing graphite-web with pip and running under uwsgi
# 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