Skip to content

Instantly share code, notes, and snippets.

View sinetoami's full-sized avatar

Sinésio Neto sinetoami

  • Brazil
View GitHub Profile
{
"openapi": "3.0.0",
"info": {
"title": "Genemitter API",
"description": "Optional multiline or single-line description in HTML.",
"version": "0.0.1"
},
"servers": [
{
"url": "http://localhost:4500/docs",
openapi: 3.0.0
info:
title: Genemitter API
description: Optional multiline or single-line description in HTML.
version: 0.0.1
servers:
- url: 'http://test-api.genemitter.snio.dev'
description: Genemitter Test Environment
paths:
/users:
@sinetoami
sinetoami / xml-xsd-validator.ts
Created March 9, 2021 01:06
Validador XSD/XML
import * as fs from "fs";
import * as libxml from "libxmljs";
try {
const xsdStr = fs.readFileSync("RecepcaoNFSe_v1.00.xsd", "utf8");
const xml = fs.readFileSync("teste.xml", "utf8");
const xsd = libxml.parseXml(xsdStr);
const xmlDoc = libxml.parseXml(xml);
@sinetoami
sinetoami / poc_integracao-stm-caxias-ma.ts
Last active November 3, 2021 15:02
POC de envio de RecepcaoNFSe para STM de Caxias/MA
import axios from "axios";
const url = "http://stm.caxias.d2ti.com.br/wsnfselote/RecepcaoNFSePort?wsdl";
const axiosConfig = {
headers: {
"Cache-Control": "no-cache",
"Accept-Encoding": "gzip,deflate",
"Content-Type": "text/xml;charset=UTF-8",
SOAPAction: "",
},
@sinetoami
sinetoami / GPG and git on macOS.md
Created August 31, 2019 03:48 — forked from danieleggert/GPG and git on macOS.md
How to set up git to use the GPG Suite

GPG and git on macOS

Setup

No need for homebrew or anything like that. Works with https://www.git-tower.com and the command line.

  1. Install https://gpgtools.org -- I'd suggest to do a customized install and deselect GPGMail.
  2. Create or import a key -- see below for https://keybase.io
  3. Run gpg --list-secret-keys and look for sec, use the key ID for the next step
  4. Configure git to use GPG -- replace the key with the one from gpg --list-secret-keys
@sinetoami
sinetoami / install_deb_packs_on_voidlinux.md
Created December 22, 2018 04:05
How to install .deb packs on Void Linux

You can't install it with dpkg because dpkg is not this distro's package manager. It would conflict with xbps. So the dpkg in repo is built without install support. You can attempt to install it manually by doing:

ar x filename.deb
@sinetoami
sinetoami / tmux_italic.md
Created December 21, 2018 01:23 — forked from gyribeiro/tmux_italic.md
enable italic font on tmux
" when try to jumpbackward remember to the performance optimization on vim-snippets
" follow this issue to cleary understand:
" https://github.com/SirVer/ultisnips/issues/543
" to edit some snippet, remember to set g:UltiSnipsSnippetDirectories variable.
let g:snips_path = "~/.nvim/plugged/vim-snippets"
let g:UltiSnipsSnippetDirectories = [g:snips_path.'/UltiSnips/', 'UltiSnips']
@sinetoami
sinetoami / complete_with_languageClient-neovim.vim
Last active November 19, 2018 07:57
Vim with Solargraph using LanguageClient-neovim
" Plug Install
Plug 'autozimu/LanguageClient-neovim', { 'branch': 'next', 'do': 'bash install.sh' }
" start solargraph socket on terminal
" $ solargraph socket
" .vimrc config for LC-neovim using solargraph socket process
let g:LanguageClient_serverCommands = { 'ruby': ['tcp://localhost:7658'] }
" .vimrc config for LC-neovim autostart command for solargraph socket
@sinetoami
sinetoami / Guia-ReferênciasRubyRails.md
Last active January 22, 2016 05:52 — forked from lucasnogueira/Post-RubyRails.md
Para aprender Ruby e Rails

É difícil falar de Ruby sem mencionar seu framework web mais famoso, Ruby on Rails. Mas não adianta muito encarar o framework sem um prévio estudo da linguagem (o que de fato já observei acontecer inúmeras vezes). Esse post tem como intuito auxiliar na aprendizagem tanto da linguagem como do framework, para evitar que erros comuns como esse tornem a utilização de ambos um desastre.

Ruby

Ruby é uma linguagem de programação que apareceu para o mundo em 1995, criada por Yukihiro "Matz" Matsumoto. Tem como características o fato de ser uma linguagem de uso geral, com tipagem dinâmica e forte, orientada a objetos e que incorpora diversos paradigmas de programação, como o funcional e o imperativo.

Iniciantes

  • Ruby in Twenty Minutes - É o que o nome diz: um pequeno tutorial que promete não tomar mais do que 20 minutos do seu tempo. Se encarrega de mostrar como baixar e instalar o Ruby. Faz grande uso da IRB (Int