Skip to content

Instantly share code, notes, and snippets.

View reinaldoacdc's full-sized avatar

Reinaldo Alberto reinaldoacdc

View GitHub Profile
@reinaldoacdc
reinaldoacdc / gist:380ca8d23e5c38710d6bb3acd2028673
Created August 3, 2023 22:00
Issue: Use mermaid and svgPanZoom together
<script src="https://cdn.jsdelivr.net/npm/svg-pan-zoom@3.5.0/dist/svg-pan-zoom.min.js"></script>
// window.addEventListener("load", event => {
// const tags = document.querySelectorAll('*[id^="mermaid"]')
// console.log('tags', tags)
// for (var i = 0; i < tags.length; i++) {
// console.log('******', tags[i].id)
// const pan = svgPanZoom(tags.item(i), {
// zoomEnabled: true,
// controlIconsEnabled: true,
// fit: true,
@reinaldoacdc
reinaldoacdc / Modelagem.md
Last active August 1, 2023 00:58
Proposta App Estoque DropShip
erDiagram

    EMPRESA ||--o{ PRODUTO :tem
    EMPRESA ||--o{ USUARIO :tem
    EMPRESA ||--o{ PEDIDO :tem
    PEDIDO ||--o{ PEDIDO_ITEM :tem
    PRODUTO ||--o{ ESTOQUE :tem
   EMPRESA {
       integer id PK "Id da Empresa"
@reinaldoacdc
reinaldoacdc / submit.md
Created December 30, 2022 16:22 — forked from tanaikech/submit.md
Selecting Files in Google Drive using Select Box for Google Apps Script

This is a sample script for selecting files in Google Drive using HTML select box for Google Apps Script.

Feature

Feature of this sample.

  • It is a simple and space saving.
  • When the folder is selected, the files in the folder are shown.
  • When the file is selected, the ID of file is retrieved. Users can use this ID at GAS.
  • When a folder is opened, all files in the folder are cached. By this, the second access of the folder is faster.
  • It doesn't retrieve all files in Google Drive at once, so the read of files from Google Drive becomes the minimum necessary.
@reinaldoacdc
reinaldoacdc / tabela-cfop
Last active September 29, 2022 15:15 — forked from guivan/tabela-cfop
Lista de CFOP - Código Fiscal de Operação e Prestação JSON
{
"list": [
{"codigo":"1000", "descricao": "ENTRADAS OU AQUISIÇÕES DE SERVIÇOS DO ESTADO"},
{"codigo":"1100", "descricao": "COMPRAS PARA INDUSTRIALIZAÇÃO, COMERCIALIZAÇÃO OU PRESTAÇÃO DE SERVIÇOS"},
{"codigo":"1101", "descricao": "Compra para industrialização ou produção rural"},
{"codigo":"1102", "descricao": "Compra para comercialização"},
{"codigo":"1111", "descricao": "Compra para industrialização de mercadoria recebida anteriormente em consignação industrial"},
{"codigo":"1113", "descricao": "Compra para comercialização, de mercadoria recebida anteriormente em consignação mercantil"},
{"codigo":"1116", "descricao": "Compra para industrialização ou produção rural originada de encomenda para recebimento futuro"},
{"codigo":"1117", "descricao": "Compra para comercialização originada de encomenda para recebimento futuro"},
@reinaldoacdc
reinaldoacdc / IntegerHelper.pas
Created August 31, 2022 14:37
IntegerHelper
unit IntegerHelper;
interface
type
TIntegerHelper = record helper for integer
function toRomans: String;
end;
@reinaldoacdc
reinaldoacdc / VariantsHelper.pas
Last active August 31, 2022 14:20
VariantsHelper.pas
unit VariantsHelper;
interface
type
TVariantsHelper = record helper for variants
function ValueInRange(const ARange: array of Variant): Boolean;
end;
implementation
@reinaldoacdc
reinaldoacdc / DateUtilsHelper.pas
Created July 15, 2022 22:19
Ddateutils Helper
function MonthName(n: Integer): String;
const
aMeses :array[0..11] of String = ( 'Janeiro', 'Fevereiro', 'Mar�o', 'Abril', 'Maio', 'Junho',
'Julho', 'Agosto', 'Setembro', 'Outubro', 'Novembro', 'Dezembro' );
begin
Result := aMeses[n-1];
end;
unit BitmapHelper;
interface
uses FMX.Graphics;
type
TBitmapHelper = class helper for TBitmap
function ToBase64 :String;
end;
unit FormHelper;
interface
uses Forms;
type
TFormHelper = class helper for TForm
unit JsonObjectHelper;
interface
uses DBXJSON, Character;
type TJsonObjectHelper = class helper for TJsonObject
public
//Helper to find a JSON pair based on the pair string part
function Get(const PairName: UnicodeString): TJSONPair; overload;