Skip to content

Instantly share code, notes, and snippets.

View doug1n's full-sized avatar
🪲
fixing bugs

Douglas Gomes doug1n

🪲
fixing bugs
View GitHub Profile
@doug1n
doug1n / fluigObterTabelaForm.sql
Created November 27, 2019 20:26
Script em SQL para obter a tabela do banco de dados passando o código do processo no Fluig
SELECT 'ML0010' + CONVERT(VARCHAR(10), l.COD_LISTA_PAI) AS 'TABELA_PRINCIPAL',
'ML0010' + CONVERT(VARCHAR(10), l.COD_LISTA_FILHO) AS 'TABELA_PAIxFILHO',
d.COD_LISTA,
l.COD_LISTA_PAI,
l.COD_LISTA_FILHO,
l.COD_TABELA ,
d.NUM_DOCTO_PROPRIED ,
d.NUM_VERS_PROPRIED
FROM DEF_PROCES p
LEFT JOIN VERS_DEF_PROCES vp ON vp.COD_DEF_PROCES = p.COD_DEF_PROCES
/*! iFrame Resizer (iframeSizer.contentWindow.min.js) - v2.8.3 - 2015-01-29
* Desc: Include this file in any page being loaded into an iframe
* to force the iframe to resize to the content size.
* Requires: iframeResizer.min.js on host page.
* Copyright: (c) 2015 David J. Bradshaw - dave@bradshaw.net
* License: MIT
*/
!function(){function a(a,b,c){"addEventListener"in window?a.addEventListener(b,c,!1):"attachEvent"in window&&a.attachEvent("on"+b,c)}function b(a){return ab+"["+cb+"] "+a}function c(a){_&&"object"==typeof window.console&&console.log(b(a))}function d(a){"object"==typeof window.console&&console.warn(b(a))}function e(){c("Initialising iFrame"),f(),i(),h("background",M),h("padding",P),o(),m(),j(),q(),n(),Z=p(),E("init","Init message from host page")}function f(){function a(a){return"true"===a?!0:!1}var b=Y.substr(bb).split(":");cb=b[0],N=void 0!==b[1]?Number(b[1]):N,Q=void 0!==b[2]?a(b[2]):Q,_=void 0!==b[3]?a(b[3]):_,$=void 0!==b[4]?Number(b[4]):$,db=void 0!==b[5]?a(b[5]):db,K=void
@doug1n
doug1n / fluigMoverDocumento.js
Last active May 22, 2021 01:02
"Mover" aquivo utilizando apenas docAPI e fluigAPI
/*
* Clona um documento, salva em uma pasta especifica e deleta o documento clonado
* Retorna o código do documento clonado
*/
function moverDocumento(documentoId, versaoDocumento, pastaDestinoId) {
var phisicalFile = docAPI.copyDocumentToUploadArea(documentoId, versaoDocumento)[0];
var docDto = docAPI.newDocumentDto();
docDto.setDocumentId(0);
docDto.setDocumentTypeId("");
@doug1n
doug1n / git-update-fork.sh
Created February 25, 2021 01:17 — forked from rdeavila/git-update-fork.sh
Git: como atualizar um fork com as mudanças do original?
#!/bin/bash
# Adicione um novo remote; pode chamá-lo de "upstream":
git remote add upstream https://github.com/usuario/projeto.git
# Obtenha todos os branches deste novo remote,
# como o upstream/master por exemplo:
git fetch upstream
FROM php:7.4-fpm
# Arguments defined in docker-compose.yml
ARG user
ARG uid
# Install system dependencies
RUN apt-get update && apt-get install -y \
git \
curl \
@doug1n
doug1n / fluigGerarArquivo.js
Created December 17, 2019 14:36
Gerar arquivo no e salvar em uma pasta.
function gerarArquivo(conteudo, pastaDestinoId, nomeDocumento) {
var docDto = docAPI.newDocumentDto();
docDto.setDocumentId(0);
docDto.setDocumentTypeId("");
docDto.setDocumentDescription(nomeDocumento);
docDto.setParentDocumentId(parseInt(pastaDestinoId));
var attachArray = new java.util.ArrayList();
var mainAttach = docAPI.newAttachment();
@doug1n
doug1n / embedded-file-viewer.md
Created September 3, 2020 03:14 — forked from tzmartin/embedded-file-viewer.md
Embedded File Viewer: Google Drive, OneDrive

Office Web Apps Viewer

('.ppt' '.pptx' '.doc', '.docx', '.xls', '.xlsx')

http://view.officeapps.live.com/op/view.aspx?src=[OFFICE_FILE_URL]

<iframe src='https://view.officeapps.live.com/op/embed.aspx?src=[OFFICE_FILE_URL]' width='px' height='px' frameborder='0'>
</iframe>

OneDrive Embed Links

@doug1n
doug1n / KongJwt.md
Created July 9, 2020 13:38 — forked from martinheld/KongJwt.md
Short example to use JWT with Kong

JWT Kong Example

  • Get and Start Kong and Co
git clone git@github.com:Mashape/docker-kong.git
cd docker-kong/compose
docker-compose up
  • Create Kong API Route
const ds = DatasetFactory.getDataset('workflowProcess', null, null, null);
const outObject = ds.values.reduce(function(a, e) {
let estKey = (e['processId']);
(a[estKey] ? a[estKey] : (a[estKey] = null || [])).push(e);
return a;
}, {});
console.log(outObject);
@doug1n
doug1n / fluigInicializarZoom.js
Last active January 23, 2020 13:22
Desabilitar campos zoom na inicialização do form
function inicializaCamposZoom() {
if (typeof window['filial'].setValue != 'function') {
setTimeout(inicializaCamposZoom, 500);
} else {
// Seu código aqui...
// disableZoom('filial')
// prepareReload('motivo', 'tipoRequisicao', '4')
}
}