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/sh | |
# Simple Twitter backup script | |
date=$(date +'%Y-%m-%d') | |
t timeline @benpro82 --csv --number 3000 > tweets-$date.csv | |
t retweets --csv --number 3000 > retweets-$date.csv | |
t favorites --csv --number 3000 > favorites-$date.csv | |
t direct_messages --csv --number 3000 > dm_received-$date.csv | |
t direct_messages_sent --csv --number 3000 > dm_sent-$date.csv |
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
for i in $(mailq | grep -Eo [A-F0-9]{10} | tr -s '\n' ' '); do postcat -q $i | grep userid | grep -Eo "[0-9]{4,}" >> tmp/userid; done | |
sort -n /tmp/userid | uniq |
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/sh | |
[email protected] | |
subject="Warning: Temperature critical" | |
critical=50 | |
temperature=$(sensors -u coretemp-isa-0000 | grep temp2_input | grep -Eo "[0-9.]{2,}") | |
calc=$(echo "$temperature >= $critical" | bc) | |
if (( $calc )); then | |
echo -e "Attention, la température du processeur de la machine samba a dépassé le seuil\nde $critical °C ! Elle est actuellement de $temperature °C.\n\nVérifiez la climatisation de la salle serveur." | mail -s "$subject" "$mailto" | |
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
tar -cavf BENPRO_USB_BTS_LP.tar.lzo BENPRO_USB 1,17s user 1,31s system 36% cpu 6,817 total | |
440M 25 mars 19:37 BENPRO_USB_BTS_LP.tar.lzo | |
tar -cavf BENPRO_USB_BTS_LP.tar.gz BENPRO_USB 26,02s user 1,41s system 95% cpu 28,826 total | |
401M 25 mars 19:39 BENPRO_USB_BTS_LP.tar.gz | |
tar -cavf BENPRO_USB_BTS_LP.tar.xz BENPRO_USB 272,47s user 2,83s system 100% cpu 4:34,75 total | |
314M 25 mars 19:44 BENPRO_USB_BTS_LP.tar.xz | |
tar -cavf BENPRO_USB_BTS_LP.tar.bz2 BENPRO_USB 96,16s user 1,97s system 99% cpu 1:38,66 total |
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 | |
# From https://anothersysadmin.wordpress.com/2008/10/29/kill-every-mysql-select-older-than-x-seconds/ | |
SEC=$1 | |
IFS='|' | |
if [[ $SEC -lt 1 ]]; then | |
echo "Usage: $0 SECONDS" | |
exit 1 | |
fi | |
mysqladmin proc -v|grep Query|grep -Evi "delete|update|insert|alter table" |while read dummy qid qusr qhost qdb qstat qsec qstat2 query; do | |
if [ $qsec -gt $SEC ]; 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
abuse@<domain>, admin@<domain>, administrator@<domain>, contact@<domain>, info@<domain>, postmaster@<domain>, support@<domain>, webmaster@<domain> |
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/sh | |
#Upload auto for animesost | |
#benrpo - 27-08-08 | |
#Variables | |
ftp_user="" | |
ftp_password="" | |
ftp_host="animesost.info" | |
http_user="" | |
http_pass="" |
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 | |
#################### | |
#SCRIPTUS # | |
#Version 2.0a # | |
#By Benpro # | |
#[email protected]# | |
#www.benprobox.fr # | |
#Date : 27/07/09 # | |
#################### |
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 | |
#Script de connection automatique au réseau wifi et au portail captif de l'université | |
#de Nancy-Metz | |
#Start 28/09/10 | |
#Last edit : 5/10/10 | |
#Last Comment : Ajout de la libnotify pour envoyer de msg. | |
#Révision : stable | |
#Version : 1.2 | |
#Var |
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
# Use vi style when copy-paste mode. | |
set-window-option -g mode-keys vi | |
# Use ZSH by default | |
set-option -g default-shell /bin/zsh | |
# Map alt keys + direction keys for switching pane. | |
bind -n M-Left select-pane -L | |
bind -n M-Right select-pane -R | |
bind -n M-Up select-pane -U | |
bind -n M-Down select-pane -D | |
# Active monitoring |