Skip to content

Instantly share code, notes, and snippets.

View CesarBalzer's full-sized avatar

Cesar E. Balzer CesarBalzer

View GitHub Profile
@CesarBalzer
CesarBalzer / gist:3242ccfbdfa822acf25beb43fcb209ee
Last active March 16, 2020 11:42
Example create custom post type
public function new_cpt_service() {
$labels = array(
'name' => _x( 'Servicos', 'api' ),
'singular_name' => _x( 'Serviço', 'api' ),
'add_new' => _x( 'Adicionar novo', 'api' ),
'add_new_item' => __( 'Novo serviço', 'api' ),
'edit_item' => __( 'Editar serviço', 'api' ),
'new_item' => __( 'Novo serviço', 'api' ),
'all_items' => __( 'Todos os serviços', 'api' ),
'view_item' => __( 'Visualizar serviço', 'api' ),
@CesarBalzer
CesarBalzer / example_dt_f7.txt
Last active March 16, 2020 12:12
Example my structure with Datatables.net/Framework7
VERSION FRAMEWORK7 v4
//Structure INDEX.HTML
-----------------------------------
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no, viewport-fit=cover">
<meta name="apple-mobile-web-app-capable" content="yes">
@CesarBalzer
CesarBalzer / js
Created October 27, 2022 01:50
Gregorian Characters
const gregorian_chars = [
{ id: 1, text: 'Alpha', color: 'violet', symbol:'α', letter:'A' },
{ id: 2, text: 'Beta', color: 'dodgerblue', symbol:'β', letter:'B' },
{ id: 3, text: 'Gama', color: 'green', symbol:'γ', letter:'Γ' },
{ id: 4, text: 'Delta', color: 'orange', symbol:'δ', letter:'Δ' },
{ id: 5, text: 'Épsilon', color: 'brown', symbol:'ε', letter:'E' },
{ id: 6, text: 'Zeta', color: 'red', symbol:'ζ', letter:'Z' },
{ id: 7, text: 'Etá', color: 'blue', symbol:'η', letter:'H' },
{ id: 8, text: 'Teta', color: 'gray', symbol:'θ', letter:'Θ' },
{ id: 9, text: 'Iota', color: 'yellow', symbol:'ι', letter:'I' },
@CesarBalzer
CesarBalzer / generateCpfCnpjFunction
Last active February 7, 2024 19:28
POSTMAN - Generate CPF/CNPJ valids, optional format
pm.globals.set("generateCpfCnpjFunction", `
function generateCpfCnpj(isCpf, format) {
//--CPF
function calculateVerificationDigit(part1, part2, part3, firstVerificationDigit) {
const numbers = \`\${part1}\${part2}\${part3}\`.split("");
if (firstVerificationDigit !== undefined) {
numbers[9] = firstVerificationDigit;
}
@CesarBalzer
CesarBalzer / ncm-sh_cest.json
Created October 31, 2024 17:16
Tabela NCM/SH - CEST
{
"sections": [
{
"section": "AUTOPEÇAS",
"data": [
{
"CEST": "01.001.00",
"ITEM": "1",
"NCM/SH": "3815.12.10",
"DESCRICAO": "Catalisadores em colmeia cerâmica ou metálica para conversão catalítica de gases de escape de veículos e outros catalisadores"