Skip to content

Instantly share code, notes, and snippets.

Hugo Freire hfreire

Block or report user

Report or block hfreire

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@hfreire
hfreire / brute_forcing_imap_passwords.md
Created May 10, 2019
Brute forcing IMAP passwords
View brute_forcing_imap_passwords.md
nmap -p143,993 --script imap-brute localhost
@hfreire
hfreire / ban_unban_ip_fail2ban.md
Last active May 10, 2019
Ban/unban an IP address from Fail2ban
View ban_unban_ip_fail2ban.md

Ban IP address 1.1.1.1 jailed within ssh

fail2ban-client set dovecot banip 1.1.1.1

Unban IP address 1.1.1.1 jailed within ssh

fail2ban-client set dovecot unbanip 1.1.1.1
@hfreire
hfreire / base64uuid.java
Created May 8, 2019
A Base64 UUID encoder/decoder optimised for encoding and decoding UUID hashes in only 22 characters (instead of 36)
View base64uuid.java
import java.nio.ByteBuffer;
import java.util.Base64;
import java.util.UUID;
public class base64uuid {
private static final Base64.Encoder BASE64_URL_ENCODER = Base64.getUrlEncoder().withoutPadding();
public static void main(String[] args) {
try {
if (args.length < 2) {
@hfreire
hfreire / shrink_ext3_partition.md
Last active Jan 19, 2019
Shrink an ext3 partition on a SD card in OSX
View shrink_ext3_partition.md
Unmount disk
sudo diskutil unmount /dev/disk2
Check partition status
sudo e2fsck -f /dev/disk2s3
@hfreire
hfreire / generate_secure_password.sh
Last active Jul 11, 2019
Generate a secure 32 char password with user random seed
View generate_secure_password.sh
apg -n 1 -MCLN -m 32 -s
@hfreire
hfreire / git_commit_12_hours_ago.sh
Created Jan 19, 2019
Do a git commit 12 hours ago
View git_commit_12_hours_ago.sh
GIT_AUTHOR_DATE=$(date -v '-12H' '+%a %h %d %H:%M:%S %Y %z') \
GIT_COMMITTER_DATE=$(date -v '-12H' '+%a %h %d %H:%M:%S %Y %z') \
git commit -am "feat: better late than ever"
@hfreire
hfreire / wakeonlan_qnap_nas.sh
Last active Jan 19, 2019
Wake-on-LAN (WoL) QNAP NAS from OSX
View wakeonlan_qnap_nas.sh
curl -O https://raw.githubusercontent.com/jpoliv/wakeonlan/master/wakeonlan
perl wakeonlan 24:5E:BE:00:00:00
@hfreire
hfreire / limego-consent-all.js
Created Nov 2, 2018
🎃 Hack 🤘 to consent ✉️ e-mail and data processing for 🤷🏼‍♂️ contact persons in 📚 Lime Go CRM https://www.lime-go.se
View limego-consent-all.js
View keybase.md

Keybase proof

I hereby claim:

  • I am hfreire on github.
  • I am hfreire (https://keybase.io/hfreire) on keybase.
  • I have a public key ASD91X_VarQXA8-IS0qsaLzI6pLM8ao2kbWpwZn4eCNPpgo

To claim this, I am signing this object:

@hfreire
hfreire / load_test_aftonbladet.sh
Last active Aug 22, 2018
HTTP load testing with Vegeta
View load_test_aftonbladet.sh
# Load test Aftonbladet's website with HTTP GET requests and show error report
echo "GET https://www.aftonbladet.se" | vegeta attack -duration=60s | tee results.bin | vegeta report
You can’t perform that action at this time.