Skip to content

Instantly share code, notes, and snippets.

View emxsys's full-sized avatar

Bruce Schubert emxsys

View GitHub Profile
@emxsys
emxsys / wget_google_drive_download.md
Last active April 23, 2024 18:47
Download Google Drive files with WGET

How to download files from Google Drive with WGET

Step 1. Get the ID of the file to download

  1. Get a shareable link from Google Drive by right-clicking the file and selecting Get Shareable Link.

  2. Examine the link to get the file's ID. Example:

    https://docs.google.com/open?id=[ID]

Step 2. Download the file with WGET

  1. Build the download URL using the ID obtained in Step 1. Example:
@emxsys
emxsys / raspberry_pi_script_as_service.md
Last active April 6, 2024 13:46
How to run a python script as a service in Raspberry Pi - Raspbian Jessie

How to Run a Script as a Service in Raspberry Pi - Raspbian Jessie

By: Diego Acuña

Original Article: http://www.diegoacuna.me/how-to-run-a-script-as-a-service-in-raspberry-pi-raspbian-jessie/

A pretty common task when using this device, is to run some script (for example a python script) as a service in the operating system so it can start on boot, stop and restart using systemctl and more. In this post I'm going to explain how to set a little script as a service using Raspbian Jessie in a Raspberry Pi.

Example Python Script

@emxsys
emxsys / northern-horizon-mapserver-01.md
Last active August 22, 2023 10:59
Northern Horizon MapServer Configuration

Northern Horizon Map Server

  • Host: DigitalOcean
  • Team: Emxsys
  • Project: Northern Horizon Servers
  • Server: mapserver.northernhorizon.org
  • IP Address: 157.245.134.29

The Northern Horizon map server is virtual machine hosted on DigitalOcean that provides web map services (WMS) and web map tile services (WMTS) to Northern Academy projects and the WorldWind Explorer. The map server is

@emxsys
emxsys / feature_server.md
Last active August 22, 2023 10:56
How to setup a NASA feature server for place names

How to setup a NASA WorldWind feature server (WFS)

Ubuntu 18.04.4 LTS Initial Setup

Change root password

Changing password for root.
(current) UNIX password: 
Enter new UNIX password: 
Retype new UNIX password: 
@emxsys
emxsys / elevation_server.md
Last active August 17, 2023 06:40
How to setup a NASA WorldWind elevation server

How to setup a NASA WorldWind elevation server

Introduction

This guide shows how to create a WMS server on a local VM using Apache, MapServer and elevation data sets curated by NASA. This WMS server serves as a model for a production MapServer instance to be deployed on an a network.

The guide contains a brief overview of how the WorldWind clients make requests, followed by instructions for setting up the Apache web server, MapServer and the Apache caching.

@emxsys
emxsys / webworldwind-example.html
Last active November 1, 2022 22:40
A complete 3D virtual globe example - HTML, JavaScript and CSS - using ESA-NASA Web WorldWind, Bootstrap and KnockoutJS featuring a 3D globe view, 2D map projections, markers and place name finder. Simply download and open this HTML file in your browser to run the app, or see http://worldwind.earth/sample-app.html for a preview and write-up.
<!DOCTYPE html>
<html lang="en">
<!--
A sample framework for the ESA-NASA WebWorldWind web applications.
Author: Bruce Schubert
License: MIT
See: https://worldwind.arc.nasa.gov/web/
-->
<head>
<meta charset="utf-8">
@emxsys
emxsys / download_SRTMv4.md
Last active October 5, 2022 12:05
How to bulk download SRTMv4 DEMs from CGIAR-CSI

How to bulk download SRTMv4 from CGAIR-CSI with WGET

The SRTM digital elevation data provided on CGIAR-CSI has been processed to fill data voids and to facilitate its ease of use by a wide group of potential users. This data is provided in an effort to promote the use of geospatial science and applications for sustainable development and resource conservation in the developing world. Digital elevation models (DEM) for the entire globe, covering all of the countries of the world, are available for download at CGIAR-CSI.

Step 1. Get a bulk download link from CGIAR-CSI

@emxsys
emxsys / cleancache.sh
Last active February 27, 2022 14:00
Clean an Apache disk cache using a regex with htcacheclean
#!/usr/bin/env bash
# A best practices Bash script template with many useful functions. This file
# combines the source.sh & script.sh files into a single script. If you want
# your script to be entirely self-contained then this should be what you want!
# A better class of script...
set -o errexit # Exit on most errors (see the manual)
set -o errtrace # Make sure any error trap is inherited
set -o nounset # Disallow expansion of unset variables
@emxsys
emxsys / imagery_server.md
Last active April 5, 2019 23:34
How to setup a NASA imagery server

How to setup a NASA WorldWind imagery server

Introduction

This guide shows how to create a WMS server using Apache, MapServer and imagery data sets curated by NASA. This WMS server serves as a model for a production MapServer instance to be deployed on an a network.

The guide contains a brief overview of how the WorldWind clients make requests, followed by instructions for setting up the Apache web server, MapServer and the Apache caching.

Overview

WorldWind clients consume imagery data in PNG, JPEG and DDS formats obtained from a MapServer instance via OGC WMS requests. The NASA WorldWind imagery server provides Blue Marble and Landsat7 imagery to WorldWind clients as the core imagery services