# create DB for extraction of OSM info
docker run -d --name osm-geodb -e POSTGRES_USER=geodb mdillon/postgis:9.6
create extension hstore;
alter system set max_wal_size='4GB';
alter system set shared_buffers='2GB';
alter system set wal_buffers='64MB;'
# import OSM data into postgres
docker run --rm --link osm-geodb:geodb -v /home/idmcore/stuff:/stuff my-osm2pgsql osm2pgsql -d geodb -H geodb -U geodb -p osm -k -l -s -c /stuff/netherlands-latest.osm.bz2
This file contains hidden or 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
| { | |
| "source": { | |
| "http": { | |
| "url": "https://images.example.com/your-small-image.jpg" | |
| } | |
| }, | |
| "operations": [ | |
| { | |
| "op": "nn/jpegar", "force": true |
This file contains hidden or 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
| lazy val route = { | |
| encodeResponse(Gzip) { | |
| pathSingleSlash { | |
| get { | |
| redirect("/doc") | |
| } | |
| } ~ | |
| pathPrefix("api") { | |
| jsonpWithParameter("callback") { | |
| path("top-articles") { |
This file contains hidden or 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
| njaskfdjkafs |
This file contains hidden or 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
| (ecb-layout-define "right-my" right | |
| "This function creates the following layout: | |
| ------------------------------------------------------- | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | |
This file contains hidden or 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
| {-# LANGUAGE OverloadedStrings #-} | |
| import System.IO | |
| import System.Environment | |
| import qualified Data.ByteString.Char8 as B | |
| import qualified Data.IntSet as S | |
| import Data.List | |
| import Data.Maybe (fromJust) |