Skip to content

Instantly share code, notes, and snippets.

James Croft crofty

Block or report user

Report or block crofty

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@crofty
crofty / core.clj
Created Oct 2, 2018
Document serialization
View core.clj
(ns doc-serialization.core)
(def block-tags
{"h2" :h2
"h3" :h3
"h4" :h4
"p" :p})
(defn serialize-leaf [leaf]
[:span (:text leaf)])
We couldn’t find that file to show.
@crofty
crofty / elevation.xml
Last active Feb 24, 2018
GDAL WMS for the Elevation dataset on AWS
View elevation.xml
<GDAL_WMS>
<Service name="TMS">
<ServerUrl>https://s3.amazonaws.com/elevation-tiles-prod/geotiff/${z}/${x}/${y}.tif</ServerUrl>
</Service>
<DataWindow>
<UpperLeftX>-20037508.34</UpperLeftX>
<UpperLeftY>20037508.34</UpperLeftY>
<LowerRightX>20037508.34</LowerRightX>
<LowerRightY>-20037508.34</LowerRightY>
<TileLevel>14</TileLevel>
View om-tutorial.core.cljs
(ns om-tutorial.core
(:require-macros [cljs.core.async.macros :refer [go]])
(:require [goog.dom :as gdom]
[cljs.core.async :as async :refer [<! >! put! chan]]
[clojure.string :as string]
[om.next :as om :refer-macros [defui]]
[om.dom :as dom])
(:import [goog Uri]
[goog.net Jsonp]))
View application.controller.js
import Ember from 'ember';
export default Ember.Controller.extend({
appName:'Ember Twidsdle'
});
@crofty
crofty / elasticsearch.conf
Created Feb 6, 2014
Upstart for elasticsearch
View elasticsearch.conf
# ElasticSearch Service
description "ElasticSearch"
start on (net-device-up
and local-filesystems
and runlevel [2345])
stop on runlevel [016]
@crofty
crofty / README.md
Last active Dec 28, 2015
Tracking Vehicles
View README.md

This shows the movement of 330 vehicles travelling round the UK & Ireland over a 24hr period.

More

@crofty
crofty / index.html
Last active Dec 19, 2015
Embedded Lookbook
View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<title>Embedded</title>
</head>
<body>
<div class='container'>
<h2>Embedded lookbook - default</h2>
<script src='http://lookbook.rapha.cc/aw13-cx/en/embed' type='text/javascript'></script>
View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<title>Embedded</title>
</head>
<body>
<div class='container'>
<h1>Embedded lookbook - development</h1>
View Procfile
server: python -m SimpleHTTPServer
coffee: coffee -bwc *.coffee
You can’t perform that action at this time.