This file contains 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
#MySql | |
sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password password 123' | |
sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password_again password 123' | |
apt-get install -y mysql-server | |
mysql -uroot -p123 -e "CREATE USER 'user'@'%' IDENTIFIED BY 'pass';" | |
mysql -uroot -p123 -e "GRANT ALL ON *.* TO 'user'@'%';" | |
#Allow external connection | |
#Mint/Ubuntu Version | |
#-sed -i "/^bind-address*/s/^/#/g" /etc/mysql/mysql.conf.d/mysqld.cnf |
This file contains 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
#download oracle-instantclient12.2-basic-12.2.0.1.0-1.x86_64.rpm from oracle site | |
#download oracle-instantclient12.2-devel-12.2.0.1.0-1.x86_64.rpm from oracle site | |
apt-get install -y php7.1-dev build-essential php-pear libaio1 alien | |
alien -i oracle-instantclient12.2-basic-12.2.0.1.0-1.x86_64.rpm | |
alien -i oracle-instantclient12.2-devel-12.2.0.1.0-1.x86_64.rpm | |
yes '' | pecl install oci8 | |
echo "extension=oci8.so" > /etc/php/7.1/mods-available/oci8.ini | |
ln -s /etc/php/7.1/mods-available/oci8.ini /etc/php/7.1/apache2/conf.d/oci8.ini |
This file contains 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
/*Busca via WS a data da Páscoa de cada ano e calcula o carnaval, Paixão de Cristo e Corpus Christi entre 2019 e 2029*/ | |
SELECT ANO | |
,PASCOA | |
,PASCOA - 47 AS CARNAVAL | |
,PASCOA - 2 AS PAIXAO_DE_CRISTO | |
,PASCOA + 60 AS CORPUS_CHRISTI | |
FROM (SELECT 2000 + LEVEL AS ANO | |
,CAST(TO_TIMESTAMP_TZ(EXTRACTVALUE(HTTPURITYPE('www.holidaywebservice.com/Holidays/GBSCT/Dates/GBSCTHolidayDates.asmx/GetEaster?year=' || TO_CHAR(2000 + LEVEL)) | |
.GETXML(), | |
'/dateTime', |