Skip to content

Instantly share code, notes, and snippets.

View anibalardid's full-sized avatar
🏠
Working from home

Anibal anibalardid

🏠
Working from home
View GitHub Profile

remove_old_kernels.sh

#!/bin/bash
# Run this script without any param for a dry run
# Run the script with root and with exec param for removing old kernels after checking
# the list printed in the dry run

uname -a
IN_USE=$(uname -a | awk '{ print $3 }')
@anibalardid
anibalardid / git-remove-unused-local-branches.md
Created July 7, 2022 12:26
Git Remove unused local branches

Prune local tracking branches that do not exist on remote anymore

git fetch -p ; git branch -r | awk '{print $1}' | egrep -v -f /dev/fd/0 <(git branch -vv | grep origin) | awk '{print $1}' | xargs git branch -d
https://support.nordvpn.com/es/Preguntas-frecuentes/Tutoriales-de-configuraci%C3%B3n/1636892662/Instalar-y-utilizar-NordVPN-en-Debian-Ubuntu-Raspberry-Pi-Elementary-OS-y-Linux-Mint.htm
1. Descarga el cliente NordVPN Linux. Para ello, abre la terminal, escribe el siguiente comando y sigue las instrucciones que aparezcan en la pantalla:
sh <(curl -sSf https://downloads.nordcdn.com/apps/linux/install.sh)
sh <(curl -sSf https://downloads.nordcdn.com/apps/linux/install.sh) ejemplo de comando
Nota: Si no tienes un paquete curl, (en caso de que no haya funcionado el paso anterior), puedes utilizar el siguiente comando en su lugar:
sh <(wget -qO - https://downloads.nordcdn.com/apps/linux/install.sh)
@anibalardid
anibalardid / convert-heic-to-jpg.sh
Created June 23, 2022 17:33
Convert .heic to .jpg
https://linuxnightly.com/convert-heif-images-to-jpg-or-png-on-linux/
$ sudo apt install libheif-examples
$ find . -iname "*.heic" -exec heif-convert -q 100 {} {}.jpg \;
@anibalardid
anibalardid / fix-chrome-shortcuts-multimedia-sound-keys.txt
Created June 22, 2022 17:49
Chrome shortcuts media keys sound multimedia
chrome://flags/
Hardware Media Key Handling
in ENABLED
@anibalardid
anibalardid / zsh-ohmyzsh-powerlevel10k.txt
Last active May 29, 2024 15:03
zsh powerlevel10k-ohmyzsh
https://ohmyz.sh/
https://safjan.com/top-popular-zsh-plugins-on-github/
https://github.com/b4b4r07/enhancd
https://awesomerank.github.io/lists/unixorn/awesome-zsh-plugins.html
alternative to powerlevel10k: https://github.com/spaceship-prompt/spaceship-prompt
@anibalardid
anibalardid / changelog
Created November 26, 2021 19:12 — forked from dennisreimann/changelog
CHANGELOG generator
#!/usr/bin/env ruby
#
# CHANGELOG generator
#
# Usage:
#
# $ changelog [SINCE UNTIL]
#
# This script collects git commits from a given range (SINCE and UNTIL
# are optional refs, SINCE defaults to the last tag, UNTIL to HEAD).
@anibalardid
anibalardid / changelog_generator.sh
Last active December 1, 2021 18:43
CHANGELOG.md Generator for github and gitlab
#!/bin/bash
# This generator use the conventional commits:
# <type>[optional scope]: <description>
if [ -z "$1" ] || [ -z "$2" ] || [ -z "$3" ] || [ -z "$4" ] || [ -z "$5" ]
then
echo -e "ERROR: Missing Parameters\n"
echo -e "Command: \n./changelog.sh {REPOSITORY_URL} {LATEST_TAG} {PREVIOUS_TAG} {RELEASE_DATE} {VERSION}\n"
echo -e "Example: \n./changelog.sh \"http://gitlab.com/asd/asd\" \"2021-11-26\" \"v4.1.1\" \"v4.1.1\" \"v4.2.1\" \n"
exit 9999 # die with error code 9999
@anibalardid
anibalardid / changelog.sh
Created November 26, 2021 14:14 — forked from kingkool68/changelog.sh
Bash script to generate a markdown change log of GitHub pull requests between tagged releases
#!/bin/bash
# Generate a Markdown change log of pull requests from commits between two tags
# Author: Russell Heimlich
# URL: https://gist.github.com/kingkool68/09a201a35c83e43af08fcbacee5c315a
# HOW TO USE
# Copy this script to a directory under Git version control
# Make the script executable i.e. chmod +x changelog.sh
# Run it! ./changelog.sh
# Check CHANGELOG.md to see your results