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 / 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>
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);
class AppRestService : IAppRestService {
override fun getAppRestService(): IRestService {
val httpClient = OkHttpClient().newBuilder()
val interceptor = Interceptor { chain ->
val request = chain?.request()?.newBuilder()?.addHeader("SomeHeader", "SomeHeaderProperty")?.build();
chain?.proceed(request)
}
httpClient.networkInterceptors().add(interceptor)
val customGson = GsonBuilder().registerTypeAdapter(MyClassCloud::class.java, MyClassCloudDeserializer("1")).create()
val retrofit = Retrofit.Builder().baseUrl(IRestService.URL_BASE).addConverterFactory(GsonConverterFactory.create(customGson)).client(httpClient.build()).build()
@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"
@HugoMatilla
HugoMatilla / ADBCheatSheet.md
Last active April 23, 2024 00:46
ADB Cheat Sheet

CONFIG

Include adb and other android tools on your path

In Users/hugomatilla.bash_profile add export PATH=$PATH:/Users/hugomatilla/Documents/AndroidSDKs/sdk/platform-tools export PATH=$PATH:/Users/hugomatilla/Documents/AndroidSDKs/sdk/tools

My own adb location

cd /Users/hugomatilla/Documents/AndroidSDKs/sdk/platform-tools
@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