Skip to content

Instantly share code, notes, and snippets.

View gturi's full-sized avatar

Giacomo Venturini gturi

View GitHub Profile
@gturi
gturi / fedora-postgres-installation.md
Last active August 25, 2022 21:12
fedora: install postgres and display installation folder
# Install the repository RPM:
sudo dnf install -y https://download.postgresql.org/pub/repos/yum/reporpms/F-36-x86_64/pgdg-fedora-repo-latest.noarch.rpm

# Install PostgreSQL:
version=13
sudo dnf install -y postgresql$version-server

# installation folder
ls /usr/pgsql-$version/bin
@gturi
gturi / backup-saves-of-proton-steam-games.md
Last active July 31, 2022 17:48
Backup saves of steam games run via proton

Backup saves of steam games run via proton

Find the game id in games folder

Under "$HOME/.local/share/Steam/steamapps/common", locate the game folder of your interest. Usually it has a file named steam_appid.txt, which stores the identifier used by steam to create the game save folder.

If steam_appid.txt is not present in the game folder, you can still identify the game id by searching it into "$HOME/.local/share/Steam/userdata/XXXXXXXXX" directory.

XXXXXXXXX is your steam ID. There you will find one folder for each game, the folder names are the game ids.

@gturi
gturi / run-commands-on-guest-virtualbox-vm.md
Last active February 27, 2021 20:00
run command on guest virtualbox virtual machine

run command on guest virtualbox virtual machine

VM="windows64" # name of the virtual machine
USER=user # username used to login in the virtual machine
PSW=password # password used to login in the virtual machine 
CMD="C:\\absolute\\path\\to\\command"

VBoxManage guestcontrol "$VM" --username "$USER" --password "$PSW" run --exe "$CMD"
@gturi
gturi / README.md
Last active February 28, 2021 20:25
Add Windows To Go entry to grub 2

Add Windows To Go entry to grub 2

Mount the external drive and take note of its hints_string and uuid (change MEDIA_LABEL value with the name of the external drive):

MEDIA_MOUNTPOINT="/media/$USER/"
MEDIA_LABEL=ESD-ISO
WINDOWS_BOOT=/EFI/Microsoft/Boot/bootmgfw.efi

sudo grub-probe --target=hints_string ${MEDIA_MOUNTPOINT}${MEDIA_LABEL}${WINDOWS_BOOT}
@gturi
gturi / manage-jvm-cacerts.md
Created January 19, 2021 21:20
add and remove jvm cacerts

Manage jvm cacerts

Add certificate

#!/bin/bash


JAVA_FOLDER='/opt/jdk1.8.0_271' # TODO change according to your system

show busy ports

netstat -anb > %HOMEPATH%\Desktop\busy-ports.txt

Windows: hide infoformation on a file using ADS

To hide information in a file run: notepad file-name:ADS-name

Example with this file: notepad hidden_info_on_file.txt:hiddeninfo

Re-run the command to show the hidden information.

Note: Alternate Data Stream (ADS) is supported only on NTFS file system. If the file is copied or moved to a different file system, such as FAT32,

Windows: display known wi-fi passwords

  • open cmd
  • display all known wifi profiles running netsh wlan show profiles
  • display password of a profile running netsh wlan show profile name=profilename key=clear

How to make an bootable USB drive

  • Copy all the files that is inside the usbXXXXXX.zip or on the CD onto an usb drive, directly on the drive, not inside any directory/folder.
  • It is OK if there are other files on the USB drive from before, they will not be removed.
  • To install bootloader on the USB drive, open a windows command prompt (if possible run it as administrator) and run X:syslinux.exe -ma X:
    • Replace X with the drive letter of the USB drive (DO NOT USE C:)
  • If it seems like nothing happened, it is usually done.
  • A file named ldlinux.sys may appear on the USB drive, that is normal.
  • The drive should now be bootable.
  • Please know that getting some computers to boot from USB is worse than from CD, you may have to change settings, or some will not simply work at all.