imap2gmail.sh

d
Nombre: imap2gmail.sh
Autor: Desconocido
Visto en Otel Consulting
Nota: Se necesita tener instalado el programa imapsync
#!/bin/sh
 
#Configure User
SERVER1=imap.anotherserver.com
UNAME1=demo@anotherserver.com
PWORD1=54321
UNAME2=demo@gmail.com
PWORD2=12345
 
#Blank this out if you want to see folder sizes
HIDE="--nofoldersizes --skipsize"
 
imapsync --syncinternaldates --useheader 'Message-Id' \
--host1 ${SERVER1} --user1 ${UNAME1} \
--password1 ${PWORD1} --ssl1 \
--host2 imap.googlemail.com \
--port2 993 --user2 ${UNAME2} \
--password2 ${PWORD2} --ssl2 \
--authmech1 LOGIN --authmech2 LOGIN --split1 200 --split2 200 ${HIDE} \
--exclude 'Drafts|Trash|Spam|Sent'
 
#TO Sync Special Folders to Gmail
imapsync --syncinternaldates --useheader 'Message-Id' \
--host1 ${SERVER1} --user1 ${UNAME1} \
--password1 ${PWORD1} --ssl1 \
--host2 imap.googlemail.com \
--port2 993 --user2 ${UNAME2} \
--password2 ${PWORD2} --ssl2 \
--ssl2 --noauthmd5 --split1 200 --split2 200 ${HIDE} \
--folder "Inbox/Sent" --prefix2 '[Gmail]/' --regextrans2 's/Inbox\/Sent/Sent Mail/' \
--folder "Inbox/Spam" --prefix2 '[Gmail]/' --regextrans2 's/Inbox\/Spam/Spam/' \
--folder "Inbox/Trash" --prefix2 '[Gmail]/' --regextrans2 's/Inbox\/Trash/Trash/' \
--folder "Inbox/Drafts" --prefix2 '[Gmail]/' --regextrans2 's/Inbox\/Drafts/Drafts/' \
Leer más...

actualizaflash.sh

d
Nombre: actualizaflash.sh
Autor: Esteban M. Navas
Visto en Algo de Linux
@algodelinux
#!/bin/bash # 
# actualizaflash -> Actualiza el plugin de flash, si no se encuentra actualizado ya 
# # Esteban M. Navas 
# IES Valle del Jerte - Plasencia 
# 26/02/2015  

# Instalamos el paquete flashplugin-nonfree, si no está instalado aún 
dpkg -l | grep ^"ii flashplugin-nonfree" > /dev/null || apt-get -y install flashplugin-nonfree

update-flashplugin-nonfree --status | grep -e installed -e available > /tmp/flashplugin installed=`grep "installed" /tmp/flashplugin | cut -f2 -d":" | sed 's/^ *//g'` available=`grep "available" /tmp/flashplugin | cut -f2 -d":" | sed 's/^ *//g'`

if [ "$installed" != "$available" ]; 
       then update-flashplugin-nonfree --install 
fi 
Leer más...

Amazon S3 Uploader

d
Nombre: Amazon S3 Uploader
Descripción: Script que permite subir archivos a una instancia de S3 vía BASH
Autor: guss77
geek.co.il
Más información del script en: Things n' Stuff
#!/bin/bash
file="$1"

key_id="YOUR-AWS-KEY-ID"
key_secret="YOUR-AWS-KEY-SECRET"
path="some-directory/$file"
bucket="s3-bucket-name"
content_type="application/octet-stream"
date="$(LC_ALL=C date -u +"%a, %d %b %Y %X %z")"
md5="$(openssl md5 -binary < "$file" | base64)"

sig="$(printf "PUT\n$md5\n$content_type\n$date\n/$bucket/$path" | openssl sha1 -binary -hmac "$key_secret" | base64)"

curl -T $file http://$bucket.s3.amazonaws.com/$path \
    -H "Date: $date" \
    -H "Authorization: AWS $key_id:$sig" \
    -H "Content-Type: $content_type" \
    -H "Content-MD5: $md5"
Leer más...