Skip to content

Instantly share code, notes, and snippets.

View devdattaT's full-sized avatar

Devdatta Tengshe devdattaT

View GitHub Profile
given:
- Postgres database gis, user gis, accepting trust connections on localhost
# grab software
sudo apt install osmosis curl wget unzip
# import schema
curl https://raw.githubusercontent.com/openstreetmap/openstreetmap-website/master/db/structure.sql | psql
# get latest osmosis wit non-broken pbf support
wget http://bretth.dev.openstreetmap.org/osmosis-build/osmosis-latest.zip
unzip osmosis-latest.zip
@mobilemind
mobilemind / git-tag-delete-local-and-remote.sh
Last active April 18, 2024 16:07
how to delete a git tag locally and remote
# delete local tag '12345'
git tag -d 12345
# delete remote tag '12345' (eg, GitHub version too)
git push origin :refs/tags/12345
# alternative approach
git push --delete origin tagName
git tag -d tagName
@oevans
oevans / REST_API_calls.py
Last active November 19, 2020 15:34
Examples: making standard calls to the ArcGIS Online/Portal REST API via python
'''
NOTES:
- See the ArcGIS REST API documentation for supported operations, methods, and syntax:
http://resources.arcgis.com/en/help/arcgis-rest-api/
- A TOKEN must be passed as parameter in addition to any required inputs for the operation.
- "urllib.urlencode" handles spaces and other special characters in parameters so that valid URLs are constructed.
- "urllib.urlopen" sends the reqest and handles the response.
- Parameters are appended to URL for GET (see Example 1), but passed to "urlopen" for POST (see Example 2). API docs specifiy supported methods for each operation.
- "json.loads" converts string responses to parseable JSON objects.