Skip to content

Instantly share code, notes, and snippets.

{
"_id": "0000731f15084c31aa07e78a82c47d06",
"_rev": "1-89460fde4f57fb3728ec0124f0f08c2c",
"type": "Running",
"distance": 4525,
"path": {
"type": "LineString",
"coordinates": [
[
9.297674,
{
"_id": "000009498a084437b03780d4ce174e99",
"_rev": "4-7df280812957d65d137c0cd531d9ff93",
"properties": {
"type": "Running",
"distance": 7656.99999999999
},
"type": "Feature",
"geometry": {
"type": "LineString",
<!DOCTYPE html(lang='en')>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags-->
<meta name="description" content="How quick it is to write an offline webapp">
<meta name="author" content="Mike Elsmore <mike.elsmore@uk.ibm.com>">
<!-- Bootstrap core CSS-->
String.prototype.urlslug = function( ) {
return this.toLowerCase().replace(/[^A-Za-z0-9\_\/]+/g, "-");
};
@ukmadlz
ukmadlz / gremlin.php
Created July 9, 2015 15:51
A post to /gremlin with Bluemix credentials
<?php
/*
Sent a gremlin query
*/
// Grab the config
$config = json_decode(file_get_contents('config.json'));
// Gremlin URL
<!DOCTYPE html>
<html>
<head>
<link href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css" rel="stylesheet">
<script src="https://code.jquery.com/jquery.min.js"></script>
<script src="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>
<script src="https://cdn.jsdelivr.net/pouchdb/3.3.1/pouchdb.min.js"></script>
<meta charset="utf-8">
<title>Cloudant Demo</title>
</head>
@ukmadlz
ukmadlz / gist:6c2febccbfdbaccf28aa
Last active August 29, 2015 14:13
Quick new mac
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew update
brew doctor
export PATH="/usr/local/bin:$PATH"
brew install curl
brew install couchdb
brew install node
npm install -g grunt-cli
@ukmadlz
ukmadlz / PouchDB against CouchDB 2.0
Created January 12, 2015 13:19
A failing PouchDB test
1) test.replication.js-local-http Test pull replication with many changes:
Error: timeout of 50000ms exceeded
at null.<anonymous> (/Users/Mike/Sites/pouchdb/node_modules/mocha/lib/runnable.js:158:19)
at Timer.listOnTimeout [as ontimeout] (timers.js:112:15)
{"430037":"gardening kit","430040":"home & lifestyle","460000":"home & lifestyle","282064":"home & lifestyle","510803":"bulbs and plants","350149":"home & lifestyle","600157":"courses with Sarah","030132":"seeds > seeds to sow now > February","190378":"bulbs and plants > spring and summer planting > container plants","190331":"bulbs and plants","270070":"gardening kit","990077":"bulbs and plants > spring and summer planting","510803-24":"bulbs and plants > spring and summer planting","420133":"gardening kit","450105":"home & lifestyle","420150":"home & lifestyle","202063":"home & lifestyle","470019-10":"home & lifestyle","340188":"home & lifestyle","340185":"home & lifestyle","470015":"home & lifestyle","340186":"home & lifestyle","470018":"home & lifestyle","470014":"home & lifestyle","270065":"home & lifestyle","470017":"home & lifestyle","340183":"home & lifestyle","270069":"gardening kit","270067":"gardening kit","270066":"gardening kit","340181":"home & lifestyle","450107-GRN":"home & lifestyle","450106"