Skip to content

Instantly share code, notes, and snippets.

@brahimmachkouri
brahimmachkouri / install_node.sh
Created February 13, 2022 18:00
Node.js installation
#!/bin/bash
# Using Ubuntu
curl -fsSL https://deb.nodesource.com/setup_17.x | sudo -E bash -
sudo apt-get install -y nodejs
@brahimmachkouri
brahimmachkouri / move_files.sh
Last active March 27, 2021 11:13
move files in subfolder to the current folder
find ./ -type f -name "*.xls" -print0 | xargs -0 -I {} mv {} ./
@brahimmachkouri
brahimmachkouri / fog-latest.sh
Last active February 14, 2022 13:32
Get the lastest version number of FogProject (or any Github Project)
#!/bin/bash
githubproject="https://github.com/FOGProject/fogproject/releases/latest/"
url=$(curl -Ls -o /dev/null -w %{url_effective} $githubproject)
version=${url##*/}
echo $version
@brahimmachkouri
brahimmachkouri / uninstall_ajenti.sh
Last active October 31, 2024 09:45
Uninstall Ajenti
#!/bin/bash
if [ "$(id -u)" != "0" ]; then
echo "This script must be run as root" 1>&2
exit 1
fi
DISTRO=
OS=
if grep 'Debian' /etc/issue > /dev/null 2>&1 ; then
@brahimmachkouri
brahimmachkouri / .bashrc
Last active October 29, 2024 08:32
To Download : wget bit.ly/my-bashrc
umask 077
EDITOR=nano
export EDITOR
HISTFILESIZE=-1
export HISTFILESIZE
alias ll='ls -laFhGH'
alias h='history'
alias cd..='cd ..'