Skip to content

Instantly share code, notes, and snippets.

-- Create a line using 2 points
-- Place 100 evenly spaced points along line
-- intersect each point with a single band raster called elevation
-- return results as X, Y, Z, index_of_point, distance_from_start_point (in metres)
with
makeline(geom) as (
select ST_SetSRID(
ST_MakeLine(ST_MakePoint(115.750,-32.051),
ST_MakePoint(116.170,-31.958)), 4326) as geom
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC8OxVAg39kVvstuQ7Qntz/iFpNXWB5wzkvoklu3HQ0NkDeWc6zFPvyo+fb2TBnI+TM2Qjm716ZH+76Q5tf3vB1IYMBvZpz8xJ6OXJIYGCA6lgS3z4BuA121ajucGPAH+AKMzkmQ2roxrjBbCN9J5rYM7QJte/CQsJRj/guwSuA23Cdx/4jaj5T3eBGYApQXRBWVAtMRn8zBuvgm/HiCmhE8AqCb3wGGq7UDBgThzGhphJW+0tR3pAnhSTzdlo09i71s9Bq1m0tvXnv9lSLx7lzyx2OFZGLHMUbwJZCznCeS5Dgm9qp4PU/liFufEnAFwaqCiqVcc8HsG9hK40kIg0P bruce@ip-10-133-192-132
@bruceh48
bruceh48 / gist:61761534fe640ccd1e11ab66ec47a2f1
Created March 16, 2019 14:06
Setup PostreSQL ( psql )client only on MacOSX
brew install libpq
brew install --force libpq
Follow all instructions.
Reopen console and test with
psql
@bruceh48
bruceh48 / gist:b9e2b84f20b4dbde493b5849859a9528
Created March 16, 2019 13:00
Get Brew to work in a multi user OSX setup
echo $(brew --prefix)
echo $(groups $(whoami))
sudo dseditgroup -o edit -a $(whoami) -t user admin
sudo chgrp -R admin $(brew --prefix)
sudo chmod -R g+rwX $(brew --prefix)
ls -lah $(brew --prefix)
select table_name from information_schema.columns where column_name = 'YOUR_COLUMN_NAME'
1. Create images
2. Select text toolbar
3. Add text to image
4. High light text and then right click and choose
"Path from Text"
5. Go Layers -> New Layers
6. Go Select -> from Path
7. Go Select -> Grow
8. Select "bucket" and choose a stroke color and fill in stroke
9. Select-> none
1. Download the nvm install script via cURL:
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.0/install.sh | bash
2. Ensure that nvm was installed correctly with nvm --version, which should return the version of nvm installed.
3. Install the version of Node.js you want
Install the latest version with
nvm install node
Use the latest version with
nvm use node
Install the latest LTS version with
# -- Remove existing versions of Postgresql --
sudo apt-get --purge remove postgresql\*
apt-get update && apt-get -y install wget ca-certificates
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
# -- Install Postgress repository
echo "deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list
apt-get update && apt-get -y install postgresql-9.6
@bruceh48
bruceh48 / gist:8cb43906074e9874fc2dcb9660126861
Created September 28, 2017 13:20
Install MongoDB on Ubuntu16.04
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927
echo "deb http://repo.mongodb.org/apt/ubuntu "$(lsb_release -sc)"/mongodb-org/3.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.2.list
sudo apt-get update && sudo apt-get -y upgrade
sudo apt-get install -y mongodb-org
cd /lib/systemd/system/
nano mongod.service
@bruceh48
bruceh48 / gist:b4bffac3bc6df98786856c064d583ba4
Created July 13, 2017 06:55
SLD for Polygon & centroid Label
<?xml version="1.0" encoding="ISO-8859-1"?>
<StyledLayerDescriptor version="1.0.0"
xsi:schemaLocation="http://www.opengis.net/sld StyledLayerDescriptor.xsd"
xmlns="http://www.opengis.net/sld"
xmlns:ogc="http://www.opengis.net/ogc"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<NamedLayer>
<Name>Landsat 8 scenes</Name>
<UserStyle>