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
# Use these to see the current list of users and groups, to select unique user and groud ids. | |
dscacheutil -q user | awk 'BEGIN { ORS="" } /name/ { print $2 " " } /uid/ { print $2 "\n" }' | sort -unk 2 | |
dscacheutil -q group | awk 'BEGIN { ORS="" } /name/ { print $2 " " } /gid/ { print $2 "\n" }' | sort -unk 2 | |
# I chose 400 for both uid and gid based on what's in use on my own machine. | |
# DO NOT use 400 without checking it's available first. | |
sudo dscl . -create /Groups/_sync_gateway | |
sudo dscl . -create /Groups/_sync_gateway PrimaryGroupID 400 |
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
function OnUpdate(doc, meta) { | |
if (meta.id !== 'trigger') return; | |
let here = db['here']; | |
let url = "https://places.cit.api.here.com/places/v1/discover/around"; | |
let data = `app_id=${here.id}&app_code=${here.code}&at=${doc.lat},${doc.lon}`; | |
let query = SELECT CURL($url, { |
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
package com.couchbase.mobile; | |
import android.support.v7.app.AppCompatActivity; | |
import android.os.Bundle; | |
import android.util.Log; | |
import com.couchbase.lite.Database; | |
import com.couchbase.lite.DatabaseConfiguration; | |
import com.couchbase.lite.MutableDocument; | |
import com.fasterxml.jackson.core.type.TypeReference; |
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
{ | |
"swagger": "2.0", | |
"info": { | |
"title": "Sync Gateway", | |
"description": "Documentation for the Sync Gateway Admin REST API. This page is generated from the Sync Gateway Admin Swagger spec, the exact same information is also available at [developer.couchbase.com/mobile/swagger/sync-gateway-admin](http://developer.couchbase.com/mobile/swagger/sync-gateway-admin/).\n", | |
"version": "1.3" | |
}, | |
"host": "localhost:4985", | |
"schemes": [ | |
"http", |