Skip to content

Instantly share code, notes, and snippets.

View willemarcel's full-sized avatar

Wille Marcel willemarcel

View GitHub Profile
@willemarcel
willemarcel / countries.json
Created June 20, 2018 12:38
hot website countries.json
---
layout:
---
{% capture countries_list %}
{% for country in site.where-we-work %}
{{ country.title }}::
{% for project in site.projects %}
{% if project.Country contains country.title %}
@willemarcel
willemarcel / campaign-leaflet-vector-grid.html
Created March 30, 2019 16:05
test map campaigner visualization with Leaftlet.VectorGrid
<!DOCTYPE html>
<html>
<head>
<title>Quick Start - Leaflet</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" type="image/x-icon" href="docs/images/favicon.ico" />
@willemarcel
willemarcel / campaign-mapbox-gl-js.html
Last active April 23, 2019 08:52
test map campaigner vector tiles visualization
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<title>Display a map</title>
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' />
<script src='https://api.tiles.mapbox.com/mapbox-gl-js/v0.53.1/mapbox-gl.js'></script>
<link href='https://api.tiles.mapbox.com/mapbox-gl-js/v0.53.1/mapbox-gl.css' rel='stylesheet' />
<style>
body { margin:0; padding:0; }
@willemarcel
willemarcel / gist:a07917d21b7f3cce92da
Last active September 5, 2019 10:25
Running Django apps with nginx and uwsgi

How to configure nginx and uwsgi to serve a Django application

Install

You need to install nginx, uwsgi and uwsgi-plugin-python (or uwsgi-plugin-python3)

Create nginx files

Create /etc/nginx/sites-available/project and create a link to it in /etc/nginx/sites-enabled/project

@willemarcel
willemarcel / San Jose, Tarlac.geojson
Created February 11, 2021 10:48
San Jose, Tarlac.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@willemarcel
willemarcel / Nzara-Ringasi_Roads.geojson
Created April 14, 2021 11:38
GeoJSON with an empty MultiPolygon
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@willemarcel
willemarcel / sample.json
Created June 13, 2021 16:41
OpenWeatherMap sample
{"cod":"200","message":0.0032,"cnt":36,"list":[{"dt":1487246400,"main":{"temp":286.67,"temp_min":281.556,"temp_max":286.67,"pressure":972.73,"sea_level":1046.46,"grnd_level":972.73,"humidity":75,"temp_kf":5.11},"weather":[{"id":800,"main":"Clear","description":"clear sky","icon":"01d"}],"clouds":{"all":0},"wind":{"speed":1.81,"deg":247.501},"sys":{"pod":"d"},"dt_txt":"2017-02-16 12:00:00"},{"dt":1487257200,"main":{"temp":285.66,"temp_min":281.821,"temp_max":285.66,"pressure":970.91,"sea_level":1044.32,"grnd_level":970.91,"humidity":70,"temp_kf":3.84},"weather":[{"id":800,"main":"Clear","description":"clear sky","icon":"01d"}],"clouds":{"all":0},"wind":{"speed":1.59,"deg":290.501},"sys":{"pod":"d"},"dt_txt":"2017-02-16 15:00:00"},{"dt":1487268000,"main":{"temp":277.05,"temp_min":274.498,"temp_max":277.05,"pressure":970.44,"sea_level":1044.7,"grnd_level":970.44,"humidity":90,"temp_kf":2.56},"weather":[{"id":800,"main":"Clear","description":"clear sky","icon":"01n"}],"clouds":{"all":0},"wind":{"speed":1.41,"deg"
@willemarcel
willemarcel / TM Instructions.md
Last active March 1, 2022 13:02
TM instructions

Português

Instruções para mapear edifícios

Depois de alinhar as imagens aos recursos existentes, comece a mapear primeiro todos os edifícios não mapeados. Para identificar edifícios já mapeados, dê um zoom em sua tarefa e examine cuidadosamente o conteúdo existente. Tente não redesenhar os edifícios já existentes!

Após desenhar o contorno, use o botão 'Q' no editor iD para ortogonalizar os cantos. Se houver algum edifício circular, use o botão 'O' para criar uma estrutura circular.

Muitos edifícios são muito próximos, mas, na verdade, não se tocam. Tente mapeá-los o mais próximo possível, sem permitir que eles se conectem ou compartilhem nós entre si ou com as ruas. No editor iD, pressionar o botão ""Alt"" impedirá que os nós ""se juntem"" e se conectem acidentalmente.

@willemarcel
willemarcel / payload
Last active March 30, 2022 16:11
hazard-schemas payload
{
"country_iso": "PHL",
"is_global": false,
"entries": [
{
"hazard_type": 2,
"always_applicable": true,
"geography_classes": [],
"geography_distance": {},
"geography_comparator": "lt",
FROM ubuntu:latest
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update -qq -y
RUN apt-get install -y curl wget python3 python3-dev python3-pip git libgeos-dev libcurl4-gnutls-dev librtmp-dev python3-gdal libyaml-dev locales nginx supervisor postgresql-client libpq-dev python3-pyproj
RUN apt-get install -y libproj-dev binutils
WORKDIR /project