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
| #Type the following command at the shell prompt to find out top 10 largest file/directories: | |
| du -a / | sort -n -r | head -n 10 |
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
| SELECT * | |
| FROM table | |
| WHERE update_date >= '2013-05-03'::date | |
| AND update_date < ('2013-05-03'::date + '1 day'::interval); |
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
| val crs_coord_1 = ??? | |
| val crs_coord_2 = ??? | |
| // you first want to create a Raster | |
| // assuming your rdd is a single tile representing the whole image, i.e. rdd.count == 1 | |
| val first = rdd.take(1) | |
| val projExtent = first(0)._1 | |
| val tile = first(0)._2 | |
| // rgwozdz: My rdd isn't a single tile. On ingest my layer is tiled | |
| // across zooms 0 - 6. Should I be reading a particular zoom level? |
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
| # /usr/local/bin/service-name-restart.sh, owner: root, group: root, mode: 0755 | |
| #!/bin/bash | |
| # /usr/local/bin/service-name-restart.sh | |
| # | |
| if [ -f "<java program working dir>/RUNNING_PID" ]; then kill -9 `cat <java program working dir>/RUNNING_PID`; fi | |
| if [ -f "<java program working dir>/RUNNING_PID" ]; then rm <java program working dir>/RUNNING_PID; fi | |
| cd <java program working dir>/bin | |
| env JAVA_OPTS="-Xms4096m -Xmx4096m" ./geotrellis-api -Dconfig.file=<java program working dir>/conf/application.conf -Dhttp.port=7777 -Dplay.crypto.secret=abcdefghijk > <the-log-path> 2>&1 | |
| ######################################################################################################### |
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
| s3 > test:console | |
| [info] Starting scala interpreter... | |
| [info] | |
| Welcome to Scala 2.11.11 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_131). | |
| Type in expressions for evaluation. Or try :help. | |
| scala> import geotrellis.raster._ | |
| import geotrellis.vector._ | |
| import geotrellis.proj4._ | |
| import geotrellis.spark._ |
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
| INSERT INTO table_target (col1,col2) (SELECT col1, col2 FROM table_source); |
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
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
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
| SELECT n.nspname as "Schema", | |
| p.proname as "Name", | |
| pg_catalog.pg_get_function_result(p.oid) as "Result data type", | |
| pg_catalog.pg_get_function_arguments(p.oid) as "Argument data types", | |
| CASE | |
| WHEN p.proisagg THEN 'agg' | |
| WHEN p.proiswindow THEN 'window' | |
| WHEN p.prorettype = 'pg_catalog.trigger'::pg_catalog.regtype THEN 'trigger' | |
| ELSE 'normal' | |
| END as "Type" |
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
| REVOKE ALL ON SCHEMA public FROM PUBLIC; | |
| GRANT ALL ON SCHEMA public TO postgres; | |
| GRANT USAGE ON SCHEMA public TO <app_user>; | |
| GRANT ALL ON SCHEMA public TO PUBLIC; | |
| REVOKE ALL ON FUNCTION <function-name>(<signature>) FROM PUBLIC; | |
| GRANT ALL ON FUNCTION <function-name>(<signature>) TO <app_user>; | |
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
| - name: Run DB/API integration test suite | |
| hosts: localhost | |
| become: True | |
| become_method: sudo | |
| tasks: | |
| - name: Use PSQL to Close Postgres DB connection to the master database | |
| become: True | |
| become_user: postgres |