Skip to content

Instantly share code, notes, and snippets.

Avatar
🪲
fixing bugs

Douglas Gomes doug1n

🪲
fixing bugs
  • Vobel
  • Goiânia, Brazil
View GitHub Profile
View iframeResizer.contentWindow.min.js
/*! 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 / git-update-fork.sh
Created Feb 25, 2021 — forked from rdeavila/git-update-fork.sh
Git: como atualizar um fork com as mudanças do original?
View git-update-fork.sh
#!/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
View ices-dockerfile.yml
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 / embedded-file-viewer.md
Created Sep 3, 2020 — forked from tzmartin/embedded-file-viewer.md
Embedded File Viewer: Google Drive, OneDrive
View embedded-file-viewer.md

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 Jul 9, 2020 — forked from martinheld/KongJwt.md
Short example to use JWT with Kong
View KongJwt.md

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
View fluigRankingProcessos.js
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 Jan 23, 2020
Desabilitar campos zoom na inicialização do form
View fluigInicializarZoom.js
function inicializaCamposZoom() {
if (typeof window['filial'].setValue != 'function') {
setTimeout(inicializaCamposZoom, 500);
} else {
// Seu código aqui...
// disableZoom('filial')
// prepareReload('motivo', 'tipoRequisicao', '4')
}
}
@doug1n
doug1n / fluigGerarArquivo.js
Created Dec 17, 2019
Gerar arquivo no e salvar em uma pasta.
View fluigGerarArquivo.js
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 / fluigObterTabelaForm.sql
Created Nov 27, 2019
Script em SQL para obter a tabela do banco de dados passando o código do processo no Fluig
View fluigObterTabelaForm.sql
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
@doug1n
doug1n / fluigMostraLoading.js
Last active Nov 26, 2019
Show loading and execute any function.
View fluigMostraLoading.js
/*
* @function mostraLoading Show loading and execute any function.
* @param {Object} loading referência a variavel de loading que será utilizada
* @param {Function} anyFunction function to execute while loading shows.
*/
function mostraLoading(loading, anyFunction, ...anyParam) {
loading.show();
setTimeout(function () {
anyFunction(...anyParam);
loading.hide();