Skip to content

Instantly share code, notes, and snippets.

View eduardb's full-sized avatar

Eduard-Cristian Boloș eduardb

View GitHub Profile
@nickbutcher
nickbutcher / LICENSE
Last active October 6, 2020 11:14
Fun with gradients and AnimatedVectorDrawables. Illustration by the wonderful https://twitter.com/VPoltrack
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
@adnanced
adnanced / scala-school-questions.md
Last active October 24, 2018 14:38
Scala school questions
  • Scala syntax
    • How well do you know Option/Try/Either/Future types from Scala standard library?
      • I don't use them
      • I use them, but I don't see clear benefits
      • I use them and understand the benefits, but I struggle with them
      • I fully understand why we use them and have no problems with them
    • How do you get and combine values from those types mentioned above?
      • I don't
      • I use map/flatMap most of the time
  • I try using for-comprehension most of the time
@martinlechner1
martinlechner1 / fpmaterial.md
Last active January 11, 2019 13:00
FP Material

Scala FP Material

Books

  • Redbook
  • Advanced Scala with Cats
  • Functional Programming for Mortals

Blog Posts

@gpeal
gpeal / build.gradle
Created May 22, 2018 02:01
Airbnb Gradle Flavors
...
apply from: './flavors.gradle'
...
android {
buildTypes {
productFlavors {
project.flavors.each { flavor, config ->
"$flavor" {
dimension 'scope'
if (flavor != 'full') {
@tomaszpolanski
tomaszpolanski / Movie.kt
Last active June 28, 2022 21:04
Parcelize testing
import android.annotation.SuppressLint
import android.os.Parcelable
import kotlinx.android.parcel.Parcelize
@SuppressLint("ParcelCreator") // IntelliJ Issue https://youtrack.jetbrains.com/issue/KT-19300
@Parcelize
data class Movie(val title: String) : Parcelable
@txusballesteros
txusballesteros / RecyclerViewAssertion.kt
Created October 15, 2017 15:54
Espresso RecyclerView Assertions
package com.txusballesteros.instrumentacion.assertion
import android.support.test.espresso.EspressoException
import android.support.test.espresso.ViewAssertion
import android.support.test.espresso.matcher.ViewMatchers.assertThat
import android.support.v7.widget.RecyclerView
import android.view.View
import android.view.View.FIND_VIEWS_WITH_TEXT
import android.widget.TextView
import org.hamcrest.Matchers.greaterThan
@florina-muntenescu
florina-muntenescu / BaseDao.kt
Last active September 28, 2023 15:01
Use Dao inheritance to reduce the amount of boilerplate code - https://medium.com/google-developers/7-pro-tips-for-room-fbadea4bfbd1
/*
* Copyright (C) 2017 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@Pulimet
Pulimet / AdbCommands
Last active May 2, 2024 05:27
Adb useful commands list
adb help // List all comands
== Adb Server
adb kill-server
adb start-server
== Adb Reboot
adb reboot
adb reboot recovery
adb reboot-bootloader
@ZacSweers
ZacSweers / OffsetsWithDirection.kt
Last active February 21, 2019 19:25
Observable stream of AppBarLayout offsets + scroll direction from https://twitter.com/pandanomic/status/898142281106022400
/*
* Here we want to get the appbar offset changes paired with the direction it's moving and
* using RxBinding's great `offsetChanges` API to make an rx Observable of this. The first
* part buffers two while skipping one at a time and emits y delta pairs (cur and prev). Second
* part is just a simple map to pair the offset with the resolved scroll direction comparing
* to the previous offset. This gives us a nice stream of (offset, direction) emissions.
*
* Note that the filter() is important if you manipulate child views of the ABL. If any child
* view requests layout again, it will trigger an emission from the offset listener with the
* same value as before, potentially causing measure/layout/draw thrashing if your logic
@chrisbanes
chrisbanes / KotterKnife.kt
Last active February 7, 2021 15:25
LifecycleAware KotterKnife
package kotterknife
import android.app.Activity
import android.app.Dialog
import android.app.DialogFragment
import android.app.Fragment
import android.arch.lifecycle.Lifecycle
import android.arch.lifecycle.LifecycleObserver
import android.arch.lifecycle.LifecycleOwner
import android.arch.lifecycle.OnLifecycleEvent