This file contains 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 | |
DIRS=`find $HOME/git -name .git -type d` | |
for DIR in $DIRS ; do | |
cd $DIR/.. | |
echo "processing `pwd`..." | |
git checkout master | |
git pull | |
done |
This file contains 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 | |
TIPOS="txt png jpg swf mkv mp4 avi mov xml mp3 ogg cab bat mpg tib cr2 exe" | |
DISCOS="5TbWDBlack lacie5tbusbc" | |
for DISCO in $DISCOS; do | |
echo "creando directorio final en $DISCO" | |
mkdir -p /media/diego/$DISCO/final | |
echo "procesando $DISCO" | |
for TIPO in $TIPOS ; do |
This file contains 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 | |
UFW="sudo ufw" | |
$UFW --force reset | |
$UFW default allow incoming | |
$UFW default deny outgoing | |
$UFW deny out on eth0 |
This file contains 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 | |
sudo /etc/init.d/transmission-daemon stop | |
sudo chown -R pi:pi /etc/transmission-daemon | |
sudo rm -rf ~pi/.config/transmission-daemon | |
sudo mv /etc/transmission-daemon ~pi/.config/ | |
sudo ln -s ~pi/.config/transmission-daemon /etc/transmission-daemon | |
sudo chown pi:pi /etc/default/transmission-daemon |
This file contains 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 | |
sudo yum update -y | |
sudo yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm | |
sudo yum --enablerepo=epel install -y iperf iperf3 | |
exit 0 |
This file contains 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
$ cat /usr/share/applications/firefox-latest.desktop | |
[Desktop Entry] | |
Version=1.0 | |
Name=Firefox Latest | |
Comment=Browse the World Wide Web | |
GenericName=Web Browser | |
Keywords=Internet;WWW;Browser;Web;Explorer | |
Type=Application | |
Exec=/home/diego/bin/firefox/firefox %u | |
Terminal=false |
This file contains 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 | |
URL="https://mynewwebsite.com" | |
LOG="./`basename $0|cut -d'.' -f1`.log" | |
SEC="5" | |
while [ '1' == '1' ] ; do | |
MD5=` wget -q --no-check-certificate -O - $URL | md5sum` | |
NOW=`date +%Y%m%dT%H%M%S` | |
echo "$NOW:$MD5" | tee --append $LOG |
This file contains 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 | |
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.5 1 | |
exit 0 |
This file contains 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 | |
OUT="`date +%Y%m%d%H%M%S`-backup-`hostname -f`.sql" | |
mysqldump -u root -p \ | |
--all-databases \ | |
--routines \ | |
--events \ | |
--triggers \ | |
--single-transaction \ |
This file contains 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
// how to get multiple redirections using DOM in Contact Form 7 | |
// mandatory from January 2018. on_send_ok is deprecated. | |
// wp/wp-content/mytheme/functions.php | |
add_action( 'wp_footer', 'redireccion_contactform7' ); | |
function redireccion_contactform7() { | |
?> | |
<script type="text/javascript"> | |
document.addEventListener( 'wpcf7mailsent', function( event ) { |
NewerOlder