Skip to content

Instantly share code, notes, and snippets.

View ubiratansoares's full-sized avatar

Ubiratan Soares ubiratansoares

View GitHub Profile
@ubiratansoares
ubiratansoares / build.gradle
Last active January 1, 2022 21:59
Timeouts Enforcer Blog snippets
plugin {
id 'io.labs.dotanuki.timeoutsenforcer' version '<plugin_version>'
}
@ubiratansoares
ubiratansoares / somos70.md
Last active June 6, 2020 23:15
New Covid19 Portal - Back Data

Endpoint -> https://xx9p7hp1p7.execute-api.us-east-1.amazonaws.com/prod/PortalGeral

curl 'https://xx9p7hp1p7.execute-api.us-east-1.amazonaws.com/prod/PortalGeral' \
  -H 'authority: xx9p7hp1p7.execute-api.us-east-1.amazonaws.com' \
  -H 'accept: application/json, text/plain, */*' \
  -H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.61 Safari/537.36' \
  -H 'x-parse-application-id: unAFkcaNDeXajurGB7LChj8SgQYS2ptm' \
  -H 'origin: https://covid.saude.gov.br' \
  -H 'sec-fetch-site: cross-site' \
@ubiratansoares
ubiratansoares / GradleModules.kt
Last active May 15, 2020 00:20
Magic Modules Blog Post
object GradleModules {
const val LOGIN = ":features:login"
const val SIGNUP = ":features:signup"
const val CATALOG_LIST = ":features:catalog:list"
const val CATALOG_DETAILS = ":features:catalog:details"
// ....
}
@ubiratansoares
ubiratansoares / toplevel-build-script.gradle
Created December 29, 2016 19:22
Increase javac maxErrors output for Gradle-based build
allprojects {
repositories {
jcenter()
}
gradle.projectsEvaluated {
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xmaxerrs" << "1000"
}
}
@ubiratansoares
ubiratansoares / FasterArrayAdapter.java
Created May 26, 2013 14:37
A simple idea for a less bloated (Array)Adapter implementation, using ViewHolder pattern.
public abstract class FasterArrayAdapter<T> extends ArrayAdapter<T> {
protected abstract Object getHolder();
protected abstract int layoutResourceForItem();
protected abstract void setupHolder(View convertView, Object tag);
protected abstract void fillHolder(Object tag, int position);
protected LayoutInflater mInflater;
public FasterArrayAdapter(Context context, List<T> objects) {