Skip to content

Instantly share code, notes, and snippets.

View ennanco's full-sized avatar

Enrique Fernandez-Blanco ennanco

View GitHub Profile
@ennanco
ennanco / Dotfiles_backup.md
Last active April 4, 2025 07:21
Managing the dotfiles with style (git bare repo) 😎

I have recently come accross with a new solution to one of my biggest headaches in any linux system and it is to manage the nightmareof the dot files. I have previously used stow in order to mantain the symbolic links, but there is a much better solution using git bare repositories.

1. Creating the repository

  1. Create a git bare repository with the following line
    mkdir $HOME/.cfg
    git init --bare $HOME/.cfg
  1. Create an alias for a better managing of the configuration
@ennanco
ennanco / SwapSize.md
Last active September 19, 2022 15:40
Change the size of the swap in Linux

When I am performing a Deep Learning training, one problem that I have from time to time due to size of the datasets and architectures is running out of memory on my desktop pc. In Linux you can solve this on the fly, you have only to write the following commands on a terminal. The following bash commands should made the trick to set a 32Gbytes swapfile on that session.

  sudo swapoff -a
  fallocate -l 32G /swapfile
  sudo mkswap /swapfile
  sudo swapon /swapfile