Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

Hugo Matilla HugoMatilla

🏠
Working from home
Block or report user

Report or block HugoMatilla

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View find_support.sh
#!/bin/bash
grep -rnw '.' -e 'android.support'
View gradleCheatSheet.md

Get dependencies tree

./gradlew app:dependencies > deps.txt

Only for one configuration

./gradlew app:dependencies --configuration <productFlavors><buildTypeCapitalized>CompileClasspath
View MediumPost-KotlinModifiers-05.csv
Modifier Corresponding member Comments for classes
final Can’t be overridden Used by default for class members
open Can be overridden Should be specified explicitly
abstract Must be overridden Can be used only in abstract classes; abstract members can’t have an implementation
override Overrides a member in a superclass or interface Overridden member is open by default if not marked final
View MediumPost-KotlinModifiers-04.kt
abstract class Widget {
abstract fun draw() // open and must be overridden
open fun focus() {} // can be overridden
fun hide() {} // final by deafult, can't be overridden
}
View MediumPost-KotlinModifiers-03.kt
class SuperSpecificButton : SpecificButton {
final override fun click() = print("Super Specific Click")
}
View MediumPost-KotlinModifiers-02.kt
open class Button {
open fun click() = print("Click")
fun doubleClick() = print("Double Click")
}
class SpecificButton() : Button { // Inheritance is now possible
override fun click() = print("Specific Click") // Now it works
override fun doubleClick() = print("Specific Double Click") // Error
}
View MediumPost-KotlinModifiers-01.kt
class Button {
fun click() = print("Click")
}
class SpecificButton : Button() { // Error
override fun click() = print("Specific Click") // Error
}
View Gradle Cheat Sheet.md

DEPENDENCIES TREE

./gradlew app:dependencies

RUN TESTS

./gradlew test

View index.html
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="flat dates">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.15.2/moment.min.js"></script>
View JS Console tools
var script = document.createElement('script');
script.type = 'text/javascript';
script.src = "https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.15.1/moment.min.js";
document.head.appendChild(script);
You can’t perform that action at this time.