More popular than stellar consumer credit you cash advance cash advance your car get your mortgage.


Archive for the ‘nerdy’ Category

Photos on S3

Friday, October 13th, 2006

You can now see the large version of images without waiting for my slow, slow cable modem async upload. In fact, all the image loads should be blazing fast as soon as I get them all uploaded. At the rate it has been going, it will take 3 days to upload everything to S3. My script is just about though my china pictures now.

And it is so easy to use. I work at Amazon and have had pretty much constant exposure to S3, but it still surprised me how easy it was to use. I used rSh3ell to get started. I just created a bucket named ‘carrino_albums’, then started uploading things to that bucket with acl ‘public-read’.

Here is the script I used to upload my files. Its pretty hacky. I just reads from a file called input and writes the file with that key to S3 as public-read. Some exception handling is thrown in there. I intend on creating a much better script along the lines of s3sync, which behaves like rsync. S3 makes this easy, becasue it automatically stores the upload date and the md5sum in the metadata, and you can retreive that with a HEAD HTTP call. You can also do a list call on the bucket, which will get you the metadata of all the keys in that bucket.

If I upload a file named china_day2/dsc_2572.sized.jpg to bucket carrino_albums, you can find it here. It’s that easy!

#!/usr/bin/env ruby
require 'S3'

AWS_ACCESS_KEY_ID = 'public key'
AWS_SECRET_ACCESS_KEY = 'private key'
USE_SSL = false
@conn = S3::AWSAuthConnection.new(AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, USE_SSL)
@bucket = 'carrino_albums'

def write_file(file_name)
    begin
        bytes = nil
        key = file_name  # NOTE: this is specific to our situation
        File.open(file_name, "rb") {|f| bytes = f.read }
        headers = {
              'x-amz-acl' => "public-read",
              'Content-Length' =>  FileTest.size(file_name).to_s
        }
        response = @conn.put(@bucket, key, bytes, headers).http_response.message
        if response == 'OK'
            puts "#{file_name} SUCCESSFULLY uploaded"
        else
            puts "#{file_name} FAILED to be uploaded"
        end
    rescue Interrupt => e
        puts "Caught Interrupt, bailing out"
        exit 1
    rescue Exception => e
        puts "#{file_name} FAILED to be uploaded and caused an exception. #{e.class.name}: #{e.to_s}"
    end
end


STDOUT.sync = true
File.readlines("input").each { |line|
    line.chomp!
    write_file(line)
}

Weird Al is Back

Monday, September 25th, 2006

I am number 1

Wednesday, August 9th, 2006

I am now the coolest John Carrino. All the search engines say so. Even the crappy ones. Bam!

Look! It’s a Lemur.

Lemur Lemur

johncarrino.net

Tuesday, August 8th, 2006

Yippie. I finally got a domain after missing out on all the good carrino-dot domains. I even missed johncarrino.com.

Originally, I was too cheap to buy dns hosting, so I just had the park page redirect to my 2nd level domain from dyndns, carrino.myphotos.cc. I finally got dns for free from dennis and it works great.

Also, I made this blog my redirect from / instead of gallery. That is probably how you got to this horrible thing. If you need to get away, the gallery, is always there.

And in summary, here are some pictures from my vacation last week.

WaterfallRobin with crab legPacific OceanChipmunkWildflowers

Internet Ghetto

Thursday, July 13th, 2006

Myspace.com is the ghetto of the internet. It is like angelfire and geocities all over again, only with people that are even dumber than back in the day. You were a nerd just for going near a computer in the mid 90’s. Also, 25% of the page loads are server error or refusing the tcp connection.
Yisong posted about taking personal info off sites like facebook and myspace. Some people have resorted to all out lying. One of my friends was asked almost exclusively about his myspace wall in an interview. I suggest you checkout his wall post about eating balls (after you remove all your personal info from your profile).

Look, here is a picure of my cat reading a book, then falling asleep. (It was actually a book on perl best practices. I guess cats aren’t into that.)
Kittay Reading a Book Kittay asleep from reading