Skip to content

Instantly share code, notes, and snippets.

Gregor MacLennan gmaclennan

Block or report user

Report or block gmaclennan

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
@gmaclennan
gmaclennan / DISCUSSION.md
Created Aug 7, 2018
Ideas for a file format for mapeo sync
View DISCUSSION.md

Problem

We want to be able to synchronize the data in mapeo-core to disk so that it can be transported via "sneakernet" to another device. This would most likely be on a USB flash drive, but could also be sent over email or a local bluetooth connection.

Currently safe-fs-blob-store - an implementation of abstract-blob-store - is used for storing media (attachments) in the mapeo-core database. On disk the blobs as stored as files and folders. This is potentially a problem for moving the archive around on disk because a user could easily, accidentally or intentionally, move files and folders and result in data loss and a corrupt database.

Requirements

Ideally we would have a single file containing all attachments and all database data that can be used to sync between machines.

@gmaclennan
gmaclennan / example.js
Last active Apr 26, 2018
Adding layers to react-mapfilter
View example.js
var LayerControl = require('@digidem/mapbox-layer-control')
var layerControl
var myControl = {
onAdd: function (map) {
var style = map.getStyle()
var layers = getLayersFromStyle(style)
layerControl = new LayerControl(layers)
return layerControl.onAdd(map)
View init.coffee
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
@gmaclennan
gmaclennan / INSTALL.md
Last active Feb 16, 2018
Setup of OpenDroneMap Intel NUC for drone image processing
View INSTALL.md

Ubuntu 16.04 Desktop Setup

First things first:

sudo apt update
sudo apt upgrade

Networking Tools

@gmaclennan
gmaclennan / location.geojson
Created Jan 5, 2018
Andalucia p2p hack April 2018
View location.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@gmaclennan
gmaclennan / map-tiles.md
Last active Dec 15, 2017
Ideas for an alternative to mbtiles for map tile storage
View map-tiles.md

MBTiles (MapBox Tiles)

https://github.com/mapbox/mbtiles-spec

MBTiles is a specification for storing tiled map data in SQLite databases for immediate usage and for transfer.

MBTiles is a useful format for storing image and vector tilesets (used in "slippy-maps") on disk, and for transferring between devices for offline use.

MBTiles advantages

@gmaclennan
gmaclennan / guyana-volunteer-wifi.md
Last active Jul 4, 2018
Long-distance solar-powered wifi in the forests and savannahs of Guyana
View guyana-volunteer-wifi.md

Overview

Digital Democracy is looking for a volunteer to help pilot long-distance solar-powered wifi antennaes in indigenous communities in Guyana.

Background

Digital Democracy is working with the Wapichan people in the South Rupununi in Guyana to support them in efforts to secure their ancestral territory and increase their autonomy and self-determination. The Wapichan live in 17 villages and 7 smaller "satellites" in a large semi-natural savannah ecosystem surrounded by tropical forest. Communication between villages and with the outside world is difficult due to limited or no cellphone or internet access. We want to help the Wapichan improve their means of communicating with the rest of the world and communicating and coordinating between villages.

Location

@gmaclennan
gmaclennan / client.js
Last active Jul 3, 2017
Hyperlog http replicate test
View client.js
const request = require('request')
const duplexify = require('duplexify')
const hyperlog = require('hyperlog')
const memdb = require('memdb')
const log = hyperlog(memdb())
const url = 'http://localhost:4001/'
log.add(null, 'hello', function (err, node) {
if (err) throw err
@gmaclennan
gmaclennan / README.md
Last active May 26, 2017
Map Pan & Zoom & Fit
View README.md

This is similar to Map Pan & Zoom IV but with unprojected raw GeoJSON, which is scaled to fit the canvas.

@gmaclennan
gmaclennan / README.md
Created May 24, 2017
Using hyperx instead of JSX
View README.md

Some notes on how to use hyperx as a replacement for JSX. Need to try this out.

You can’t perform that action at this time.