Skip to content

Instantly share code, notes, and snippets.

git reflog
git reset --hard HEAD@{X}
@adriaPerez
adriaPerez / gitlab_github_fork.md
Last active February 17, 2025 13:17
Forking Git repository from GitHub to GitLab
@adriaPerez
adriaPerez / hide-recent-gnome-tab.md
Last active November 24, 2018 12:20
Hide the recent

1- Disable the this feature by going into the Gnome Settings > Privacy > Usage & history.

2- Edit the ~/.config/gtk-3.0/settings.ini file by adding: gtk-recent-files-enabled=0 as shoen in the official documentation. If the file doesn't exist you can create it:

[Settings]
# ...
gtk-recent-files-enabled=0

3- Log out and log back in for the changes to apply.

@adriaPerez
adriaPerez / setup-pass.md
Last active November 24, 2018 12:45
Setup pass storage and remote git sync

Setup pass with git

  1. Install pass utility

    sudo pacman -S pass
  2. Create a GPG key using the default RSA also (if not yet created)

gpg --full-gen-key

# Remove archived journal files until the disk space they use falls below 100M
sudo journalctl --vacuum-size=100M
# Make all journal files contain no data older than 2 weeks
sudo journalctl --vacuum-time=2weeks
043f7bbbbe5b2aa8af7930d01a6b574b96098105ee24bb607a854323c3beb5dbd3e77ffaaee92877bea261277d725b908783b08fa3a9e32ed6885b353222197b9f;nortss
@adriaPerez
adriaPerez / rebase-project-commits
Last active October 31, 2016 12:22
Rebase commits with incorrect creator data
#!/bin/sh
git filter-branch -f --env-filter '
OLD_EMAIL="[email protected]"
CORRECT_NAME="Your Correct Name"
CORRECT_EMAIL="[email protected]"
if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ]
then

Keybase proof

I hereby claim:

  • I am adriaPerez on github.
  • I am adriaperez (https://keybase.io/adriaperez) on keybase.
  • I have a public key whose fingerprint is A8FF 09FB 0E5C 2464 3CC7 3668 E2BC 47F8 214A EC6D

To claim this, I am signing this object:

@adriaPerez
adriaPerez / git-profile.sh
Created October 27, 2016 15:03
Change multiple git configurations
#!/bin/bash -l
#$ -S /bin/bash
#$ -N $1
if [ $1 = "github" ]
then
echo "Github profile activated!"
git config --global user.name "USERNAME"
git config --global user.email "EMAIL"
elif [ $1 = "gitlab" ]
@adriaPerez
adriaPerez / arch.md
Last active April 1, 2021 09:14
ArchLinux installation

Arch Linux
Intel® Core™ i7-4790K 4.0Ghz
2x8GB DDR3 1866 PC3-14900
GeForce GTX 970/PCIe/SSE2
MSI Z97 Gaming 5

  1. Download the iso from the Archlinux Oficial Download Page.
  2. Make sure the checksum of the downloaded iso is the same that the previous download page says: