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
; Matriz x Revenda | |
loja.matriz.status = 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
## Configuration for WACOM Intuos S | |
## example from https://github.com/linuxwacom/xf86-input-wacom/wiki/Tablet-Configuration-2%3A-Example-scripts | |
xsetwacom set "Wacom Intuos S Pen stylus" MapToOutput HDMI-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
#!/bin/sh | |
curl -s https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add - | |
sudo bash -c "curl -s https://packages.microsoft.com/config/ubuntu/18.04/prod.list > /etc/apt/sources.list.d/mssql-release.list" | |
sudo apt-get update | |
sudo ACCEPT_EULA=Y apt-get -y install msodbcsql17 mssql-tools | |
sudo apt-get -y install unixodbc-dev | |
sudo apt-get -y install gcc g++ make autoconf libc-dev pkg-config | |
sudo pecl7.X-sp install sqlsrv | |
sudo pecl7.X-sp install pdo_sqlsrv |
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
1 ls /home/backup/Onboard.bak | |
2 /opt/mssql-tools/bin/sqlcmd -S localhost -U SA -Q "RESTORE DATABASE [onboard] FROM DISK = N'/home/backup/Onboard.bak' WITH FILE = 1, NOUNLOAD, REPLACE, STATUS = 5" | |
3 /opt/mssql-tools/bin/sqlcmd -S localhost -U SA -Q "RESTORE DATABASE [onboard] FROM DISK = N'/home/backup/Onboard.bak' WITH FILE = 1, NOUNLOAD, REPLACE, STATS = 5" | |
4 /opt/mssql-tools/bin/sqlcmd -S localhost -U SA -Q "RESTORE DATABASE [onboard] FROM DISK = N'/home/backup/Onboard.bak' WITH FILE = 1, NOUNLOAD, REPLACE, NORECOVERY, STATS = 5" | |
5 ls /home/backup/Onboard.bak | |
6 /opt/mssql-tools/bin/sqlcmd -S localhost -U SA -Q "RESTORE DATABASE [central] FROM DISK = N'/home/backup/Central.bak' WITH FILE = 1, NOUNLOAD, REPLACE, NORECOVERY, STATS = 5" | |
7 /opt/mssql-tools/bin/sqlcmd | |
8 /opt/mssql-tools/bin/sqlcmd -S localhost -U SA | |
9 /opt/mssql-tools/bin/sqlcmd -S localhost -U SA -Q "RESTORE DATABASE [onboard] FROM DISK = N'/home/backup/Onboard.bak' WITH FILE = 1, NOUNLOAD, REPLACE, |
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
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/default -dNOPAUSE -dQUIET -dBATCH -dDetectDuplicateImages -dCompressFonts=true -r150 -sOutputFile=output.pdf input.pdf |
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
https://secure.gravatar.com/avatar/cd0c263b28fce0e1d89a0002cc75648b?size=400 |
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
sudo docker run -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=<YourStrong!Passw0rd>' -p 1433:1433 --name sql1 -d -v /home/raphael/projects/freelas/OnBoard/Backup:/home/backup mcr.microsoft.com/mssql/server:2017-latest | |
sudo docker start sql1 | |
sudo docker exec -it sql1 "bash" | |
## on container, it request pass | |
/opt/mssql-tools/bin/sqlcmd -S localhost -U SA -Q "RESTORE DATABASE central FROM DISK = '/home/backup/Central.bak' WITH MOVE 'central' TO '/var/opt/mssql/data/central.mdf', MOVE 'central_log' TO '/var/opt/mssql/data/central.ldf'" | |
/opt/mssql-tools/bin/sqlcmd -S localhost -U SA -Q "RESTORE DATABASE onboard FROM DISK = '/home/backup/Onboard.bak' WITH MOVE 'onboard' TO '/var/opt/mssql/data/onboard.mdf', MOVE 'onboard_log' TO '/var/opt/mssql/data/onboard.ldf'" |
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
<?php | |
$host = ""; | |
$db = 'onboard'; | |
$user = 'inffel'; | |
$pass = ""; | |
$conn = new PDO("sqlsrv:server=$host,1433;Database=$db", $user, $pass); | |
$tsql = "select * from usuarios"; |
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 avg(valor) previsao_valor from ( | |
SELECT TOP (1000) avg(VALOR) valor | |
FROM [onboard].[dbo].[RESUMO] | |
where (EMPRESA_ID = 1) | |
and (VALOR > 0) | |
and (DAY_WEEK = 1) | |
UNION | |
SELECT TOP (1000) avg(VALOR) valor | |
FROM [onboard].[dbo].[RESUMO] |
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 avg(valor) previsao_valor from ( | |
SELECT TOP (1000) avg(VALOR) valor | |
FROM [onboard].[dbo].[RESUMO] | |
where (EMPRESA_ID = 1) | |
and (VALOR > 0) | |
and (DAY_WEEK = 1) | |
UNION | |
SELECT TOP (1000) avg(VALOR) valor | |
FROM [onboard].[dbo].[RESUMO] |