Skip to content

Instantly share code, notes, and snippets.

View mcassiano's full-sized avatar

Matheus Candido mcassiano

View GitHub Profile
@marukami
marukami / presentation.md
Created October 17, 2017 10:25
Android Quality Matters - Part 1: Build Foundations

Shared Dependencies Versions

// dependencies.gradle
ext.versions = [
    code               : 1,
    name               : '1.0',

    minSdk             : 16,
    targetSdk          : 26,
@rharter
rharter / ViewCompatExt.kt
Last active February 4, 2018 01:12
Extension methods to easily provide all functionality in ViewCompat. This makes it super easy to see when there is a compat method available in code completion right alongside the framework methods.
import android.content.ClipData
import android.graphics.Paint
import android.os.Build
import android.os.Bundle
import android.support.v4.view.*
import android.support.v4.view.accessibility.AccessibilityNodeInfoCompat
import android.support.v4.view.accessibility.AccessibilityNodeProviderCompat
import android.view.*
/**
git ls-files -z myFolderToIgnore/ | xargs -0 git update-index --assume-unchanged
@andymatuschak
andymatuschak / States-v3.md
Last active June 12, 2024 04:17
A composable pattern for pure state machines with effects (draft v3)

A composable pattern for pure state machines with effects

State machines are everywhere in interactive systems, but they're rarely defined clearly and explicitly. Given some big blob of code including implicit state machines, which transitions are possible and under what conditions? What effects take place on what transitions?

There are existing design patterns for state machines, but all the patterns I've seen complect side effects with the structure of the state machine itself. Instances of these patterns are difficult to test without mocking, and they end up with more dependencies. Worse, the classic patterns compose poorly: hierarchical state machines are typically not straightforward extensions. The functional programming world has solutions, but they don't transpose neatly enough to be broadly usable in mainstream languages.

Here I present a composable pattern for pure state machiness with effects,

@frankyonnetti
frankyonnetti / CSS--hex-opacity-values.css
Last active December 8, 2023 05:56
#css Hex Opacity Values
/*
* Hex Opacity Values
*/
100% — FF
95% — F2
90% — E6
85% — D9
80% — CC
75% — BF
@prabirshrestha
prabirshrestha / HttpClient.java
Last active October 10, 2018 16:06
OkHttpClient+RxJava
package com.example.rx_okhttp;
import com.squareup.okhttp.OkHttpClient;
import org.apache.http.*;
import org.apache.http.entity.InputStreamEntity;
import org.apache.http.message.BasicHeader;
import org.apache.http.message.BasicHttpResponse;
import rx.Observable;
import rx.Observer;
import rx.Scheduler;
@broady
broady / 1MarkerAnimation.java
Last active March 13, 2024 12:44
Animating Markers
/* Copyright 2013 Google Inc.
Licensed under Apache 2.0: http://www.apache.org/licenses/LICENSE-2.0.html */
package com.example.latlnginterpolation;
import android.animation.ObjectAnimator;
import android.animation.TypeEvaluator;
import android.animation.ValueAnimator;
import android.annotation.TargetApi;
import android.os.Build;
@jewelsea
jewelsea / PannableView.java
Last active July 12, 2021 19:11
Create a pannable map background in JavaFX
import javafx.application.Application;
import static javafx.application.Application.launch;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.ScrollPane;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
import javafx.scene.layout.Pane;
@mendelgusmao
mendelgusmao / CHANGELOG.txt
Created July 28, 2012 22:36
Symbian9 - Nono dígito para Symbian & programas que usam vCard (Outlook p.ex)
10/08/2012
- Adicionada opção para o formato 0XX11987654321, com ou sem zero no sufixo (Contribuição: Carlos Luizetto / Roberto Akama)
- Adicionada verificação da "gem vcard" para os casos em que o componente responsável pela leitura e edição de vCards não está instalado
02/08/2012
- Correção de bugs
- Lista de prefixos da Nextel (SME/trunking não faz parte da mudança) (Contribuição: Maurício Iwata)
- Adição do formato 9-XXXX-XXXX (Contribuição: Carlos Luizetto)
@entaroadun
entaroadun / gist:1653794
Created January 21, 2012 20:10
Recommendation and Ratings Public Data Sets For Machine Learning

Movies Recommendation:

Music Recommendation: