Skip to content

Instantly share code, notes, and snippets.


Afonso Rodrigues afonsoaugusto

View GitHub Profile
afonsoaugusto / gist:6eb19da1e203ffe176b1
Created Mar 20, 2015
Log error deploy openshift with my git
View gist:6eb19da1e203ffe176b1
Started by user Jenkins Admin
Building remotely on appbldr (app-build) in workspace /var/lib/openshift/550ca7224382ec451900014a/app-root/runtime/repo
Checkout:repo / /var/lib/openshift/550ca7224382ec451900014a/app-root/runtime/repo - hudson.remoting.Channel@1e8b1a6:appbldr
Using strategy: Default
Last Built Revision: Revision 9d56910d598ea2718e46a619deab4dcb8ea3855f (origin/master)
Checkout:repo / /var/lib/openshift/550ca7224382ec451900014a/app-root/runtime/repo - hudson.remoting.LocalChannel@1dd6242
Wiping out workspace first.
Cloning the remote Git repository
Cloning repository origin
Fetching upstream changes from
View gist:1a80b55364bbd33503e0
JBoss Bootstrap Environment
JBOSS_HOME: /var/lib/openshift/550b287c4382ecebeb000090/jbossas
JAVA: /etc/alternatives/java_sdk_1.6.0/bin/java
JAVA_OPTS: -server -XX:+TieredCompilation -Xms40m -Xmx256m -XX:MaxPermSize=102m -XX:+AggressiveOpts -XX:MinHeapFreeRatio=20 -XX:MaxHeapFreeRatio=40 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -Dorg.apache.tomcat.util.LOW_MEMORY=true -DOPENSHIFT_APP_UUID=550b287c4382ecebeb000090 -Dorg.jboss.resolver.warning=true -Dfile.encoding=UTF-8 -Djgroups.bind_addr= -Dorg.apache.coyote.http11.Http11Protocol.COMPRESSION=on
2015/03/23 23:23:34,560 INFO [org.jboss.modules] (main) JBoss Modules version 1.1.1.GA
2015/03/23 23:23:35,829 INFO [org.jboss.msc] (main) JBoss MSC version 1.0.2.GA
2015/03/23 23:23:35,976 INFO [] (MSC
sudo apt-get install git
git clone
cd poc-node
sudo apt-get install make gcc
# ./
#sh ./VBoxLinuxAdditions*.run
#Crie a pasta a ser montada:
#sudo mkdir /mnt/nome_pasta
#sudo mount -t vboxsf nome_pasta_compartilhada /mnt/nome_pasta
sudo add-apt-repository ppa:ubuntugis/ppa
sudo apt-get update
sudo apt-get install gdal-bin
#No arquivo zip, ele irá conter este conjunto de arquivos:
#Para realizar o import é necessário que todos estejam na pasta informada
ogr2ogr -f <Plataforma> MySQL:<DatabaseName>,host=localhost,user=root,password=root <caminho com os arquivos>/<arquivo shape>.shp -nln <tabela de será importada> -update -overwrite -lco engine=MYISAM
ogr2ogr -f MySQL MySQL:geo_loc,host=localhost,user=root,password=root /home/mvp/Downloads/tl_2013_us_zcta510.shp -nln points_new -update -overwrite -lco engine=MYISAM
View desc_spatial.sql
mysql> show tables;
| Tables_in_geo_loc |
| geometry_columns |
| points_new |
| spatial_ref_sys |
3 rows in set (0,05 sec)
View cerate_column_point_mysql.sql
SET @intptlon10 = ST_GeomFromText('POINT(-19.758839 -43.939613)');
SET @intptlat10 = ST_GeomFromText('POINT(-19.758839 -43.939613)');
insert into points values (@intptlon10);
insert into points values (@intptlat10);
mysql> SELECT ST_AsText(pt) FROM points;
| ST_AsText(pt) |
View example_ST_Distance_Sphere.sql
mysql> SET @Casa = ST_GeomFromText('POINT(-19.758839 -43.939613)');
Query OK, 0 rows affected (0,00 sec)
mysql> SET @Praca = ST_GeomFromText('POINT(-19.7582095 -43.938092)');
Query OK, 0 rows affected (0,00 sec)
mysql> SELECT round(ST_Distance_Sphere(@Casa, @Praca),2);
| round(ST_Distance_Sphere(@Casa, @Praca),2) |
afonsoaugusto /
Last active Jan 23, 2018
Setup enviroment ubuntu (nodejs, mysql 5.7, php7)
#update do sistema
sudo apt-get update -y
sudo apt-get install -y build-essential
sudo apt-get install -y dialog
export DEBIAN_FRONTEND=noninteractive
#install node
curl -sL | sudo -E bash -
sudo apt-get install -y nodejs
#install react
View Pred.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.