Skip to content

Instantly share code, notes, and snippets.

View vrcca's full-sized avatar
🌟

Vitor Cavalcanti vrcca

🌟
View GitHub Profile
@vrcca
vrcca / DocumentationMakefile.mk
Last active November 27, 2018 16:50
Add the "help" rule to your Makefile
# Install: Save this file to a directory, then add: `include DocumentationMakefile.mk` at the top of your main Makefile.
# Adding docs: add a comment right after the target name following this pattern: ##@category_name description
# Usage: `make help`
#COLORS
GREEN := $(shell tput -Txterm setaf 2)
WHITE := $(shell tput -Txterm setaf 7)
YELLOW := $(shell tput -Txterm setaf 3)
RESET := $(shell tput -Txterm sgr0)
@vrcca
vrcca / DeadlockExample.java
Created October 18, 2018 14:41
Deadlock example in Java
public class DeadlockExample {
private static final int NUM_THREADS = 20;
private static final int NUM_ACCOUNTS = 5;
private static final int NUM_ITERATIONS = 1000000;
public static void main(String[] args) {
final Random rnd = new Random();
final Account[] accounts = loadAllAccounts();

Keybase proof

I hereby claim:

  • I am vrcca on github.
  • I am vrcca (https://keybase.io/vrcca) on keybase.
  • I have a public key ASCBO4UfLrRcK8vRyy_I2WipmcTR2yvgXHrvGeB589qalQo

To claim this, I am signing this object:

@vrcca
vrcca / dominando_android_correcoes.md
Last active August 29, 2015 14:17
Dominando Android: Correções do Livro

Página 226:

**URL do namespace “app” da tag <menu/> está incorreta:**

Ao invés de:

Página 228:

@vrcca
vrcca / AleloConnector.java
Created February 6, 2015 21:18
Como consultar o saldo disponível da Alelo.
package springangularjs;
import java.io.IOException;
import org.jsoup.Connection;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.select.Elements;
public class AleloConnector {