Skip to content

Instantly share code, notes, and snippets.

View hsmiranda's full-sized avatar
:octocat:
Coding!

Herberson Miranda hsmiranda

:octocat:
Coding!
View GitHub Profile
@hsmiranda
hsmiranda / ASimpleSOAPClient.java
Created May 26, 2020 21:09 — forked from kdelfour/ASimpleSOAPClient.java
A simple SOAP Client class to send request body to a SOAP Server. Useful when you want to test a SOAP server and you don't want to generate all SOAP client class from the WSDL.
package com.kdstudio.snippets.soap.client;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.soap.MessageFactory;
import javax.xml.soap.MimeHeaders;
### Keybase proof
I hereby claim:
* I am hsmiranda on github.
* I am vonnaturaustreve (https://keybase.io/vonnaturaustreve) on keybase.
* I have a public key ASBHN8ID80uQNjPFQkd8hCWhtlPsVF-8RqF8VzD4jOq3Cwo
To claim this, I am signing this object:
@hsmiranda
hsmiranda / README.md
Created July 27, 2023 20:08 — forked from cbuckowitz/README.md
Change Storage Location for Docker Desktop with WSL2 #DockerDesktop #WSL2

Change the Storage Location for Docker Desktop with WSL2

Docker Desktop stores docker data in 2 distros

  • docker-desktop
  • docker-desktop-data

These distros are installed on the system drive by default.

To move them to another drive, these distros can be exported, deleted and imported from the new location.

@hsmiranda
hsmiranda / ffmpeg_video_examples.sh
Created November 1, 2023 16:12 — forked from lalizita/ffmpeg_video_examples.sh
ffmpeg scripts for video processing
# Cut/Trim video
ffmpeg -ss 5 -i input.mp4 -to 10 output.mp4
# Video to gif
ffmpeg -ss 61.0 -t 2.5 -i <input> -filter_complex "[0:v] fps=12,scale=w=480:h=-1,split [a][b];[a] palettegen=stats_mode=single [p];[b][p] paletteuse=new=1" output.gif
# thumbnail
ffmpeg -i mov_bbb.mp4 -ss 00:00:03 -r 1 -s 1280x720 -f image2 thumb_mov.jpeg
#text in video
@hsmiranda
hsmiranda / PBKDF2Example.java
Last active January 3, 2024 20:11
PBKDF2Example.java
import java.security.NoSuchAlgorithmException;
import java.security.spec.InvalidKeySpecException;
import javax.crypto.SecretKeyFactory;
import javax.crypto.spec.PBEKeySpec;
import java.util.Base64;
/*
Este código usa a classe `SecretKeyFactory` para gerar um hash de senha usando o algoritmo PBKDF2 com HMAC-SHA256. O hash é gerado a partir de uma senha e um salt aleatório. O número de iterações e o comprimento da chave são definidos como 65536 e 256, respectivamente. O hash resultante é codificado em Base64 e impresso na tela.
Espero que isso ajude! Se você tiver alguma dúvida, por favor, não hesite em perguntar.
"""
31-round sha256 collision.
Not my research, just a PoC script I put together with numbers plugged in from the slide at
https://twitter.com/jedisct1/status/1772647350554464448 from FSE2024
SHA256 impl follows FIPS 180-4
https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf
"""
### Keybase proof
I hereby claim:
* I am hsmiranda on github.
* I am vonnaturaustreve (https://keybase.io/vonnaturaustreve) on keybase.
* I have a public key ASCpaDlkFFZKtK6BIZe2vh90V-66WtixkFzx2uGAsCIgtgo
To claim this, I am signing this object: