Skip to content

Instantly share code, notes, and snippets.

View gayapedro's full-sized avatar

Pedro Gaya gayapedro

  • Salvador - BA / Brasil
View GitHub Profile
import { toast } from 'react-toastify';
import { useState, useEffect } from 'react';
function Componente() {
const [toastAudio, setToastAudio] = useState(false);
const chamadaApi = async () => {
//...
toast.error();
setToastAudio(true);
@gayapedro
gayapedro / botao.asm
Last active September 13, 2019 19:24
.ORG 0x0000
RJMP main
main:
LDI r16,0b11111101
OUT DDRD,r16 ;CONFIGURA PD0 COMO SAÍDA (LED) E PD1 COMO ENTRADA (BOTÃO)
LDI r16,0b11111100
OUT PortD,r16 ;INICIALIZA O LED COMO INICIALMENTE DESLIGADO
NOP
.ORG 0x0000
RJMP main
main:
LDI r16,0xFF
OUT DDRD,r16
loop:
LDI r25,0b00111111
OUT PortD,r25
.ORG 0x0000
RJMP main
main:
LDI r16,0xFF
OUT DDRB,r16
LDI r20,0b000000
OUT PortB, r20
loop:
public class Stack{
private StackNode topOfStack;
private class StackNode{
private Object element;
private StackNode next;
private StackNode(Object e, StackNode n){
element = e;
public class Fibonacci
{
public static int calcfib;
public static void main(String[] args){
calcfib = fib(5);
System.out.println(calcfib);
}
autenticacao.addStateDidChangeListener { (autenticacao, user) in
if let usuarioLogado = user {
if self.tipoString != "farmacia" {
self.performSegue(withIdentifier: "mapaSegueLogin", sender: nil)
}
}
}
@gayapedro
gayapedro / ViewController.swift
Last active July 8, 2017 19:04
Busca DB Firebase
//
// ViewController.swift
// TesteFirebase
//
// Created by Pedro Gaya on 07/07/17.
// Copyright © 2017 GayaSolutions. All rights reserved.
//
import UIKit
import FirebaseDatabase