Skip to content

Instantly share code, notes, and snippets.

View juliozuppa's full-sized avatar

Julio Cesar Zuppa juliozuppa

  • Curitiba, PR, Brasil
View GitHub Profile
@dalegaspi
dalegaspi / ConvertHttpMethodFilter.java
Created April 22, 2021 23:11
Custom Spring Cloud Gateway to change HTTP Method In Flight
package yeet;
import org.springframework.cloud.gateway.filter.factory.AbstractGatewayFilterFactory;
import lombok.extern.slf4j.Slf4j;
import org.springframework.cloud.gateway.filter.GatewayFilter;
import org.springframework.http.HttpMethod;
import org.springframework.stereotype.Component;
import java.util.Arrays;
import java.util.List;
@isluewell
isluewell / AppName.php
Last active October 15, 2024 19:08
[6.0] Command app:name
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Illuminate\Support\Composer;
use Symfony\Component\Finder\Finder;
use Illuminate\Filesystem\Filesystem;
use Symfony\Component\Console\Input\InputArgument;
@Splode
Splode / Laravel-Scheduler-Windows.md
Last active July 11, 2025 08:06
Laravel Scheduler on Windows

Run Laravel Scheduled Tasks on Windows

The following are instructions for running scheduled tasks defined in a Laravel project on Windows. The Laravel documentation provides instructions for running scheduled tasks using cron jobs on Linux systems. However, cron jobs are not available on Windows. The built-in Windows Task Scheduler can be used to run scheduled tasks instead.

Create a Scheduled Task

  1. Open Task Scheduler
  2. Select Create Task...
  3. Give the task a name and description
  4. To run the task in the background, select Run whether the user is logged on or not and check the Hidden checkbox.
@carlosanders
carlosanders / git-bash-and-cmder-in-intelliJ.md
Last active February 15, 2024 12:37
Configurar Git bash e Cmader dentro IntelliJ do Windows

Execute o git-bash no IntelliJ do Windows

  • Nas configurações/settings (Ctrl+Alt+S) e digite Terminal no IntelliJ.
  • No campo shell path use "C:\Program Files\Git\bin\sh.exe" --login -icomo o caminho do Shell. As aspas duplas são intencionais, pois neutralizam as aspas duplas ausentes na variável de ambiente.

Execute o cmder dentro do IntelliJ do Windows

  • Defina uma variável de ambiente chamada CMDER_ROOTpara sua pasta raiz do Cmder (no meu caso C:\Apps\cmder).
  • Nas configurações/settings (Ctrl+Alt+S) e digite Terminal no IntelliJ.
  • No campo shel path use "cmd" /k ""%CMDER_ROOT%\vendor\init.bat""como o caminho do Shell. As aspas duplas são intencionais, pois neutralizam as aspas duplas ausentes na variável de ambiente.
@krisleech
krisleech / renew-gpgkey.md
Last active June 20, 2025 07:25
Renew Expired GPG key

Renew GPG key

Given that your key has expired.

$ gpg --list-keys
$ gpg --edit-key KEYID

Use the expire command to set a new expire date:

@mig1098
mig1098 / javascript_unicode.html
Last active February 23, 2025 18:49
javascript unicode accents
Question: Can I display accented characters or ligatures as part of JavaScript output?
Answer: You can include accented characters and ligatures in JavaScript strings and/or display them on your HTML pages using the following encodings for the letters:
hexadecimal codes \xXX in JavaScript strings; e.g. ñ is \xF1
Unicode hex codes \uXXXX in JavaScript strings; e.g. š is \u0161
HTML entities; for example, ñ is &ntilde; and š is &scaron;
numeric HTML entities; e.g. ñ is &#241; and š is &#353;
unescape with a suitable argument; e.g. ñ is unescape('%F1')
decodeURI with a suitable argument; e.g. ñ is decodeURI('%C3%B1')
##
## How to install mcrypt in php7.2 / php7.3
## Linux / MacOS / OSX
##
## https://lukasmestan.com/install-mcrypt-extension-in-php7-2/
#

How to read and write excel files in Java using Apache POI

Maven Dependency

<!-- https://mvnrepository.com/artifact/org.apache.poi/poi -->
<dependency>
    <groupId>org.apache.poi</groupId>
    <artifactId>poi</artifactId>
    <version>3.17</version>
</dependency>
@rgiaviti
rgiaviti / UnidadeFederacao.java
Last active June 1, 2025 05:12
Enum Java com todas as Unidades da Federação do Brasil
/**
* Enum com todas as Unidades da Federação do Brasil. Contém o nome da Unidade, a sigla e a capital
* da Unidade da Federação. As unidades estão listadas por ordem alfabética no enum.
*
* @author Ricardo Giaviti
* @version 1.1.1
* @since 1.0.0
*/
public enum UnidadeFederacao {
#!/bin/bash
###########################
####### LOAD CONFIG #######
###########################
while [ $# -gt 0 ]; do
case $1 in
-c)
if [ -r "$2" ]; then