Thursday, August 30, 2012
Friday, August 10, 2012
Simple File Upload to Amazon S3 From Ruby
#!/usr/bin/env ruby require 'rubygems' require 'aws/s3' local_file = ARGV[0] bucket = ARGV[1] mime_type = ARGV[2] || "application/octet-stream" AWS::S3::Base.establish_connection!( :access_key_id => 'REPLACE_ME', :secret_access_key => 'REPLACE_ME' ) base_name = File.basename(local_file) puts "Uploading #{local_file} as '#{base_name}' to '#{bucket}'" AWS::S3::S3Object.store( base_name, File.open(local_file), bucket, :content_type => mime_type ) puts "Uploaded!"
Subscribe to:
Posts (Atom)
Proxmox installation display out of range
Reference: https://forum.proxmox.com/threads/proxmox-ve-screen-out-of-range.131297/
-
How to remove BBCODE from a string ? <?php $String = "[b][color=#0000ff]TEST[/color][/b]"; $regex = '|[[\/\!]*?[^\[\]...
-
Original Source:: http://www.zytrax.com/tech/pc/serial.html Tech Info - USB and Firewire USB and FireWire (IEEE 1394a and b) represent the...