Skip to content

Instantly share code, notes, and snippets.

View gustavopinto's full-sized avatar
🌴
On vacation

Gustavo Pinto gustavopinto

🌴
On vacation
View GitHub Profile
@gustavopinto
gustavopinto / Ex1-CDD.Java
Last active May 2, 2022 02:40
Exemplos refatorações CDD
public void method() {
final EarlyAlert saved = getDao().save(earlyAlert);
sendMessageToAdvisorService.sendMessageToAdvisor(
saved, earlyAlert.getEmailCC(), LOGGER);
}
package polimorfismo;
public class BMW implements Carro {
public double velocidadeMaxima (){
return 200;
}
}
@gustavopinto
gustavopinto / get-test-users.sh
Created October 3, 2019 12:29
get name and email address of commiters that changed test files
#!/bin/bash
ROOT=`pwd`
for dir in */
do
cd "$dir"
var=$(git log --pretty='%cn,%ae,%s,%H' | grep test | head -n 1)
if [ -n "$var" ]
then
@gustavopinto
gustavopinto / sotorrent.py
Created November 19, 2018 23:03
sotorrent exercise
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# The goal of this exercise is to understand how do the size of a SO code snipet changes
# during its own evolution, and in terms of the programming language used and the popularity
# of the SO question
# In case you do not have MySQLdb instaled:
# More details at: https://askubuntu.com/questions/989965
import MySQLdb as db

Dear Editor,

Thank you for your invitation to review for your journal, published by Elsevier.

Unfortunately, during negotiations about the cost of journal subscriptions and the cost of open access publishing, Elsevier has decided to block access to its latest publications for my colleagues working at universities in Germany and Sweden [1].

I support the position of the Swedish and German universities in these negotiations.

run:
echo "" > test.txt
nohup python reddit.py &
update:
git add .
git commit -am "edits"
git push

Concurso LogoMarca e Folder da V Jornada Científica do IFPA - Santarém

A Jornada Científica do IFPA - Santarém é um evento anual que está em sua quinta edição. No entanto, até agora, a Jornada Científica não conta com uma logomarca. Precisamos mudar essa situação.

Como funciona o concurso?

Prepare uma Logomarca e um folder, contendo informações como:

  • Nome do evento
  • Datas importantes
@gustavopinto
gustavopinto / top-10-oss-licenses.sql
Created July 11, 2016 18:35
Top10 most popular OSS licenses
SELECT count(repo_name) as total, license
FROM [bigquery-public-data:github_repos.licenses]
Group By license
order by total desc
limit 10
@gustavopinto
gustavopinto / all_eh_commit_messages.csv
Last active May 29, 2016 15:31
swift projects with error handling messages
commit author email date message
https://github.com/tadija/AEXML/commit/4a14c27 Marko Tadic tadija@me.com 2016-05-03 00:13:49 +0200 Improved error handling (fixed Issue #62) Added error property of ErrorType enum with possible error cases Removed errorElementName static property Modified subscript logic of AEXMLElement to return empty element with ElementNotFound error (if element does not exist) Modified root property of AEXMLDocument to return empty element with RootElementMissing error (if root element does not exist) Improved logic in testRootElement and testNotExistingElement unit tests Minor changes in example ViewController and README.md
https://github.com/Alamofire/Alamofire/commit/94d1128 Christian Noon christian.noon@gmail.com 2015-07-26 17:33:46 -0700 Refactored the MultipartFormData encoding to leverage Swift 2.0 error handling.
https://github.com/Alamofire/Alamofire/commit/b87fb42 Christian Noon christian.noon@nike.com 2015-06-11 15:49:17 -0700 Modified error handling to use implicit error catchi
@gustavopinto
gustavopinto / github-popular-projects.sql
Created September 30, 2015 20:19
Top 10 most popular Haskell projects