Skip to content

Instantly share code, notes, and snippets.

View ndorigatti's full-sized avatar

Nicola Dorigatti ndorigatti

View GitHub Profile
@ndorigatti
ndorigatti / giffify.bat
Last active August 29, 2015 14:27
Giffify - easily create optimised GIFs from a video (On Windows). This assumes you have ffmpeg.exe in the same folder or in the System PATH.
@echo off
REM !/bin/sh
REM License for any modification to the original (linked below):
REM ----------------------------------------------------------------------------
REM "THE BEER-WARE LICENSE" (Revision 42):
REM Sebastiano Poggi wrote this file. As long as you retain this notice you
REM can do whatever you want with this stuff. If we meet some day, and you think
REM this stuff is worth it, you can buy me a beer in return.
REM ----------------------------------------------------------------------------
REM
@ndorigatti
ndorigatti / MainActivity_part.java
Created November 22, 2015 09:14
Test for Retrofit 2.0.0 async call and thread names
private void doRetrofitRequest() {
mRefreshLayout.post(new Runnable() {
@Override
public void run() {
mRefreshLayout.setRefreshing(true);
}
});
Log.i(TAG, "Check thread name before callback:" + Thread.currentThread().getName());
OkHttpClient _okClient = new OkHttpClient();
@ndorigatti
ndorigatti / Logcat filtering
Last active June 24, 2016 10:24
Filter out verbose messages in logcat, because sometimes you just don't give a f*** of art, emulator, EGL or even GC messages...
If you want to filter out those damn emulator/dalvik messages because you just want YOUR logs, just filter with this string:
^(?!(dalvikvm|libEGL|OpenGLRenderer|EGL_genymotion|EGL_emulation|fd|art))
@ndorigatti
ndorigatti / misc.xml
Created February 12, 2018 13:16
Roboto Font Variant in XML
android:fontFamily="sans-serif" // roboto regular
android:fontFamily="sans-serif-light" // roboto light
android:fontFamily="sans-serif-condensed" // roboto condensed
android:fontFamily="sans-serif-black" // roboto black
android:fontFamily="sans-serif-thin" // roboto thin (android 4.2)
android:fontFamily="sans-serif-medium" // roboto medium (android 5.0)
in combination with
android:textStyle="normal|bold|italic"