Skip to content

Instantly share code, notes, and snippets.

View juniobiel's full-sized avatar
:bowtie:
Doing amazing things

Gabriel Júnio juniobiel

:bowtie:
Doing amazing things
View GitHub Profile
@juniobiel
juniobiel / Filtragem_Digital.ino
Last active September 23, 2025 20:50
Filtragem em sensores e instrumentos eletrônicos
// DAQ_Uno_Filtro_Calculo.ino
#define PINO A0
// Configuração da taxa de amostragem
const float fs = 10.0; // Hz
const unsigned long PERIODO_US = 1000000UL / (unsigned long)fs;
// Configuração do filtro
const float fc = 1.00; // frequência de corte (Hz)
const float Q = 0.7071; // fator de qualidade
@juniobiel
juniobiel / QuickSort.c
Created September 22, 2025 17:23
QuickSort em linguagem C
#include <stdio.h>
// Função auxiliar para trocar dois elementos
void swap(int* a, int* b) {
int t = *a;
*a = *b;
*b = t;
}
// Função para imprimir a lista
@juniobiel
juniobiel / InsertionSort.c
Created September 22, 2025 16:26
InsertionSort em linguagem C
#include <stdio.h>
void printArray(int arr[], int size) {
for (int i = 0; i < size; i++) {
printf("%d ", arr[i]);
}
printf("\n");
}
void insertionSort(int arr[], int size) {
@juniobiel
juniobiel / SelectionSort.c
Created September 22, 2025 15:57
Selection Sort em C
#include <stdio.h>
// Função para imprimir a lista
void printList(int arr[], int size) {
for (int i = 0; i < size; i++) {
printf("%d ", arr[i]);
}
printf("\n");
}
@juniobiel
juniobiel / PlayerController.cs
Created July 21, 2025 21:33
Controlador do jogador para movimentação por meio de Joystick na Unity
// ------------------------------------------------------------------------------
// PlayerController.cs
// Autor: Gabriel Torres
// Data: 24/06/2025
// Descrição: Controlador do jogador para movimentação horizontal em 2D.
// ------------------------------------------------------------------------------
using Assets._Project.Code.Settings;
using UnityEngine;
using UnityEngine.InputSystem;
@juniobiel
juniobiel / SAM-AWS.yml
Last active March 7, 2024 13:12
AWS SAM TEMPLATE
Transform: AWS::Serverless-2016-10-31
Description: SAM notes application api
Parameters:
apiBucket:
Type: String
Default: '[apiBucket]'
tableName:
Type: String
Default: Notes
@juniobiel
juniobiel / InstanceUserData.sh
Created February 1, 2024 15:52
AWS Instance User Data
#!/bin/bash
# install httpd (linux 2 version)
yum update -y
yum install -y httpd
systemctl start httpd
systemctl enable httpd
echo "<h1>Hello World from $(hostname -f)</h1>"> /var/www/html/index.html
#!/bin/bash
@juniobiel
juniobiel / IdentityPortugueseMessages.cs
Created October 14, 2022 18:41 — forked from pedrobarbiero/IdentityPortugueseMessages.cs
Mensagens de erro do Identity Core em português
using Microsoft.AspNetCore.Identity;
namespace WebApi.Extensions
{
public class IdentityPortugueseMessages: IdentityErrorDescriber
{
public override IdentityError DefaultError() { return new IdentityError { Code = nameof(DefaultError), Description = $"Um erro desconhecido ocorreu." }; }
public override IdentityError ConcurrencyFailure() { return new IdentityError { Code = nameof(ConcurrencyFailure), Description = "Falha de concorrência otimista, o objeto foi modificado." }; }
public override IdentityError PasswordMismatch() { return new IdentityError { Code = nameof(PasswordMismatch), Description = "Senha incorreta." }; }
public override IdentityError InvalidToken() { return new IdentityError { Code = nameof(InvalidToken), Description = "Token inválido." }; }