Skip to content

Instantly share code, notes, and snippets.

View jose-almir's full-sized avatar

José Almir jose-almir

View GitHub Profile
@letanure
letanure / estados-cidades.json
Last active July 10, 2024 01:23
JSON estados cidades do brasil, dividido por estados. segunda lista atualizada em 2020, dados do IBGE
{
"estados": [
{
"sigla": "AC",
"nome": "Acre",
"cidades": [
"Acrelândia",
"Assis Brasil",
"Brasiléia",
"Bujari",
@n8ebel
n8ebel / ActivityBindingProvider.kt
Created November 22, 2017 07:10
A custom Kotlin delegate for initializing ViewDataBinding objects for Android databinding
/**
* Provides a [ViewDataBinding] object of the declared type by
* calling [DataBindingUtil.setContentView] with the property owning [Activity] and the specified
* layout resource id
*/
class ActivityBindingProvider<out T : ViewDataBinding>(
@LayoutRes private val layoutRes: Int) : ReadOnlyProperty<Activity, T> {
private var binding : T? = null
@jose-almir
jose-almir / ts-crash-course.ts
Created December 17, 2020 01:25
TypeScript Fast Crash Course Annotations
// TypeScript Fast Crash Course Annotations
// Type inference
const car = {
brand: 'BMW',
engine: '3.4',
run: () => {
console.log(`Running ${car.brand}`);
}
};