Skip to content

Instantly share code, notes, and snippets.

View faogustavo's full-sized avatar

Gustavo Fão Valvassori faogustavo

View GitHub Profile
import androidx.compose.animation.core.CubicBezierEasing
// Sine Easing
// https://easings.net/#easeInSine
val EaseInSine = CubicBezierEasing(0.12f, 0f, 0.39f, 0f)
// https://easings.net/#easeOutSine
val EaseOutSine = CubicBezierEasing(0.61f, 1f, 0.88f, 1f)
// https://easings.net/#easeInOutSine
<html>
<script type="text/javascript">
const KEY_START = "CURRENT_STATE"
const KEY_AUTH = "AUTHENTICATE"
const KEY_PAINT = "PAINT"
const KEY_MY_ID = "e4bd5af89ee5f4ed"
const isMine = (data) => data.painterId == KEY_MY_ID
@faogustavo
faogustavo / index.html
Created November 6, 2017 00:51
Brain Middlewave Validation Web
<html>
<head>
<title>Test</title>
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>+
<script src="/socket.io.js"></script>
<script type="text/javascript">
waves = {
delta: 0,
theta: 0,
lowAlpha: 0,
const net = require('net');
var client = new net.Socket();
client.connect(13854, '127.0.0.1', function () {
console.log('Connected');
client.write(JSON.stringify({
enableRawOutput: false,
format: "Json"
}));
});
@faogustavo
faogustavo / MaskedEditTextRule.java
Last active November 25, 2016 19:26
MaskedEditText Saripaar Required
/*
* Copyright (C) 2016 Gustavo Fão Valvassori
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the
* License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
import com.google.firebase.database.DataSnapshot;
import com.google.firebase.database.DatabaseError;
import com.google.firebase.database.DatabaseException;
import com.google.firebase.database.DatabaseReference;
import com.google.firebase.database.MutableData;
import com.google.firebase.database.Transaction;
import com.google.firebase.database.ValueEventListener;
import org.jetbrains.annotations.NotNull;
import java.util.List;
/**
* Created by faogustavo on 20/09/2016.
*/
public class Rule implements IRule{
private Rule next;
private static final String CORINGA = "*";
class Principal {
Arquivo arquivo = new Arquivo();
public static void main(String args[]) {
new Principal().executa();
}
public void executa() {
arquivo.lerDados();
}
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
public class SortedList<T> extends ArrayList<T> {
public enum SortOrder {ASC, DESC}
CREATE OR REPLACE VIEW revendas AS
SELECT
r.name as 'Nome',
count(uhr.user_id) as 'Funcionários',
a.street as 'Rua',
a.number as 'Numero',
a.complement as 'Complemento',
d.name as 'Bairro',
c.name as 'Cidade'
FROM resale r