This is an adjusted version of EC2 CloudWatch stats for Dashing which is not bound to EC2 metrics but a generic widget for cloudwatch graphs. Visualization is done by Rickshawgraph as in the original example.
Before we can setup PostGIS we need to have a local version of Postgresql installed and running. The most effecient way to do this is to download and install Postgres.app.
Once Postgres.app is installed in your computers /Applications
directory. Open the Terminal and enter the following two commands
psql -d DATABASE_NAME -f /Applications/Postgres.app/Contents/Versions/9.3/share/postgresql/contrib/postgis-2.1/postgis.sql
(defn deaccent [str] | |
"Remove accent from string" | |
;; http://www.matt-reid.co.uk/blog_post.php?id=69 | |
(let [normalized (java.text.Normalizer/normalize str java.text.Normalizer$Form/NFD)] | |
(clojure.string/replace normalized #"\p{InCombiningDiacriticalMarks}+" ""))) |
(require '[schema.core :as s]) | |
(require '[schema.utils :as su]) | |
(defn check-map [schema value] | |
{:pre [(map? value)]} | |
(if-let [value (s/check schema value)] | |
(into {} | |
(for [[k v] value] | |
[k (cond | |
(symbol? v) (keyword v) |
(ns srs-s.routes.core | |
(:require [io.pedestal.http :as pedestal] | |
[io.pedestal.http.route.definition :refer [defroutes]] | |
[io.pedestal.interceptor.helpers :as interceptor] | |
[io.pedestal.http.body-params :as body-params] | |
[ring.util.response :as ring-response] | |
[cognitect.transit :as transit] | |
[om.next.server :as om] | |
[om.tempid :as tempid]) | |
(:import [java.io OutputStream] |
This describes how I setup Atom for an ideal Clojure development workflow. This fixes indentation on newlines, handles parentheses, etc. The keybinding settings for enter (in keymap.cson) are important to get proper newlines with indentation at the right level. There are other helpers in init.coffee and keymap.cson that are useful for cutting, copying, pasting, deleting, and indenting Lisp expressions.
The Atom documentation is excellent. It's highly worth reading the flight manual.
;; Auto-scrolling ============================================================== | |
(defn scroll! [el start end time] | |
(.play (goog.fx.dom.Scroll. el (clj->js start) (clj->js end) time))) | |
(defn scrolled-to-end? [el tolerance] | |
;; at-end?: element.scrollHeight - element.scrollTop === element.clientHeight | |
(> tolerance (- (.-scrollHeight el) (.-scrollTop el) (.-clientHeight el)))) | |
(defn autoscroll-list [{:keys [children class scroll?] :as opts}] |
var Nightmare = require('nightmare'); | |
var vo = require('vo'); | |
vo(run)(function(err, result) { | |
if (err) throw err; | |
}); | |
fu |
{ | |
"Version": "2012-10-17", | |
"Id": "arn:aws:sqs:YOUR-AWS-REGION:YOUR-AWS-ACCOUNT-ID:YOUR-QUEUE-NAME/SQSDefaultPolicy", | |
"Statement": [ | |
{ | |
"Sid": "example-statement-ID", | |
"Effect": "Allow", | |
"Principal": { | |
"AWS": "*" | |
}, |
#!/usr/bin/env bash | |
# Prevent cron tasks from being ran by multiple instances in Elastic Beanstalk. | |
# Automatically adjusts to new "leading instance" when scaling up or down. | |
# Stores the result in an environment variable for other uses as AWS_EB_CRON | |
# | |
# This must be ran by cron as the root user to function correctly. | |
# Anything after this file will be executed as webapp for security. | |
# | |
# Example Cron (should be created by .ebextensions): |