Category Archives: Internet

Internet

Backup File Using Amazon S3 And Ruby 1.8.4

require ‘rubygems’ require ‘aws/s3′ # Setup Connection AWS::S3::Base.establish_connection!(    :access_key_id => ‘<access key>’,    :secret_access_key => ‘<secret key>’ ) # Initialize Variables bucket_name = ‘<bucket name>’ file = ‘<file path>’ timestamp = Time.now.strftime(’%Y%m%d%H%M’) # Setup Bucket And Save File AWS::S3::Bucket.create(bucket_name) AWS::S3::S3Object.store(timestamp + file, open(file), bucket_name) # List Contents of Bucket AWS::S3::Bucket.find(bucket_name).each do |current_object|    puts current_object.key end
Also posted in Ruby, S3 | Leave a comment

301 Redirect With Lighttp 1.4

Direct all clean traffic using an exact match on the host. $HTTP["host"] == “www.<example>.com” {    server.document-root = “/www/sites/<example>.com/www/” } Trap all traffic not directed to the main site (regex non-match), then filter remaining traffic headed to the correct domain with the wrong host (regex) and redirect to the main site. $HTTP["host"] !~ “^(www|mail)\.(<example>\.com)$” [...]
Also posted in Lighttp, Search Engine Optimization | Leave a comment
  • 4.0 (5)
    4.1 (3)
    CentOS (4)
    FastCGI (4)
    Lighttp (3)
    Linux (2)
    MySQL (5)
    Network (1)
    PHP (2)
    Rails (4)
    Ruby (6)
    S3 (1)
    Search Engine Optimization (1)
    Unix (2)
    VMWare (2)
    Web Services (2)
    WordPress (1)

    WP Cumulus Flash tag cloud by Roy Tanck requires Flash Player 9 or better.

  • Categories

  • Recent Posts