Skip to content

Instantly share code, notes, and snippets.

View ApenasGabs's full-sized avatar
👽

Gabriel Rodrigues ApenasGabs

👽
View GitHub Profile
@ApenasGabs
ApenasGabs / application.properties
Last active March 25, 2024 17:41
application.properties
spring.jpa.hibernate.ddl-auto=update
spring.jpa.database=mysql
spring.datasource.url=jdbc:mysql://localhost/db_personal_blog?createDatabaseIfNotExist=true&serverTimezone=America/Sao_Paulo&useSSl=false
spring.datasource.username=root
spring.datasource.password=yourpasswd
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.jpa.show-sql=true
spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQLDialect
import { useState } from "react";
import Cookies from "js-cookie";
const getToken = (): string | null => {
const userToken = Cookies.get("token");
return userToken ? userToken : null;
};
const useToken = () => {
const [token, setToken] = useState<string | null>(getToken());
@ApenasGabs
ApenasGabs / exe3.cs
Created July 20, 2023 20:15
exe3.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace Class2
{
class Expression { }
@ApenasGabs
ApenasGabs / script-eduardo.ps1
Last active May 24, 2023 18:12
Script config vm azure
New-Item "C:\DadosApp" -itemType Directory
Set-ExecutionPolicy AllSigned
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
choco install dotnet-6.0-sdk -y
choco install git -y
netsh advfirewall set allprofiles state off
cd C:\DadosApp
git clone https://gitlab.ic.unicamp.br/msft/appweb.git
cd C:\DadosApp\appweb
int main()
{
int i, x, existe, count = 0;
printf("Quantos elementos você deseja ? ");
scanf("%i", &x);
int val[x];
for (i=0;i<x;i++){
// DHT Temperature & Humidity Sensor
// Unified Sensor Library Example
// Written by Tony DiCola for Adafruit Industries
// Released under an MIT license.
// REQUIRES the following Arduino libraries:
// - DHT Sensor Library: https://github.com/adafruit/DHT-sensor-library
// - Adafruit Unified Sensor Lib: https://github.com/adafruit/Adafruit_Sensor
#include <Adafruit_Sensor.h>
// Example testing sketch for various DHT humidity/temperature sensors
// Written by ladyada, public domain
// REQUIRES the following Arduino libraries:
// - DHT Sensor Library: https://github.com/adafruit/DHT-sensor-library
// - Adafruit Unified Sensor Lib: https://github.com/adafruit/Adafruit_Sensor
#include "DHT.h"
#define DHTPIN 2 // Digital pin connected to the DHT sensor