Skip to content

Instantly share code, notes, and snippets.

View mcassiano's full-sized avatar

Matheus Candido mcassiano

View GitHub Profile
@dhg
dhg / forms
Created May 15, 2011 19:27
Skeleton Forms
<form action="">
<!-- Label and text input -->
<label for="regularInput">Regular Input</label>
<input type="text" id="regularInput" />
<!-- Label and textarea -->
<label for="regularTextarea">Regular Textarea</label>
<textarea id="regularTextarea"></textarea>
@acdha
acdha / Shell log.sh
Last active March 22, 2016 06:15
Commands needed to create an AWS RDS database parameter group which defaults to Unicode sanity: UTF-8, full collation, etc.
# Mac Homebrew command to install the RDS command-line tools
# Ubuntu users may find https://launchpad.net/~awstools-dev/+archive/awstools/ useful
brew install rds-command-line-tools
rds-create-db-parameter-group mysql-utf8 -f mysql5.1 -d "MySQL 5.1 configured for UTF-8"
rds-modify-db-parameter-group mysql-utf8 \
--parameters="name=character_set_server, value=utf8, method=immediate" \
--parameters="name=character_set_client, value=utf8, method=immediate" \
--parameters="name=character_set_results, value=utf8, method=immediate" \
@entaroadun
entaroadun / gist:1653794
Created January 21, 2012 20:10
Recommendation and Ratings Public Data Sets For Machine Learning

Movies Recommendation:

Music Recommendation:

@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)
@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;
@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;
@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;
@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
@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,

git ls-files -z myFolderToIgnore/ | xargs -0 git update-index --assume-unchanged