Skip to content

Instantly share code, notes, and snippets.

View reinaldoacdc's full-sized avatar

Reinaldo Alberto reinaldoacdc

View GitHub Profile
@jaymcgavren
jaymcgavren / blog.rb
Created October 26, 2017 22:48
Set up Active Record with an in-memory database and model classes, all in a single file.
# Instead of loading all of Rails, load the
# particular Rails dependencies we need
require 'sqlite3'
require 'active_record'
# Set up a database that resides in RAM
ActiveRecord::Base.establish_connection(
adapter: 'sqlite3',
database: ':memory:'
)
@k1r0s
k1r0s / my-selector.tsx
Last active October 6, 2022 21:52
Preact native <select> implementation with search feature
/**
* <MySelector
* options={exampleArr}
* printBy="name"
* selected={this.selectedOpt}
* onOptionSelected={(opt) =>
* this.mySelectorValueChange(opt)}
* />
*/
import { h, Component } from "preact";
@tanaikech
tanaikech / submit.md
Last active August 16, 2023 23:30
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.
@fabriciocolombo
fabriciocolombo / gist:4236ce010787d86b5c65
Last active May 8, 2023 18:30
Delphi 2010 Parse Json using DBXJson
uses DBXJSON, Character;
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;
end;
{ TJsonObjectHelper }
@guivan
guivan / tabela-cfop
Last active June 14, 2024 12:24
Lista de CFOP - Código Fiscal de Operação e Prestação CSV
1000;"ENTRADAS OU AQUISIÇÕES DE SERVIÇOS DO ESTADO"
1100;"COMPRAS PARA INDUSTRIALIZAÇÃO, COMERCIALIZAÇÃO OU PRESTAÇÃO DE SERVIÇOS"
1101;"Compra para industrialização ou produção rural"
1102;"Compra para comercialização"
1111;"Compra para industrialização de mercadoria recebida anteriormente em consignação industrial"
1113;"Compra para comercialização, de mercadoria recebida anteriormente em consignação mercantil"
1116;"Compra para industrialização ou produção rural originada de encomenda para recebimento futuro"
1117;"Compra para comercialização originada de encomenda para recebimento futuro"
1118;"Compra de mercadoria para comercialização pelo adquirente originário, entregue pelo vendedor remetente ao destinatário, em venda à ordem"
1120;"Compra para industrialização, em venda à ordem, já recebida do vendedor remetente"
@mateusg
mateusg / devise.pt-BR.yml
Last active December 23, 2023 15:15 — forked from alexandreaquiles/devise.pt-BR.yml
pt-BR translations for Devise
# encoding: UTF-8
# pt-BR translations for Devise
pt-BR:
devise:
confirmations:
confirmed: "Sua conta foi confirmada com sucesso. Você está logado."
send_instructions: "Dentro de minutos, você receberá um e-mail com instruções para a confirmação da sua conta."
send_paranoid_instructions: "Se o seu endereço de e-mail estiver cadastrado, você receberá uma mensagem com instruções para confirmação da sua conta."
failure:
already_authenticated: "Você já está logado."