Musing, Muttering, Meandering Through Life

December 14, 2007

Plushie - Interactive Toy Modeling System

Filed under: Development, Software, Stuff, Uncategorized — donthorp @ 8:15 am
Tags: , , , , ,

While I can’t so myself, I have friends that can and enjoy doing so. Yuki Mori a Ph.D student, at Fine Digital Engineering Laboratory Research Center for Advanced Science and Technology (RCAST) The University of Tokyo, has developed a system called Plushie that enables you to design and create patterns for 3D plush toys.

Yuki Mori, Takeo Igarashi. Plushie: An Interactive Design System for Plush Toys. ACM Transactions on Graphics (Proceedings of SIGGRAPH 2007), vol.23, No.3, Article No.45, San Diego, USA, August 2007 (Link to the PDF is available on her site).

December 9, 2007

Collecting Senders from Gmail Using POP3

Filed under: Development, Software — donthorp @ 9:27 am
Tags: , , , ,

Over the years, we’ve had a lot of people submit jokes for LOL. Since we’ve recently upgraded the site to allow user submissions, we thought it would be nice to let them know they can now add their own jokes (Truth be told, we were slow adding them).

I’m not going to go into great detail, but I thought I’d post a mini howto. Note: I’m not supporting this code, but you are free to use it

Firstly, Ruby 1.8’s POP3 implementation doesn’t support SSL. stunnel provides encrypted channels for software that doesn’t understand SSL. I run cygwin on my Windows box to get access to essential tools. Note: Configuring cygwin and installing it is beyond the scope of this entry, so ask Google for help.

A quick search for gmail and stunnel allowed me to cobble together the following configuration file called gmail-tunnel.txt

client = yes
debug = debug
foreground = yes

[pop3s]
accept = 127.0.0.1:42
connect = pop.gmail.com:995

Open up a command window and issue this command to start the tunnel:

C>stunnel gmail-tunnel.txt

Save the following code in rpopget.rb and then execute it from another command window while the tunnel is active. It will write a file called address.csv that lists each address and the number of times that person sent mail.

#!/usr/bin/ruby

require 'net/pop'

HOST = 'localhost'
USER = 'YOURACCOUT@gmail.com'
PASS = 'YOURPASSWORD'

$addr = {}

def add_address(a)
    $addr[a] = $addr[a].nil? ? 1 : $addr[a] + 1
end

Net::POP3.start(HOST, 42 , USER, PASS) do |pop|
    if pop.mails.empty?
        puts 'No mail'
    else
        pop.mails.each do |email|
            $stderr.printf(".")

            lines = email.header.split("\r\n")
            lines.each do |l|
                if l =~ /^From:/
                    if l =~ /^.*/
                        add_address($1)
                    elsif l =~ /^From: (.*@.*)[ ]*/
                        add_address($1)
                    end
                end
            end
        end
    end
end

open("address.csv", "w") do |f|
    f.puts "Address,Count"
    $addr.each_pair do |a, c|
        f.puts "#{a},#{c}"
    end
end

November 19, 2007

LOL.com is taking shape

Filed under: Development, Meandering, Musing, Software — donthorp @ 8:51 pm
Tags: , , ,

Ages and ages ago some friends and I were able to get the lol.com domain and have kept it all these years. A couple of years ago, when advertising started coming back, my business partner John Munsch and I started talking about how we could make it more than just a dead site and an email trap.

A little over a year ago, we brought up a very simple site with a very limited set of jokes. We opened up a gmail account to accept jokes to place on the site, but it was too hard to keep up with the submissions, format them all, and get them live on the site. After the site had been up for a while, it became apparent that there was growth potential and it was worth getting an interactive site up and running.

So for the last year or so John and I have been working to bring our initial vision to life. John has done most of the development for this site, I’ve done most of the IT. We have released version 2.0 of LOL.

We’re proud of our baby. If you have some time stop by and give it a look.

June 2, 2007

Ruby consolidation in the Eclipse World

Filed under: Development, Software — donthorp @ 9:58 am

Apparently I’ve been a little out of touch. I’ve been happily using RDT with Eclipse and hadn’t needed to change. While catching up on some reading, I ran across this press release "Aptana to Merge RadRails and RDT into its Ajax-focused IDE".

Aptana LogoAptana bills itself as “the leading Interactive Development Environment (IDE) for Web 2.0 and Ajax development”. I took a moment and watched their screen cast and have to say it looks like a good start. As soon as I need to update my IDE again, I’ll look at switching over. For now, I’m going to keep pluging away with my current version.

Blog at WordPress.com.