Skip to content

Instantly share code, notes, and snippets.

View eliocapelati's full-sized avatar
👋
Hello world!

Elio eliocapelati

👋
Hello world!
View GitHub Profile
@eliocapelati
eliocapelati / osx-for-hackers.sh
Last active August 27, 2015 13:39 — forked from brandonb927/osx-for-hackers.sh
OSX for Hackers: Yosemite Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned. Also, please don't email me about this script, my poor inbox...
#!/bin/sh
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Set the colours you can use
black='\033[0;30m'
white='\033[0;37m'
red='\033[0;31m'
@eliocapelati
eliocapelati / clube_dos_posts
Last active August 29, 2015 14:06
Clube dos posts : quickly add to flipboard
É bom estar logado no Flipboard :D
Swift, Access Control and Testing
https://share.flipboard.com/bookmarklet/popout?v=2&title=Swift%2C%20Access%20Control%20and%20Testing&url=http%3A%2F%2Fblog.diogot.com%2Fblog%2F2014%2F08%2F23%2Fswift_access_control_and_testing%2F
Introdução à Mock e Stub com Rspec
https://share.flipboard.com/bookmarklet/popout?v=2&title=Introdu%C3%A7%C3%A3o%20%C3%A0%20Mock%20e%20Stub%20com%20Rspec&url=http%3A%2F%2Foswaldoferreira.github.io%2F2014%2F08%2F29%2Fuma-abordagem-simples-sobre-mock-e-stub-em-ruby.html
Stress Testing with Loader.io
https://share.flipboard.com/bookmarklet/popout?v=2&title=Stress%20Testing%20with%20Loader.io&url=http%3A%2F%2Fwww.sitepoint.com%2Fstress-testing-loader-io%2F
@eliocapelati
eliocapelati / uuidUpperHyphenless
Created September 8, 2014 18:11
UUID sem hífen e em maiúsculo.
uuidgen | sed -e "s/-//g" | tr [:lower:] [:upper:]
@eliocapelati
eliocapelati / flip.scala
Created September 17, 2014 16:12
Title and url encode to add to Flipboard
import java.net.URLEncoder.{encode => enc}
object Flipit extends App {
if (args.size >= 2){
val flip = """https://share.flipboard.com/bookmarklet/popout?v=2&title=%s&url=%s"""
println(args(0))
println(flip.format(e(args(0)), e(args(1))))
def e(url :String) :String = {
@eliocapelati
eliocapelati / sites_evitar_procon.json
Last active August 29, 2015 14:10
Lista de sites para evitar na Black Friday Brasileira, essa lista atualizada pode ser encontrada originalmente e atualizada no site: http://sistemas.procon.sp.gov.br/evitesite/list/evitesites.php
{
"ListaDeSitesParaEvitar": {
"site": [
{
"documento": null,
"inclusao": "01/09/2014",
"nome": "adorocompraronline.com",
"status": "NO AR",
"url": "adorocompraronline.com"
},
@eliocapelati
eliocapelati / app.log
Created December 17, 2014 13:07
Amazon Linux 64bit, Java 8, Tomcat8, Spring 3.2.2
2014-12-17 12:41:12,470 ERROR [org.springframework.web.context.ContextLoader] - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.context.annotation.internalAsyncAnnotationProcessor': Cannot resolve reference to bean 'taskExecutor' while setting bean property 'executor'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'taskExecutor': Invocation of init method failed; nested exception is org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type 'java.util.concurrent.ThreadPoolExecutor$CallerRunsPolicy' to required type 'edu.emory.mathcs.backport.java.util.concurrent.RejectedExecutionHandler' for property 'rejectedExecutionHandler'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [java.util.concurrent.ThreadPoolExecutor$CallerRunsPolicy] to required type [edu.emory.mathcs.backport.java.util.c
@eliocapelati
eliocapelati / App.java
Created March 24, 2015 18:13
Java way to get a truly immutable copy of a List.
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
class App{
public static void main(String[] args) throws Exception {
List<String> list = Arrays.asList("a", "b", "c");
List<String> local = new ArrayList<String>(list);
@eliocapelati
eliocapelati / maven-output-jdk_1.7.0_40
Created July 16, 2015 03:00
Using Immutables with Java 7~8
[INFO] Scanning for projects...
[INFO]
[INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building POC-Immutables 1.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ POC-Immutables ---
[INFO] Deleting /Users/eliocapelati/dev/gabbay/ws/POC-Immutables/target
@eliocapelati
eliocapelati / table_w_elements.adoc
Last active August 29, 2015 14:26
Use asciidoctor-pdf to reproduce the problem...

Testing table with attributes

Test table with default Asciidoc atributes

Table 1. Table with some elements
@eliocapelati
eliocapelati / GrepHelp1
Created July 26, 2012 12:42
Comando GREP para auxilio em filtrar logs, ou arquivos de textos bem extensos
grep -v "Texto que deseja remover linhas" arquivoOrigem.txt > arquivoDestino.txt --Procura por um trecho de texto em todo o arquivo, e deleta a linha onde é encontrado