This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for file in *.JPG ; do mv $file `echo $file | sed 's/\(.*\.\)JPG/\1jpg/'` ; done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cp -r -v -p <file> <dir> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Import a directory of shapefiles into postgis as a geometry | |
#replace EPSG SRID, database, and username, and others if necessary | |
for f in *.shp; | |
do | |
shp2pgsql -s <EPSG SRID> -g geom $f main.${f%.*} | psql -h localhost -p 5432 -d <database> -U <username>; | |
done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#as seen on http://blog.cleverelephant.ca/2015/02/geotiff-compression-for-dummies.html | |
gdal_translate \ | |
-co COMPRESS=JPEG \ | |
-co PHOTOMETRIC=YCBCR \ | |
-co TILED=YES \ | |
5255C.tif 5255C_JPEG_YCBCR.tif | |
#create overviews | |
gdaladdo \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo pip install geocode | |
sudo apt-get install jq | |
sudo apt-get update | |
#from command line | |
#geocoder does not have to be google | |
#to save as json | |
geocode -p "google" addresses.txt | jq -r -c '@json' >> results3.json | |
#to save as csv |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:: repeat for all folders needed | |
:: replace anything between < > , as well as drive letter. | |
net use U: \\xx.xxx.xxx.xxx\folder <password> /user:<domain>\<username> /persistent:yes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<html> | |
<head> | |
<script src='https://api.mapbox.com/mapbox.js/v2.2.1/mapbox.js'></script> | |
<link href='https://api.mapbox.com/mapbox.js/v2.2.1/mapbox.css' rel='stylesheet' /> | |
</head> | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# environment variables for postmaster process | |
# This file has the same syntax as postgresql.conf: | |
# VARIABLE = simple_value | |
# VARIABLE2 = 'any value!' | |
# I. e. you need to enclose any value which does not only consist of letters, | |
# numbers, and '-', '_', '.' in single quotes. Shell commands are not | |
# evaluated. | |
#==================================================== | |
#Enable out of db rasters and gdal drivers |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#for scp or rsync src and dest patterns are the same | |
scp /source/path/to/files [email protected]:/destination/pathh/to/files | |
#on Windows scp will work with Cygwin | |
##From local Windows machine to remote server. CD your way to the directory holding your file(s) | |
scp files.zip [email protected]:/home/projects | |
##From remote server to your local Windows machine. CD your way to the directory where you want to save your file | |
scp [email protected]:/home/projects/your_file.csv ./ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/create = create new task | |
#/tn = task name | |
#/sc = frequency | |
#/tr = command to start task | |
#more info https://technet.microsoft.com/en-us/library/cc772785%28WS.10%29.aspx#BKMK_create | |
schtasks /create /tn "createKML" /sc MONTHLY /tr "python c:\path\to\file.py" |