Skip to content

Instantly share code, notes, and snippets.

View emersonsoares's full-sized avatar
🎯
Focusing

Emerson Soares emersonsoares

🎯
Focusing
View GitHub Profile
@robertpainsi
robertpainsi / commit-message-guidelines.md
Last active May 3, 2024 11:43
Commit message guidelines

Commit Message Guidelines

Short (72 chars or less) summary

More detailed explanatory text. Wrap it to 72 characters. The blank
line separating the summary from the body is critical (unless you omit
the body entirely).

Write your commit message in the imperative: "Fix bug" and not "Fixed
bug" or "Fixes bug." This convention matches up with commit messages
@vasanthk
vasanthk / System Design.md
Last active May 6, 2024 01:32
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?

progrium/bashstyle

Bash is the JavaScript of systems programming. Although in some cases it's better to use a systems language like C or Go, Bash is an ideal systems language for smaller POSIX-oriented or command line tasks. Here's three quick reasons why:

  • It's everywhere. Like JavaScript for the web, Bash is already there ready for systems programming.
  • It's neutral. Unlike Ruby, Python, JavaScript, or PHP, Bash offends equally across all communities. ;)
  • It's made to be glue. Write complex parts in C or Go (or whatever!), and glue them together with Bash.

This document is how I write Bash and how I'd like collaborators to write Bash with me in my open source projects. It's based on a lot of experience and time collecting best practices. Most of them come from these two articles, but here integrated, slightly modified, and focusing on the most bang for buck items. Plus some ne

@netojoaobatista
netojoaobatista / gitcowsay.sh
Last active January 4, 2021 18:58
Random commit messages
git config --global alias.cowsay '!git commit -m "`fortune | cowsay -f tux`"'
@anatg
anatg / gist:e8e9887a36519a1232f8
Created February 28, 2015 19:43
BizSpark code for Hack.UVA
The information is below. Clicking the signup link will redirect to the BizSpark registration page and will use an auto-approved enrollment code “KSKWsQBQHM”, which you should see in Step 2.
Make sure you’re signed out of any existing Microsoft accounts before you start the signup process for a new account.
Sign up through this link, for instant approval:
· http://www.microsoft.com/bizspark/Register.aspx?SecurityCode=KSKWsQBQHM
· Here’s a short URL that you can circulate: http://aka.ms/hackuva2015
More info:
· BizSpark info on my page: http://wakeupandcode.com/bizspark/
@danielmackay
danielmackay / Azure Trace Apender.cs
Created April 7, 2014 08:55
Azure Log4net appender. This will produce output in the streaming log service in visual studio. #log4net, #azure.
public class AzureTraceAppender : TraceAppender
{
protected override void Append(LoggingEvent loggingEvent)
{
var level = loggingEvent.Level;
var message = RenderLoggingEvent(loggingEvent);
if (level >= Level.Error)
Trace.TraceError(message);
else if (level >= Level.Warn)
Trace.TraceWarning(message);
@netojoaobatista
netojoaobatista / sample.php
Created August 8, 2012 15:00
Slug function
<?php
echo slug('João Batista Neto'); //joao-batista-neto
@letanure
letanure / estados-cidades.json
Last active April 30, 2024 23:07
JSON estados cidades do brasil, dividido por estados. segunda lista atualizada em 2020, dados do IBGE
{
"estados": [
{
"sigla": "AC",
"nome": "Acre",
"cidades": [
"Acrelândia",
"Assis Brasil",
"Brasiléia",
"Bujari",
@netojoaobatista
netojoaobatista / String.prototype.soundex.js
Created March 22, 2012 18:00
Implementação do algorítimo SoundEX em Javascript
/**
* Implementação do algorítimo SoundEx em Javascript.
* @author João Batista Neto
*
* SoundEX é um algorítimo fonético para indexação de nomes pelo som segundo
* sua pronúncia. O algorítimo foi desenvolvido por Robert C. Russell e
* Margaret K. Odell e patenteado em 1918 e 1922.
* {@link http://en.wikipedia.org/wiki/Soundex}
*
* @return {String}
@ldaniel
ldaniel / assunto.txt
Created March 21, 2012 16:52
Relação entre testes, design e métricas
Pessoal, gostaria de saber como vocês endereçam as questões que farei após explicar o cenário
abaixo. Pra mim, é muito claro que todas podem ser respondidas com um belo "depende", contudo,
vamos focar as respostas no que atenderia a maioria dos casos (lembrando que esse é um cenário
muito simplório).
-- CENÁRIO -----------------------------------------------------------------------------------------
Um desenvolvedor codificou inicialmente a classe (escrita em C#) no gist "exemplo_antes.cs".
Após aplicar um refactoring, ele chegou no resultado mostrado no gist "exemplo_depois.cs".
Algumas métricas foram coletadas antes e depois do refactoring (vide gist "métricas.txt").