skwpspace yan pritzker’s home on the web

skwpspace is Yan Pritzker's home on the web

Blog :: Photography :: About Me

hello, i'm yan

This blog is about startups, blogging, Ruby On Rails, virtualization and cloud computing, photography, customer service, marketing, ux and design, git, and lots more.

Get updates by email
Follow me on twitter

Top Posts

planypus

I'm the founder of Planypus, the place to share your plans!

cohesiveft

Accessible, manageable, virtualized application stacks ready to download or deploy to the cloud!

flickr

at the paradeat the parade@slava626@leorazellman and @smazo at bat17my poor ricohyou're wearing my sweaterthe graduatethe answer, my friend

Archives

Contact

Reach me at yan at pritzker.ws

Posts Tagged code

Long running Threads in Rails and metaprogramming fun

Disclaimer: This post contains evil (but highly fun!) code. Proceed at your own peril…
I was recently designing an application that needed to execute some long running requests against an external host. If you’ve ever tried doing something like this in Rails, you’ll find your mongrels will block up waiting for the request to complete, bringing [...]


Ruby/html trick: wrap long strings with invisible wordwrap characters

def wrap_long_string(text,max_width = 20)
(text.length < max_width) ?
text :
text.scan(/.{1,#{max_width}}/).join(“<wbr>“)
end