Skip to content

Instantly share code, notes, and snippets.

View athamour1's full-sized avatar
😅
Trying to keep up

Thanos Mourtzoukos athamour1

😅
Trying to keep up
View GitHub Profile
# Use powerline
USE_POWERLINE="true"
# Source manjaro-zsh-configuration
if [[ -e /usr/share/zsh/manjaro-zsh-config ]]; then
source /usr/share/zsh/manjaro-zsh-config
fi
# Use manjaro zsh prompt
if [[ -e /usr/share/zsh/manjaro-zsh-prompt ]]; then
source /usr/share/zsh/manjaro-zsh-prompt
fi
@athamour1
athamour1 / gist:92a2f52086bdbd6c7f8ddc28a086badd
Created March 15, 2023 11:07
Bash script extract for all filetypes
# to work with this you have to install the apropriate packages for archives like tar, unrar, bunzip2, gunzip, unzip, uncompress and 7z
ex () {
if [ -f $1 ] ; then
case $1 in
*.tar.bz2) tar xjf $1 ;;
*.tar.gz) tar xzf $1 ;;
*.bz2) bunzip2 $1 ;;
*.rar) unrar x $1 ;;
*.gz) gunzip $1 ;;
@athamour1
athamour1 / bash-script-extract-for-all-filetypes.md
Created March 15, 2023 11:10
Bash script extract for all filetypes

to work with this you have to install the apropriate packages for archives like tar, unrar, bunzip2, gunzip, unzip, uncompress and 7z

ex () {
  if [ -f $1 ] ; then
    case $1 in
      *.tar.bz2)   tar xjf $1   ;;
      *.tar.gz)    tar xzf $1   ;;
      *.bz2)       bunzip2 $1   ;;
 *.rar) unrar x $1 ;;
@athamour1
athamour1 / bash
Created November 22, 2023 11:25
Upgrade RHEL 7.9 to 8.9 bash script
#!/bin/bash
# Register the system (if not already done)
# subscription-manager register --username YOUR_USERNAME --password YOUR_PASSWORD
# Verify the system subscription
subscription-manager status
# Enable necessary repositories
subscription-manager repos --enable rhel-7-server-rpms