start new:
tmux
start new with session name:
tmux new -s myname
| echo "file, output" > output.csv; | |
| TIFS=$(find . -name '*.TIF'); | |
| for f in $TIFS; do | |
| output=$(tiffinfo.exe $f 2>&1 | grep 'Cannot read TIFF header'); | |
| echo "$f, $output" >> output.csv; | |
| done |
| workon web-app | |
| pip install ipykernel | |
| python -m ipykernel install --user --name web-app --display-name "Webapp" | |
| #then start jupyter, and you should see "Webapp" in the drop down for kernels |
Some time in the future I'll have to organize this better
postgresql install from here http://trac.osgeo.org/postgis/wiki/UsersWikiPostGIS22UbuntuPGSQL95Apt
quick set up to allow remote connections...THIS IS FOR TESTING ONLY
use netstat -nlt to check if port 5432 is open
| #/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" |
| #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 ./ |
| # 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 |
| <!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> | |
| :: 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 |
| 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 |