Skip to content

Instantly share code, notes, and snippets.

View Alextrapixel's full-sized avatar
🤓
Focusing

Alextra Pixel Alextrapixel

🤓
Focusing
View GitHub Profile
@Alextrapixel
Alextrapixel / restore_postgresql.md
Created September 13, 2025 13:35
Restore PostgreSQL database that backed-up using pgadmin4

If you have a .backup file from pgAdmin4, then it can be restored using pg_restore.

Use this command to restore : pg_restore -h <your_db_host> -U <your_db_user> -d <your_db_name> /backup/mydb.backup

This is the example of using the command: pg_restore -h 172.17.0.1 -U postgres -d mydb /backup/mydb.backup

You can get your host IP using this : hostname -I

@Alextrapixel
Alextrapixel / x86_in_arm64.md
Created September 12, 2025 15:10
Deploy x86 docker image in ARM64

Run this docker image :

docker run --rm --privileged --platform linux/arm64 tonistiigi/binfmt --install qemu-x86_64

Or you can install all architecture with all :

docker run --rm --privileged --platform linux/arm64 tonistiigi/binfmt --install all

Another alternative image is linuxserver/qemu-static

@Alextrapixel
Alextrapixel / mysql_show_as_array.md
Created September 12, 2025 13:27
Show column as array in mysql

If your table has:

name small big
apple 10 20
banana 5 15

We can make this query:

SELECT 
 name,
@Alextrapixel
Alextrapixel / pc_steam_to_wine_mac.md
Created August 2, 2025 13:58
Transferring PC Steam game to MacOS Wine Steam game

I’m using Heroic Game Launcher on my MacBook, but I think it should work in Crossover too.

Here’s how you can do it:

  1. From your PC Steam, go to your game library and select the game you want to transfer to your Mac.
  2. Open Manage -> Browse local files.
  3. Copy the game folder to your external drive.
  4. Next, copy appmanifest_[App_ID].acf. This file can be found in Program Files (x86)/Steam/steamapps/[here].
@Alextrapixel
Alextrapixel / dist-upgrade-buster-to-bookworm.sh
Created May 4, 2024 07:07 — forked from rrottmann/dist-upgrade-buster-to-bookworm.sh
Dist-Upgrade Debian 10 Buster to Debian 12 Bookworm
# Dist-Upgrade Debian 10 Buster to Debian 12 Bookworm
# Debian 10
apt-get -y update
apt-get -y upgrade
apt-get -y full-upgrade
cat > /etc/apt/sources.list <<"EOF"
deb http://deb.debian.org/debian/ bullseye main
deb-src http://deb.debian.org/debian/ bullseye main
deb http://security.debian.org/debian-security stable-security/updates main
@Alextrapixel
Alextrapixel / wireguard_cloudflare_warp.md
Created March 24, 2023 06:26
Cloudflare Warp 1.1.1.1 tunel VPN with wireguard. Can be used for Raspberry Pi 4 and other arm based PC.

Notice : This instruction will used unofficial CLI for Cloudflare Warp

If you have an arm based PC like Raspberry Pi, OrangePi, etc and need to use cloudflare warp 1.1.1.1 service, currently there is no warp package for arm arch. Here I'll show how to use warp with unofficial CLI for CLoudflare Warp called wgcf and wireguard package as open-source VPN tunnel software.

Download Package

wgcf

get wgcf here => https://github.com/ViRb3/wgcf/releases

wireguard

ubuntu/debian => apt install wireguard

@Alextrapixel
Alextrapixel / private_fork.md
Created March 22, 2023 15:01 — forked from 0xjac/private_fork.md
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare git@github.com:usi-systems/easytrace.git