Mr. Fancy Pants Shirt

October 19, 2015 6:01 pm

I’ve been needing a new white dress shirt for many months now.  The collar on my old shirt was pretty beat up.  But shopping for dress shirts is lame so I kept putting it off.  As I was considering my need of a new shirt I was thinking it would be nice to have a shirt that actually fit properly, which seemed like it would entail shopping for a shirt and then getting it tailored.  That seemed even more lame than just shopping for a shirt.

shirt_1
My custom shirt from Tailor Store as it arrived from Sri Lanka (minus packaging)

So, as I am wont to do, I did my research.  And I found Tailor Store.  It is a Swedish company which allows you to order custom-designed and custom-fit shirts without leaving home!  You might be thinking that a custom made shirt is going to be expensive.  It can be, but it doesn’t have to be.  Tailor Store offers a poplin, white, cotton fabric for $49.  So I figured it was worth a shot.

You can customize every single aspect of the shirt if you want to: fabric, button color, thread color, cuff style, collar style, pocket, embroidery, elbow patches, etc.  Despite the level of customization available the user interface is quite good.  I’m impressed they were able to keep it as simple as it is.  I was just going for a classic white shirt, though, so my design process was pretty straightforward.

But the real convenience is the custom fit.  If you put in your height and weight they’ll set some starting values for all of the needed measurements and they provide explanations and tutorial videos for how to take each measurement.  Jess helped me take the actual measurements to make the final adjustments.

Once you place an order the information is sent off to their manufacturing facility in Sri Lanka where it’s custom made and then shipped out.  Shipping does cost you though, $20.  So the total cost for the shirt was $70.  But that’s still pretty great for a fully custom-designed and custom-fit shirt.

I placed the order on October 8 and received my shirt today, October 19.  Eleven days to have it custom-made and then delivered from around the world is pretty good in my opinion.

And it fits great.  I am very pleased with the result.  If I had need for more nice shirts I’d definitely order from them again.  And since the measurements are already done it would only be a matter of designing a new shirt and placing the order.

shirt_2
My new custom-fit shirt from Tailor Store (it needs to be ironed)

Converting Http Session Events into Grails 3 Events

1:16 pm

Grails 3 introduced a new Events API based on Reactor.  Unfortunately, as far as I can tell, HttpSessionEvents are not natively part of the Grails 3 Events system.  Bringing them in to the fold, however, is pretty easy.  I based this off of Oliver Wahlen’s immensely helpful blog post about sending the HttpSessionEvents to a Grails service.

First, let’s create our Spring HttpSessionServletListener.  Create this file somewhere in the /src/ path where Grails will find it:

File: .../grailsProject/src/main/groovy/com/example/HttpSessionServletListener.groovy
package com.example

import grails.events.*
import javax.servlet.http.HttpSession
import javax.servlet.http.HttpSessionEvent
import javax.servlet.http.HttpSessionListener

class HttpSessionServletListener implements HttpSessionListener, Events {
  
    // called by servlet container upon session creation
    void sessionCreated(HttpSessionEvent event) {
        notify("example:httpSessionCreated", event.session)
    }

    // called by servlet container upon session destruction
    void sessionDestroyed(HttpSessionEvent event) {
        notify("example:httpSessionDestroyed", event.session)
    }
}

Now register the HttpSessionServletListener as a Spring Bean.  If you don’t already have a resources.groovy file, create one and add the following.

.../grailsProject/grails-app/conf/spring/resources.groovy
import org.springframework.boot.context.embedded.ServletListenerRegistrationBean
import com.example.HttpSessionServletListener

beans = {
    
    httpSessionServletListener(ServletListenerRegistrationBean) {
        listener = bean(HttpSessionServletListener)
    }
    
}
// Yes this is the entire file

Now you are all set to listen for the “example:httpSessionCreated” and “example:httpSessionDestroyed” events using the Grails 3 Events API.  “Example” is the namespace of the event, which in my real code I set to the last part of the package name, so I made it match the package name of “example”.  Just use something so you don’t have to worry about naming collisions.

Here’s an example of listening for the events in a standard Grails Controller.  Note that the event handlers are attached after construction, and before the Controller bean is made available, by using the PostConstruct annotation.

.../grailsProject/grails-app/controllers/com/example/ExampleController.groovy
package com.example

import grails.events.*
import javax.annotation.PostConstruct

class ExampleController {
    
    @PostConstruct
    void init() {
        
        on("example:httpSessionCreated") { session ->
            println "sessionCreated: ${session.id}"
        }
        
        on("example:httpSessionDestroyed") { session ->
            println "sessionDestroyed: ${session.id}"
        }
    }
}

NASA Apollo Pictures

October 5, 2015 5:40 pm

Last week NASA released a bunch (over 10,000) of original images from the Apollo missions on their Flickr account.  They’re all Public Domain images so anyone can download the originals and use them for anything they like.  I flipped through and picked out my favorites and cleaned them up.  I’ll probably get some nice canvas prints made of some of them when Canvas Press has sales.

Here are my top 10 after cleaning them up.  I’ve uploaded my full versions so you can download them yourself if you want to make a poster or canvas print or something.  Clicking an image will open the full-size version, which you can then save to your computer using right-click -> Save image…21060968314_bcca0b9191_o_kbd 21065336993_765fba69b6_o_kbd 21082003763_9471526a7e_o_kbd 21472205930_d42afbe79a_o_kbd 21492224000_7f7d5991a8_o_kbd 21496319710_4d7bd28063_o_kbd 21653924176_26f5a10ce1_o_kbd 21667234912_ac412e1fb9_o_kbd 21693186921_68e0b6d72f_o_kbd 21912171516_ea0ef12faf_o_kbd

 

A Light in the Dark

September 28, 2015 7:34 pm

I wrapped an LED around a button battery with a little material to keep it separated so you push on it to turn the LED on.  Then we took turns waving it around while camera took a picture with a long exposure.

Heather’s work was usually very…nuclear:

IMGP3861as

We encouraged her to move around more:

IMGP3863as

I tried to write my name, but my spatial awareness is apparently not great:

IMGP3865as

Jess did better with her contribution:

IMGP3867as

Lunar Eclipse 2015

September 27, 2015 8:41 pm

We and a few families from Church went to a local park and climbed a hill to try and get a decent view of the lunar eclipse tonight.  Despite having had nothing but clear skies for about 9 months we managed to have clouds covering the eastern sky, and only the eastern sky, this evening.  We waited around for a while and did manage to get about 5 minutes where we could see the moon.  I had had plans to try and make a nice timelapse image as the moon came up over the horizon, but that didn’t work out.

Here’s the best shot I managed to get:

Lunar Eclipse from Livermore, CA
Lunar Eclipse from Livermore, CA

But at least we got a chance to hangout with friends for a little while and we did get to see something.

Of course, after the eclipse ended the sky cleared up perfectly:

IMGP3856a

These were just using my Pentax K-7 with a 200mm lens, nothing special.

And here is some of the group that was up on the hill watching:

IMGP3831as