Skip to content

Instantly share code, notes, and snippets.

View Honatas's full-sized avatar

Jonatas de Moraes Junior Honatas

  • São Paulo - Brazil
View GitHub Profile
@Honatas
Honatas / BaseModel.java
Last active December 2, 2020 14:44
A Base Model class that goes together with BaseDao: https://gist.github.com/Honatas/8a04b33efe2b5160dc4aa73de305db98
import org.springframework.jdbc.core.RowMapper;
public interface BaseModel<T> {
RowMapper<T> getRowMapper();
}
@Honatas
Honatas / BaseDao.java
Last active December 7, 2020 17:13
BaseDAO for Spring's JDBC helper classes. Check BaseModel: https://gist.github.com/Honatas/b67a3dd0f6cf0556f1c42c30aaf6acb4
import java.lang.reflect.InvocationTargetException;
import java.util.List;
import java.util.Map;
import javax.sql.DataSource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.dao.EmptyResultDataAccessException;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.RowMapper;
@pavlov99
pavlov99 / ansible-galaxy-find-role-id.sh
Created March 27, 2017 07:11
Find your role's id in ansible-galaxy
$ ansible-galaxy info YourUser.RoleName | grep -E 'id: [0-9]' | awk {'print $2'}