Skip to content

Instantly share code, notes, and snippets.

View dersteppenwolf's full-sized avatar
🏠
Working from home

Juan Carlos Méndez dersteppenwolf

🏠
Working from home
View GitHub Profile
@pauldzy
pauldzy / arcgis_pro_deploy_map_service.py
Created August 3, 2019 14:41
Python 3 arcpy script to automate the deployment of ArcGIS Pro defined map services to standalone ArcGIS Servers
import os,sys,arcpy;
import xml.dom.minidom as DOM;
###############################################################################
# Alter the following constants as required
###############################################################################
project_name = "HydrologicUnits";
ags_service = "HydrologicUnits";
ags_folder = "Support";
@veltman
veltman / tiles.md
Last active September 27, 2019 22:12
Making a big image zoomable

Making a big image zoomable

When you have a giant image and you want to make it easy to pan and zoom without downloading the whole 50MB image into someone's browser, a nice workaround is to cut that image into tiles at different zoom levels and view it as it were a map. An example where I've used this technique is The "Snowpiercer" Scenario.

One way to cut your big image into the requisite tiles is with gdal2tiles.py.

Alternatively, this Node script will do the cutting after you install node-canvas and mkdirp:

const fs = require("fs"),
@sgreben
sgreben / apk flags.md
Created April 13, 2018 13:09
apk flags

apk

apk-tools 2.8.2, compiled for x86_64.

usage: apk COMMAND [-h|--help] [-p|--root DIR] [-X|--repository REPO] [-q|--quiet] [-v|--verbose] [-i|--interactive] [-V|--version] [-f|--force]
           [--force-binary-stdout] [--force-broken-world] [--force-non-repository] [--force-old-apk] [--force-overwrite] [--force-refresh] [-U|--update-cache]
           [--progress] [--progress-fd FD] [--no-progress] [--purge] [--allow-untrusted] [--wait TIME] [--keys-dir KEYSDIR] [--repositories-file REPOFILE]
           [--no-network] [--no-cache] [--cache-dir CACHEDIR] [--arch ARCH] [--print-arch] [ARGS]...
@robertpainsi
robertpainsi / commit-message-guidelines.md
Last active July 17, 2024 12:55
Commit message guidelines

Commit Message Guidelines

Short (72 chars or less) summary

More detailed explanatory text. Wrap it to 72 characters. The blank
line separating the summary from the body is critical (unless you omit
the body entirely).

Write your commit message in the imperative: "Fix bug" and not "Fixed
bug" or "Fixes bug." This convention matches up with commit messages
@ramiroaznar
ramiroaznar / README.md
Last active November 26, 2021 22:08
ramiroaznar meta gist

Meta Gist

  • PostgreSQL and PostGIS queries
  • CartoCSS styles
  • CARTO.js blocks
  • DI.js blocks
  • Leaflet.js blocks
  • Other blocks
  • Others
var polygon = ee.Geometry.Polygon([[
[-119.33364769821117, 46.05123532178373],
[-119.3233620672313, 45.869732769408905],
[-119.04111088542663, 45.873079023065166],
[-119.0396574679861, 46.045448840018565]
]]);
var landsat8 = ee.ImageCollection("LANDSAT/LC8_L1T_TOA_FMASK");
//
// Masking Clouds with Fmask
@ramiroaznar
ramiroaznar / index.html
Last active May 6, 2017 17:45
How to add a formula, histogram & category widget to a dashboard using deepinsights.js
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Deep-Insights.js | Highest Mountains</title>
<link rel="shortcut icon" href="http://cartodb.com/assets/favicon.ico" />
<meta name=viewport content="width=device-width initial-scale=1">
<link rel="stylesheet" href="http://libs.cartocdn.com/di.js/v0/themes/css/deep-insights.css" />
<script src=" http://libs.cartocdn.com/di.js/v0/deep-insights.uncompressed.js"></script>
<style type="text/css">
@yefim
yefim / Dockerrun.aws.json
Last active April 7, 2023 16:11
Build a Docker image, push it to AWS EC2 Container Registry, then deploy it to AWS Elastic Beanstalk
{
"AWSEBDockerrunVersion": "1",
"Image": {
"Name": "<AWS_ACCOUNT_ID>.dkr.ecr.us-east-1.amazonaws.com/<NAME>:<TAG>",
"Update": "true"
},
"Ports": [
{
"ContainerPort": "443"
}
@bastman
bastman / docker-cleanup-resources.md
Created March 31, 2016 05:55
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

@rochoa
rochoa / README.md
Last active January 9, 2018 06:31
[CARTO] MVT service + Mapbox GL

CartoDB's MVT service + Mapbox GL

Check index.html for some examples. These use a beta feature of CartoDB's Maps API: fixed URLs. So there is no need to use cartodb.js and tiles can be consumed using a named map name.

cartodb.js example

Check cartodb.js.html to see the integration with cartodb.js and in particular with cartodb.core.js.

Mapbox GL resources