Skip to content

Instantly share code, notes, and snippets.

View HugoMatilla's full-sized avatar
🏠
Working from home

Hugo Matilla HugoMatilla

🏠
Working from home
View GitHub Profile
@HugoMatilla
HugoMatilla / 0_reuse_code.js
Last active August 29, 2015 14:06
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@HugoMatilla
HugoMatilla / Android Lollipop Widget Tinting Guide
Created April 5, 2016 10:26 — forked from seanKenkeremath/Android Lollipop Widget Tinting Guide
How base colors in Lollipop apply to different UI elements
Unless specified otherwise, all of the below tinting applies to both Lollipop and pre-Lollipop using AppCompat v21. To use the support version of these attributes, remove the android namespace. For instance, "android:colorControlNormal" becomes "colorControlNormal". These attributes will be propagated to their corresponding attributes within the android namespace for devices running Lollipop. Any exceptions to this will be noted by including the "android:" prefix.
All Clickable Views:
-----------
* ripple effect (Lollipop only) -- "colorControlHighlight"
Status Bar:
------------
* background (Lollipop only) - "colorPrimaryDark"
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);
@HugoMatilla
HugoMatilla / index.html
Created December 12, 2016 14:32 — forked from anonymous/index.html
JS Bin flat dates // source https://jsbin.com/vomave
<!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>
class SuperSpecificButton : SpecificButton {
final override fun click() = print("Super Specific Click")
}
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
}
class Button {
fun click() = print("Click")
}
class SpecificButton : Button() { // Error
override fun click() = print("Specific Click") // Error
}
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
}
#!/bin/bash
grep -rnw '.' -e 'android.support'

Get dependencies tree

./gradlew app:dependencies > deps.txt

Only for one configuration

./gradlew app:dependencies --configuration <productFlavors><buildTypeCapitalized>CompileClasspath