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
| awk -F, 'NR==FNR{ k[$1 $2]=1; next; } NF{ if(!k[$1 $2]) print; }' ./examples/pgyi/data/plot.csv ./examples/pgyi/data/trees.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
| #!/usr/bin/awk -F, -f | |
| # generated by: awk-csvalid https://github.com/tesera/awk-csvalid | |
| # awk-csvalid csv toolset generator: https://github.com/tesera/awk-csvalid | |
| # usage: | |
| # validate: awk -f action=validate validator.awk > violations.txt | |
| # create table: awk -v action=table -f validator.awk | psql afgo_dev | |
| # sanitize csv: awk -v action=sanitize -f validator.awk > sanitized.csv | |
| # insert sql: awk -v action=insert -f validator.awk | psql afgo_dev |
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
| -- get pid for db | |
| SELECT state, client_addr, pid FROM pg_stat_activity where datname = 'afgo_qa'; | |
| -- kill pid for db | |
| SELECT pg_terminate_backend(12193); |
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
| #!/bin/bash | |
| # | |
| # Script to setup a Elastic Beanstalk AMI with geospatial libraries and postGIS | |
| # | |
| # sh aws_ami_prep.sh > aws_ami_prep.log 2>&1 & | |
| # Go to ec2-user home directory | |
| cd /home/ec2-user | |
| # yum libraries |
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 OR REPLACE FUNCTION get_dead_live_violations(IN upload_id text) | |
| RETURNS TABLE( | |
| upload_id text, | |
| source_row_index integer, | |
| violating_table text, | |
| violating_key text, | |
| violation_rule text, | |
| violation_severity text, | |
| violation_comment text) AS $$ |
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
| -- API -- | |
| validate_upload(upload_id) --inserts from get_upload_violations | |
| exec delete_duplicates()upload_id -- iterate through eacj onValidate | |
| insert from get_upload_violations(upload_id) into violations -- query on all rules without insert | |
| delete_upload() |
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
| -- API -- | |
| validate_upload(upload_id) --inserts from get_upload_violations | |
| exec delete_duplicates()upload_id -- iterate through eacj onValidate | |
| insert from get_upload_violations(upload_id) into violations -- query on all rules without insert | |
| delete_upload() |
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/bin/env bash | |
| cat ~/Desktop/AcrobatzMassif21fevrier2015-copy.txt \ | |
| | awk '/Name=/ { print $0 }' \ | |
| | sed s/Massif/MAS/ \ | |
| | sed s/Stoneham/STO/ \ | |
| | sed s/Relais/REL/ \ | |
| | awk -v group=u8 '{ split($3, y, "/"); split(y[2],x,"-"); if(x[1]>=2007) print $0; }' \ | |
| # | awk -v group=u10 '{ split($3, y, "/"); split(y[2],x,"-"); if(x[1]<2007) print $0; }' \ | |
| | cat ~/Desktop/acro-prefix.txt - > ~/Desktop/acro-u8.txt |
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/bin/awk -F"\n" -f | |
| # usage | |
| # the html templates need to be a one liner i.e. no line breaks | |
| # $ ./scripts/ng-template-cache.awk -v module=<module> <templates.html > <templates.js> | |
| # $ ./scripts/ng-template-cache.awk -v module=mvApp app/partials/*.html > app/js/templates.js | |
| BEGIN { print "angular.module('"module"').run(['$templateCache', function($templateCache) {" } | |
| { |
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
| export PKG_CONFIG_PATH=/usr/lib64/pkgconfig:/usr/lib/pkgconfig | |
| export PATH=/usr/bin:$PATH | |
| export LDFLAGS=-L/usr/lib64:/usr/lib | |
| export LD_LIBRARY_PATH=/usr/lib64:/usr/lib | |
| export CPPFLAGS=-I/usr/include | |
| sudo yum-config-manager --enable epel | |
| #sudo yum update -y | |
| sudo yum install -y gcc gcc-c++ glib2-devel.x86_64 libxml2-devel.x86_64 libpng-devel.x86_64 \ | |
| libjpeg-turbo-devel.x86_64 gobject-introspection.x86_64 gobject-introspection-devel.x86_64 |