Skip to content

Instantly share code, notes, and snippets.

View fulviocanducci's full-sized avatar
😁

Fúlvio fulviocanducci

😁
View GitHub Profile
@fulviocanducci
fulviocanducci / nginx-websocket-proxy.conf
Created September 6, 2024 21:32 — forked from uorat/nginx-websocket-proxy.conf
Nginx Reverse Proxy for WebSocket
upstream websocket {
server localhost:3000;
}
server {
listen 80;
server_name localhost;
access_log /var/log/nginx/websocket.access.log main;
@fulviocanducci
fulviocanducci / link.cs
Created August 3, 2023 22:42
link.cs C#
using System;
using System.Collections.Generic;
using MercadoPago.DataStructures.Preference;
using MercadoPago.Resources;
namespace consoledotNetexample
{
class MainClass
{
public static void Main(string[] args)
@fulviocanducci
fulviocanducci / GetPaymentId.cs
Created February 10, 2023 20:17 — forked from douglas-cruz/GetPaymentId.cs
Get Payment ID
using System;
using MercadoPago.Config;
using MercadoPago.Client.Payment;
using MercadoPago.Resource.Payment;
namespace TesteGetPaymentId
{
class MainClass
{
@fulviocanducci
fulviocanducci / index.tsx
Created December 12, 2022 14:37
react-hook-form + chakraui + yup + validations-br + react-input-mask
import { useForm } from 'react-hook-form'
import {
FormErrorMessage,
FormLabel,
FormControl,
Input,
Button
} from '@chakra-ui/react'
import InputMask from 'react-input-mask'
import { yupResolver } from '@hookform/resolvers/yup'
mysqldump -h <host> -u <user> -p'<password>' --databases <todos os bancos separados por espaço em branco> --ssl --skip-lock-tables > bkp.sql
Restore
mysql -h <host> -u <user> -p'<password>' --ssl < bkp.sql
version: "3.7"
volumes:
kong_data: {}
networks:
kong-net:
services:
using ExemploRawStringLiterals;
using System.Runtime.InteropServices;
Console.WriteLine("***** Testes com C# 11 | Raw String Literals *****");
Console.WriteLine($"Versao do .NET em uso: {RuntimeInformation
.FrameworkDescription} - Ambiente: {Environment.MachineName}- Kernel: {Environment
.OSVersion.VersionString}");
var pessoa1 = "{ \"Nome\": \"Renato Groffe\", \"Cidade\": \"Sao Paulo\", \"Idade\": 40 }";
Teste.ExibirConteudo(pessoa1);
@fulviocanducci
fulviocanducci / app.dockerfile
Created September 24, 2022 16:39 — forked from ChewySalmon/app.dockerfile
Laravel development docker setup using PHP 8+, Nginx, MySql 8+, PhpMyAdmin and Mailhog. Includes all relevant service Dockerfiles and the Compose file. [Imagick edition]
FROM php:8.0-fpm
RUN apt-get update && apt-get install -y \
libmagickwand-dev \
--no-install-recommends \
&& pecl install imagick \
&& docker-php-ext-enable imagick \
&& docker-php-ext-install pdo_mysql
@fulviocanducci
fulviocanducci / Dockerfile
Created September 24, 2022 16:39 — forked from ChewySalmon/Dockerfile
Laravel development Docker setup using PHP 8+, Apache, MySql 8+, PhpMyAdmin and Mailhog. Includes relevant application Dockerfile and the Compose file. [GD edition]
FROM php:8.0-apache
RUN apt-get update && apt-get install -y \
libfreetype6-dev \
libjpeg-dev \
libpng-dev \
libwebp-dev \
--no-install-recommends \
&& docker-php-ext-enable opcache \
&& docker-php-ext-configure gd --with-freetype --with-jpeg \