Skip to content

Instantly share code, notes, and snippets.

View archaeogeek's full-sized avatar
👋

Jo Cook archaeogeek

👋
View GitHub Profile
@archaeogeek
archaeogeek / gist:e226d4e071a2d4f6abc8fc9dc718eca7
Last active November 11, 2019 15:23
Get all windows local groups
net localgroup > C:\tmp\localgroups.txt
add multiple groups from a list (admin command prompt):
FOR /f %G IN (D:\Astun\gislocalgroups.txt) DO NET LOCALGROUP %G /COMMENT:"iShareGIS local group %G" /ADD
add user to all groups:
FOR /f %G IN (D:\Astun\gislocalgroups.txt) DO NET LOCALGROUP %G username /ADD
@archaeogeek
archaeogeek / gist:51c95827430de2ed8f1c76ef22621ec0
Last active December 15, 2017 11:53
loader os highways tinkering
# Extract gml files
find -type f -iname '*.gz' -exec gunzip --force --keep '{}' \;
# Update gml so ogr can read it
find -type f -iname '*.gml' -exec sed -i -e 's/os:Transaction/os:FeatureCollection/' -e 's/os:insert/os:featureMember/' '{}' \;
# Have ogr create default .gfs files for each gml
find -type f -iname '*.gml' -exec ogrinfo -ro -so '{}' \;
I think you'll need to update your ogr_cmd, replace $file_path with /vsigzip/$file_path
@archaeogeek
archaeogeek / gist:8de3554069248a0181e416de10c26e70
Created October 31, 2017 10:16
Geonetwork 3.2.x procedure
## basic setup
git clone https://github.com/geonetwork/core-geonetwork.git core-geonetwork32
cd core-geonetwork32
git checkout 3.2.x
git submodule init
git submodule update
## cherry-pick fixes for ol3
git cherry-pick 8d9db018535caf3331ac26dd0fb2af6bb9e2e3a8
@archaeogeek
archaeogeek / gist:a502c3450748d008b26ed74a5db1bd5c
Last active August 23, 2017 10:14
astun background mapping gn32
## basic setup
git clone https://github.com/geonetwork/core-geonetwork.git core-geonetwork32
cd core-geonetwork32
git checkout 3.2.x
git submodule init
git submodule update
## cherry-pick fixes for ol3
git cherry-pick 8d9db018535caf3331ac26dd0fb2af6bb9e2e3a8
@archaeogeek
archaeogeek / docx2md.md
Created August 4, 2016 12:44 — forked from aembleton/docx2md.md
Convert a Word Document into MD

Converting a Word Document to Markdown in One Move

The Problem

A lot of important government documents are created and saved in Microsoft Word (*.docx). But Microsoft Word is a proprietary format, and it's not really useful for presenting documents on the web. So, I wanted to find a way to convert a .docx file into markdown.

Installing Pandoc

On a mac you can use homebrew by running the command brew install pandoc.

The Solution

@archaeogeek
archaeogeek / gist:09fd483184f9889303f2
Created April 14, 2015 11:02
Notes on open roads and open rivers data
Open rivers needs startnode and endnode converting to integer (currently double, but that's not needed)
Open roads- all identifiers for start node and end node are suffixed with an L, why? Can't convert to integer as will lose the leading 0's
@archaeogeek
archaeogeek / gist:0c055761343996acd432
Last active August 29, 2015 14:05
Pre-push code for automatically generating GitBook static html, pushing the markdown to a master branch and the generated html to a gh-pages branch on github. Save as a pre-push hook (git 1.8 or above) for the master branch. Set the _book folder and contents to be ignored in the master branch to avoid duplication.
#!/bin/sh
gitbook build /path/to/markdown --output=/path/to/markdown/_book
cd /path/to/markdown/_book
git init
git commit --allow-empty -m 'update book'
git checkout -b gh-pages
touch .nojekyll
git add .
git commit -am "update book"