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
#!/usr/bin/perl | |
use strict; | |
use Net::SSH::Perl; | |
use POSIX qw(strftime); | |
use Sys::Syslog qw(:DEFAULT setlogsock); | |
# Variables à configurer | |
my $user = "admin"; # Nom d'utilisateur | |
my $pass = ""; # Mot de passe |
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 | |
function getIP() { | |
IFACE=$1 | |
IFCFG=$(/sbin/ifconfig ${IFACE} 2>&1 | /bin/grep "inet " ) | |
if [ $? -eq 0 ]; then | |
IP=$(echo ${IFCFG} | sed -r -e 's#\s*inet ([^ ]*).*#\1#;s/addr://') | |
else | |
IP="Not connected" | |
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
// ==UserScript== | |
// @name MyT411 | |
// @description Script pour personnaliser T411 | |
// @namespace www.t411.ai | |
// @version 18 | |
// @grant none | |
// @icon http://s3.amazonaws.com/uso_ss/icon/154715/large.png | |
// @match http://www.t411.ai/* | |
// @match https://www.t411.ai/* |
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 | |
# Ce script pour NetworkManager permet d'éteindre le wifi quand un cable est branché et inversement | |
# Copyright 2016-2017 David OLIVIER <[email protected]> | |
# | |
export LC_ALL=C | |
TMP=$(nmcli -t --fields type,state dev | grep -E "ethernet:connected") | |
if $? -eq 0; then | |
nmcli radio wifi off |
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
#!/usr/bin/bash | |
MYSQL_USER='' # Nom d'utilisateur pour MySQL | |
MYSQL_PWD='' # Password pour MySQL | |
DIST_USER='' # Nom d'utilisateur pour la connexion SSH au serveur de backup | |
DIST_SRV='' # Adresse ou non du serveur de backup | |
DIST_REP='' # Répertoire où envoyer le fichier sur le serveur de backup | |
RETDAY='7' # Nombre de jour avant suppression du fichier en local | |
LOG_FILE='/var/log/backup.log' # Fichier contenant les logs du backup |
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
#!/usr/bin/bash | |
# t411 key | |
KEY="******" | |
HOST="myhost.example:9091" # Transmission daemon host | |
AUTH=0 # Authentification to transmission-daemon ? 1 = True | |
TDUSER="" | |
TDPASS="" |