Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View danielAlbuquerque's full-sized avatar
🏠
Working from home

Daniel Albuquerque danielAlbuquerque

🏠
Working from home
  • BiziFy
  • São Paulo
View GitHub Profile
@danielAlbuquerque
danielAlbuquerque / FreespaceTableSpace.SQL
Created March 27, 2017 12:42
Free space in tablespaces
col "Tablespace" for a22
col "Used MB" for 99,999,999
col "Free MB" for 99,999,999
col "Total MB" for 99,999,999
select df.tablespace_name "Tablespace",
totalusedspace "Used MB",
(df.totalspace - tu.totalusedspace) "Free MB",
df.totalspace "Total MB",
round(100 * ( (df.totalspace - tu.totalusedspace)/ df.totalspace))
@danielAlbuquerque
danielAlbuquerque / reportSample.prw
Created March 13, 2017 11:35
Exemplo de relatório em ADVPL
#INCLUDE 'protheus.ch'
#INCLUDE 'topconn.ch'
User Function ImpGTRel01()
Private oReport := Nil
Private oSecCab := Nil
Private cPerg := PadR("RCOMR01", Len(SX1->X1_GRUPO))
PutSx1(cPerg,"01","Código de?" ,'','',"mv_ch1","C",TamSx3 ("B1_COD")[1] ,0,,"G","","SB1","","","mv_par01","","","","","","","","","","","","","","","","")
PutSx1(cPerg,"02","Código ate?" ,'','',"mv_ch2","C",TamSx3 ("B1_COD")[1] ,0,,"G","","SB1","","","mv_par02","","","","","","","","","","","","","","","","")
generatePagesArray: function(currentPage, collectionLength, rowsPerPage, paginationRange)
{
var pages = [];
var totalPages = Math.ceil(collectionLength / rowsPerPage);
var halfWay = Math.ceil(paginationRange / 2);
var position;
if (currentPage <= halfWay) {
position = 'start';
} else if (totalPages - halfWay < currentPage) {
@danielAlbuquerque
danielAlbuquerque / google_drive_util.py
Created February 6, 2017 14:13 — forked from macieksk/google_drive_util.py
A simple Python module to upload files to Google Drive file upload. Needs a file 'client_secrets.json' in the directory . The file can be obtained from https://console.developers.google.com/ -- under APIs&Auth/Credentials/Create Client ID for native application
## Simple Python module to upload files to Google Drive
# Needs a file 'client_secrets.json' in the directory
# The file can be obtained from https://console.developers.google.com/
# under APIs&Auth/Credentials/Create Client ID for native application
# To test usage:
# import google_drive_util
# google_drive_util.login()
# google_drive_util.test()
#CORE
group = core
admin-port = 13000
admin-password = playsms
status-password = playsms
log-file = "/var/log/kannel/kannel.log"
log-level = 0
access-log = "/var/log/kannel/access.log"
smsbox-port = 13001
store-type = file
@danielAlbuquerque
danielAlbuquerque / GTFROTA.cs
Last active August 27, 2015 16:52
Exception on Connect
static void Main(string[] args)
{
try{
GTFrotaIntegracaoClient client = new GTFrotaIntegracaoClient();
if (client.Autenticar("JSANTANA", "123"))
Console.WriteLine("Acesso autorizado");
else
Console.WriteLine("ACesso negado");
}catch(Exception ex){
Console.WriteLine(ex.Message);