Skip to content

Instantly share code, notes, and snippets.

View brunotdantas's full-sized avatar
🏠
Working from home

Bruno Dantas brunotdantas

🏠
Working from home
View GitHub Profile
@tianhaoz95
tianhaoz95 / open-in-gitpod.md
Last active February 29, 2024 21:43
Code to add a open in Gitpod badge

Here is your awesome Open in Gitpod badge

[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/[your GitHub username]/[your repository])

Open in Gitpod

@cassmtnr
cassmtnr / upload-image-to-s3.js
Last active August 20, 2019 03:32
upload-image-to-s3
'use strict';
let config = {
AWS = {
accessKeyId: ACCESSKEYHERE,
secretAccessKey: SECRETEACCESSKEYHERE,
region: REGIONHERE
}
}
@jkdba
jkdba / MSSQL_RepetitiveReplace_fn.sql
Last active December 1, 2022 20:10
Simple function to recursively replace a pattern in a string.
CREATE FUNCTION dbo.RepetitiveReplace_fn
(
@P_String VARCHAR(MAX),
@P_Pattern VARCHAR(MAX),
@P_ReplaceString VARCHAR(MAX),
@P_ReplaceLength INT = 1
)
RETURNS VARCHAR(MAX)
BEGIN
DECLARE @Index INT;

Upload images to GitHub

  1. Create a new issue on GitHub.

  2. Drag an image into the comment field.

  3. Wait for the upload process to finish.

  4. Copy the URL and use it in your Markdown files on GitHub.

@rodrigok
rodrigok / capitais.json
Created May 5, 2016 15:18
TABELA DE DISTÂNCIAS ENTRE AS CAPITAIS BRASILEIRAS EM JSON
[
"Aracajú",
"Belém",
"Belo Horizonte",
"Boa Vista",
"Brasília",
"Campo Grande",
"Cuiabá",
"Curitiba",
"Florianópolis",
@45413
45413 / Get-DatabaseDocumentationToHTML.ps1
Created May 2, 2016 22:06
SQL Server Documentation to HTML
param([string]$SQLServerName="localhost")
# Load needed assemblies
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SqlServer.SMO") | Out-Null;
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SqlServer.SMOExtended")| Out-Null;
# Simple to function to write html pages
function writeHtmlPage
{
param ($title, $heading, $body, $filePath);
@Integralist
Integralist / Code of Conduct.md
Last active December 10, 2021 17:00
Code of Conduct (Template)

Code of Conduct

A code of conduct is a set of rules outlining the social norms and rules and responsibilities of, or proper practices for, an individual, party or organization

Summary

The {NAME} is dedicated to providing a harassment-free working environment for all, regardless of gender, sexual orientation, disability, physical appearance, body size, race, or religion. We do not tolerate harassment of any form. All communication should be appropriate for a professional audience including people of many different backgrounds.

Sexual language and imagery is not appropriate for any communication and/or talks. Be kind and do not insult or put down others. Behave professionally. Remember that harassment and sexist, racist, or exclusionary jokes are not appropriate for {NAME}. Staff violating these rules should be reported to an appropriate line manager.

/*
@Author Hromenique Cezniowscki Leite Batista
Valida se um CPF é valido
@param valor um cpf (String) contendo apenas os dígitos
@return true se o cpf é valido, false caso contrário
*/
function validaCPF(cpf) {
if(cpf.length != 11){
@guivan
guivan / tabela-cfop
Last active April 22, 2024 23:50
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"
/**
* Retrieves all the rows in the active spreadsheet that contain data and logs the
* values for each row.
* For more information on using the Spreadsheet API, see
* https://developers.google.com/apps-script/service_spreadsheet
*/
function readRows() {
var sheet = SpreadsheetApp.getActiveSheet();
var rows = sheet.getDataRange();
var numRows = rows.getNumRows();