Skip to content

Instantly share code, notes, and snippets.

View goncalor's full-sized avatar

Gonçalo Ribeiro goncalor

View GitHub Profile
# split panes
bind - split-window -v -c "#{pane_current_path}"
bind _ split-window -h -c "#{pane_current_path}"
# create window
bind c new-window -c "#{pane_current_path}"
# switch panes
bind -n M-h select-pane -L
bind -n M-j select-pane -D
@goncalor
goncalor / kobo-manga.adoc
Last active February 17, 2026 12:26
Notes on reading manga on Kobo

Reading manga on Kobo

The .cbX formats

I like to use the .cbz format to read manga because it’s very simple. It’s just a .zip file containing the images for the manga pages with its extension changed to .cbz . (There’s also .cb7 and .cbr that use 7z or RAR archives.) Images are read in alphabetical file name order by the e-reader and displayed on screen. That’s just it.

@goncalor
goncalor / abcde.Containerfile
Last active December 6, 2025 20:09
Podman Containerfile to install abcde with MusicBrainz support
# run as:
# podman run --rm -ti --mount=type=bind,src=$HOME/.abcde.conf,dst=/root/.abcde.conf --device=/dev/sr0 goncalor/abcde
FROM alpine AS musicbrainz-build
RUN apk --no-cache add git build-base pkgconf libdiscid-dev perl-utils perl-dev
RUN git clone --depth=1 https://github.com/goncalor/perl-musicbrainz-discid
WORKDIR perl-musicbrainz-discid
RUN perl Makefile.PL
FROM alpine
WORKDIR /app
RUN adduser -h /app -D user
RUN apk add tinyssh ucspi-tcp6
USER user
RUN tinysshd-makekey ./sshkeydir
# create a disk
vboxmanage createmedium --filename <name>.vmdk --size=512 --variant=<Standard|Fixed|Stream|...> --format=VMDK
# Standard is the default disk image type, which has a dynamically allocated file size.
# Fixed uses a disk image that has a fixed file size.
# Stream optimizes the disk image for downloading. This value is valid for VMDK disk images only.
# create raw disk image
sudo vboxmanage createmedium --filename=<name>.vmdk --variant=RawDisk --format=VMDK --property=RawDrive=/dev/sXY
sudo chown <user>:<user> <name>.vmdk
sudo chown root:<user> /dev/sXY
@goncalor
goncalor / Cargo.toml
Last active May 3, 2025 13:05
Sequoia symmetric encryption example
[package]
name = "sequoia-test"
version = "0.1.0"
edition = "2021"
[[bin]]
name = "sequoia-test-password"
path = "password.rs"
[[bin]]
@goncalor
goncalor / atmega328pb.markdown
Last active April 24, 2025 12:04
How to add support for ATmega328PB to avr-gcc and avrdude

Adding support for ATmega328PB to avr-gcc and avrdude

avr-gcc

  1. Download ATmega's support pack from Microchip's website
  2. Unzip the relevant files

unzip -j Atmel.ATmega_DFP.x.y.zzz.atpack \

@goncalor
goncalor / cron-like-systemd.md
Last active July 7, 2024 00:16
cron-like systemd unit notes

cron-like systemd unit

  1. Create myunit.service. Only [Service] is needed, with an ExecStart=

  2. Create myunit.timer. It needs [Timer] with an OnCalendar= or similar. It needs [Install] with WantedBy=timers.target

  3. Enable both units. The .service unit will issue a warning due to missing [Install]. This is not a problem

     systemctl --user enable $PWD/myunit.service
     systemctl --user enable $PWD/myunit.timer
    
@goncalor
goncalor / README.md
Last active April 22, 2024 15:02
MSMQ Nmap service probe

MSMQ Nmap service probe

⚠️ Disclaimer: testing of this probe is limited and the MSMQ protocol is proprietary and undocumented. Use this probe at your own risk. ⚠️

Nmap currently has no way to detect whether the service running on TCP port 1801 is [Microsoft Message Queuing (MSMQ)][wikipedia_msmq]. The file msmq-service-probe here has been developed to give Nmap the capability to detect MSMQ. The objective is to help identify assets with MSMQ exposed, that may be vulnerable to [CVE-2023-21554][nist_cve_2023_21554], aka QueueJumper.

This works by sending a MSMQ packet to port 1801 and checking if the response matches an expected fingerprint.

You can run this probe as follows:

@goncalor
goncalor / xposed.markdown
Last active December 12, 2023 14:15
How to install Xposed and JustTrustMe in a VM to defeat certificate pinning

Installing Xposed & JustTrustMe in a VM

Prerequisites

  • [Download][android_x86] an x86 Android image (32 bits)
  • [Download][xda_xposed] the XposedInstaller APK (see at bottom of original post)
  • [Download][xposed_zip] the Xposed framework for SDK27 (Android 8.1)