This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
umask 077 | |
EDITOR=nano | |
export EDITOR | |
HISTFILESIZE=-1 | |
export HISTFILESIZE | |
alias ll='ls -laFhGH' | |
alias h='history' | |
alias cd..='cd ..' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
githubproject="https://github.com/FOGProject/fogproject/releases/latest/" | |
url=$(curl -Ls -o /dev/null -w %{url_effective} $githubproject) | |
version=${url##*/} | |
echo $version |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find ./ -type f -name "*.xls" -print0 | xargs -0 -I {} mv {} ./ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Using Ubuntu | |
curl -fsSL https://deb.nodesource.com/setup_17.x | sudo -E bash - | |
sudo apt-get install -y nodejs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 5000 -nodes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Ajoute une config SSH pour une connexion simplifiée : | |
# ssh <NOM_VM_MULTIPASS> | |
# Vérifie si un argument a été passé au script (le nom de l'instance) | |
if [ $# -eq 0 ]; then | |
echo "I need the instance name :" | |
multipass ls # Liste toutes les instances disponibles pour aider l'utilisateur à choisir | |
exit 1 # Sort du script si aucun nom d'instance n'est fourni | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- name: ilovenode | |
hosts: dev | |
become: yes | |
gather_facts: no | |
tasks: | |
- name: Run the equivalent of "apt-get update" as a separate step | |
apt: | |
update_cache: yes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name front_matter_block_github_blog | |
// @namespace brahimmachkouri | |
// @version 0.1 | |
// @description Paste the "Front Matter" block for Github blogs : go in the edit post and CTRL-V | |
// @author Brahim Machkouri | |
// @include https://github.com/*/new/main/_posts | |
// @grant GM_setClipboard | |
// @match none | |
// ==/UserScript== |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
githubproject="https://github.com/fusioninventory/fusioninventory-for-glpi/releases/latest/" | |
url=$(curl -Ls -o /dev/null -w %{url_effective} $githubproject) | |
version=${url##*/} | |
tag=${version:4} | |
wget https://github.com/fusioninventory/fusioninventory-for-glpi/releases/download/$version/fusioninventory-$tag.tar.bz2 | |
glpi_install=$(find /var -type f -name glpicrypt.key | sed -E 's/\/config\/glpicrypt\.key//') | |
tar xvf fusioninventory-$tag.tar.bz2 -C "$glpi_install/plugins/" | |
chown -R www-data:www-data "$glpi_install/plugins/fusioninventory" | |
rm fusioninventory-$tag.tar.bz2 |
OlderNewer