Mostrando entradas con la etiqueta Cloud. Mostrar todas las entradas
Mostrando entradas con la etiqueta Cloud. Mostrar todas las entradas

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...

Script Nautilus DropBox Shared

d
Autor: Kalpa
Descripción: Script que nos permite compartir directamente un archivo a nuestra carpeta de DropBox. Para hacer uso de el lo copiamos en .gnome2/nautilus-scripts y se da los permisos respectivos.

#!/bin/sh
#
# W.H. Kalpa Pathum 
# 1st June, 2010
#

# Dropbox directory
DROPBOX_DIR="$HOME/Dropbox/"

# creates a temporary file
file_list=$(mktemp)

# writes the URIs of the selected file to the temp file
echo $NAUTILUS_SCRIPT_SELECTED_URIS | sed 's/ \//\n/g' > $file_list

# iterete through the file list
for file in $(cat $file_list)
  do
 # extract the last filed from the URI, that is the file name
    filename="$(echo $file | awk -F'/' '{print $NF}' | sed 's/%20/ /g')"
    
    # creates the symbolic link
    ln -s "$(pwd)/$filename" "$DROPBOX_DIR$filename"
    
    # sets the emblem
    gvfs-set-attribute -t stringv "$filename" metadata::emblems default
    done

exit 0
Leer más...