<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-684397662881399859</id><updated>2012-02-12T16:52:04.448-08:00</updated><category term='junit'/><category term='jquery'/><category term='christmas'/><category term='gwt'/><category term='bash'/><category term='php'/><category term='howto'/><category term='programming'/><title type='text'>Zen Garden</title><subtitle type='html'>Stuff about things.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://shadowmint.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/684397662881399859/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://shadowmint.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Doug Linder</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-JWqwUMiA7OA/AAAAAAAAAAI/AAAAAAAAACk/1--zQIzvNFw/s512-c/photo.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>15</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-684397662881399859.post-6912074301397100327</id><published>2012-02-12T16:50:00.000-08:00</published><updated>2012-02-12T16:52:04.460-08:00</updated><title type='text'>Python threads in action</title><content type='html'>&lt;h1&gt;Simple port proxy in python&lt;/h1&gt;&lt;p&gt;Seems like there's a lot of python out there telling you how to use threads, and none of it actually shows you how to do it.&lt;/p&gt;&lt;p&gt;Here's an example that extends "Thread" and also makes use of the Thread(target = XXX) functionality. &lt;/p&gt;&lt;pre&gt;&lt;br /&gt;import nark&lt;br /&gt;import socket&lt;br /&gt;from threading import Thread&lt;br /&gt;from ICacheService import *&lt;br /&gt;from IFetchService import *&lt;br /&gt;&lt;br /&gt;class SoapCachedItem(Thread):&lt;br /&gt;  """ Single proxy entry. """&lt;br /&gt;&lt;br /&gt;  def __init__(self, remoteHost, remotePort, localPort, localDir):&lt;br /&gt;    Thread.__init__(self)&lt;br /&gt;&lt;br /&gt;    self.remoteHost = remoteHost&lt;br /&gt;    self.remotePort = remotePort&lt;br /&gt;    self.localPort = localPort&lt;br /&gt;    self.localDir = localDir&lt;br /&gt;&lt;br /&gt;    register = nark.Register.get()&lt;br /&gt;    container = register.instance(nark.Container)&lt;br /&gt;    self.cache = container.resolve(ICacheService)&lt;br /&gt;    self.fetcher = container.resolve(IFetchService)&lt;br /&gt;    self.log = register.instance(nark.Log)&lt;br /&gt;&lt;br /&gt;    self.dead = False&lt;br /&gt;&lt;br /&gt;  def __respond(self, request):&lt;br /&gt;    """ Look for a cached response; if none, fetch one. """&lt;br /&gt;    rtn = self.cache.respond(self.localDir, request)&lt;br /&gt;    if not rtn:&lt;br /&gt;      rtn = self.fetcher.respond(self.remoteHost, self.remotePort, request)&lt;br /&gt;      self.cache.store(self.localDir, request, rtn)&lt;br /&gt;    return rtn&lt;br /&gt;&lt;br /&gt;  def run(self):&lt;br /&gt;    """ Run a mini server """&lt;br /&gt;    s = socket.socket()&lt;br /&gt;    s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)&lt;br /&gt;    s.bind(('', self.localPort))&lt;br /&gt;    s.listen(1)&lt;br /&gt;    s.settimeout(1)&lt;br /&gt;    self.log.trace("Listening on local port: " + str(self.localPort))&lt;br /&gt;    while not self.dead:&lt;br /&gt;      try:&lt;br /&gt;        t,_ = s.accept();&lt;br /&gt;        Thread(target = self.__handle, args = (self, t)).start()&lt;br /&gt;      except:&lt;br /&gt;        pass #timeout&lt;br /&gt;    self.log.trace("Stopping server on port: " + str(self.localPort))&lt;br /&gt;&lt;br /&gt;  @classmethod&lt;br /&gt;  def __handle(type, self, s):&lt;br /&gt;    """ Handle in incoming thread """&lt;br /&gt;    try:&lt;br /&gt;      request = s.recv(4096)&lt;br /&gt;      self.log.trace(request)&lt;br /&gt;      response = self.__respond(request)&lt;br /&gt;      s.send(response)&lt;br /&gt;      s.close()&lt;br /&gt;      self.dead = True&lt;br /&gt;    except Exception, e:&lt;br /&gt;      self.log.error("Error processing request:", e)&lt;br /&gt;      self.dead = True&lt;br /&gt;&lt;/pre&gt;&lt;p&gt;Notice how we have to decorate __handle() with @classmethod, otherwise the arguments passed into it will be incorrect. &lt;/p&gt;&lt;p&gt;NB. Obviously this is only a fragment and wont possibly compile without the extra classes and things. :P&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/684397662881399859-6912074301397100327?l=shadowmint.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shadowmint.blogspot.com/feeds/6912074301397100327/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://shadowmint.blogspot.com/2012/02/single-port-proxy-in-python-seems-like.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/684397662881399859/posts/default/6912074301397100327'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/684397662881399859/posts/default/6912074301397100327'/><link rel='alternate' type='text/html' href='http://shadowmint.blogspot.com/2012/02/single-port-proxy-in-python-seems-like.html' title='Python threads in action'/><author><name>Doug Linder</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-JWqwUMiA7OA/AAAAAAAAAAI/AAAAAAAAACk/1--zQIzvNFw/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-684397662881399859.post-4177931751784065178</id><published>2012-01-26T17:36:00.000-08:00</published><updated>2012-01-26T17:36:59.805-08:00</updated><title type='text'>ABCMeta vs. throw NotImplementedError</title><content type='html'>&lt;h2&gt;ABCMeta vs. throw NotImplementedError&lt;/h2&gt;&lt;p&gt;Ever wondered what the difference between using the ABC module in python and just throwing an error when a base function isn't present is? Actually, it pretty obvious once you do it...&lt;/p&gt;&lt;pre&gt;&lt;br /&gt;from abc import ABCMeta, abstractmethod&lt;br /&gt;&lt;br /&gt;class Base1(object):&lt;br /&gt;  def requiredCall(self, x):&lt;br /&gt;    raise NotImplementedError()&lt;br /&gt;&lt;br /&gt;class Base2(object):&lt;br /&gt;  __metaclass__ = ABCMeta  &lt;br /&gt;  @abstractmethod&lt;br /&gt;  def requiredCall(self, x):&lt;br /&gt;    return&lt;br /&gt;&lt;br /&gt;class Impl1(Base1):&lt;br /&gt;  pass&lt;br /&gt;&lt;br /&gt;class Impl2(Base2):&lt;br /&gt;  pass&lt;br /&gt;&lt;br /&gt;try:&lt;br /&gt;  i1 = Impl1()&lt;br /&gt;except:&lt;br /&gt;  print("Unable to create Impl1")&lt;br /&gt;  &lt;br /&gt;try:&lt;br /&gt;  i2 = Impl2()&lt;br /&gt;except:&lt;br /&gt;  print("Unable to create Impl2")&lt;br /&gt;&lt;/pre&gt;&lt;p&gt;The answer? Tada~ You can &lt;i&gt;create&lt;/i&gt; an instance of Impl1 without any errors, and will only discover the problem when you try to use it; on the other hand, trying to create an instance of Impl2 will result in an exception.&lt;/p&gt;&lt;p&gt;Extremely handy~&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/684397662881399859-4177931751784065178?l=shadowmint.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shadowmint.blogspot.com/feeds/4177931751784065178/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://shadowmint.blogspot.com/2012/01/abcmeta-vs.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/684397662881399859/posts/default/4177931751784065178'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/684397662881399859/posts/default/4177931751784065178'/><link rel='alternate' type='text/html' href='http://shadowmint.blogspot.com/2012/01/abcmeta-vs.html' title='ABCMeta vs. throw NotImplementedError'/><author><name>Doug Linder</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-JWqwUMiA7OA/AAAAAAAAAAI/AAAAAAAAACk/1--zQIzvNFw/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-684397662881399859.post-1134365631612449083</id><published>2010-10-11T20:11:00.000-07:00</published><updated>2010-10-11T20:14:23.256-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='bash'/><category scheme='http://www.blogger.com/atom/ns#' term='howto'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><title type='text'>Logical OR in bash programming.</title><content type='html'>Why do none of the guides to bash programming explain how to do a logical OR?&lt;br /&gt;&lt;br /&gt;Spent ages trying to figure this one, so here we go, the basic syntax is:&lt;br /&gt;&lt;br /&gt;if [ Expression ] || [ Expression]; then&lt;br /&gt;fi&lt;br /&gt;&lt;br /&gt;For example, checking if you have one or two command line arguments:&lt;br /&gt;&lt;br /&gt;if [ `expr $# == 1` == 1 ] || [ `expr $# == 2` == 1 ]; then&lt;br /&gt;    echo "OK";&lt;br /&gt;fi&lt;br /&gt;&lt;br /&gt;Tada!&lt;br /&gt;&lt;br /&gt;Programming guide fail! :P&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/684397662881399859-1134365631612449083?l=shadowmint.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shadowmint.blogspot.com/feeds/1134365631612449083/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://shadowmint.blogspot.com/2010/10/logical-or-in-bash-programming.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/684397662881399859/posts/default/1134365631612449083'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/684397662881399859/posts/default/1134365631612449083'/><link rel='alternate' type='text/html' href='http://shadowmint.blogspot.com/2010/10/logical-or-in-bash-programming.html' title='Logical OR in bash programming.'/><author><name>Doug Linder</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-JWqwUMiA7OA/AAAAAAAAAAI/AAAAAAAAACk/1--zQIzvNFw/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-684397662881399859.post-1956451043604999963</id><published>2010-05-18T18:20:00.000-07:00</published><updated>2010-05-18T18:58:51.826-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='gwt'/><category scheme='http://www.blogger.com/atom/ns#' term='php'/><title type='text'>Php + GWT in Dev mode</title><content type='html'>One of the things that's been annoying me recently with GWT is that although it's an awesome toy, it's really had to develop with anything that doesn't use a java backend.&lt;br /&gt;&lt;br /&gt;So, for example, say you have an awesome GWT app, but you want to use some client side services in php or ruby. Sure, you can write it all up, document it, do the GWT app and then do the php backend as separate steps... but, you lose all the power of the GWT environment debugging tools and the wonderful google plugin for eclipse that makes bug fixing so much easier.&lt;br /&gt;&lt;br /&gt;What I didn't realize is that you can use the java implementation of these languages &lt;span style="font-style:italic;"&gt;inside&lt;/span&gt; the dev environment to develop your backend applications.&lt;br /&gt;&lt;br /&gt;Once you're done you have to go back and check they work normally under a native implementation (instead of the java implementation) but jython, jruby and quercus will get you up and running the dev environment right away. Very nice.&lt;br /&gt;&lt;br /&gt;Specifically for php, you just need to add this to your web.xml:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;  &amp;lt;servlet&amp;gt;&lt;br /&gt;    &amp;lt;servlet-name&amp;gt;Quercus Servlet&amp;lt;/servlet-name&amp;gt;&lt;br /&gt;    &amp;lt;servlet-class&amp;gt;com.caucho.quercus.servlet.QuercusServlet&amp;lt;/servlet-class&amp;gt;&lt;br /&gt;    &amp;lt;init-param&amp;gt;&lt;br /&gt;      &amp;lt;param-name&amp;gt;script-encoding&amp;lt;/param-name&amp;gt;&lt;br /&gt;      &amp;lt;param-value&amp;gt;UTF-8&amp;lt;/param-value&amp;gt;&lt;br /&gt;    &amp;lt;/init-param&amp;gt;&lt;br /&gt;    &amp;lt;init-param&amp;gt;&lt;br /&gt;      &amp;lt;param-name&amp;gt;ini-file&amp;lt;/param-name&amp;gt;&lt;br /&gt;      &amp;lt;param-value&amp;gt;WEB-INF/php.ini&amp;lt;/param-value&amp;gt;&lt;br /&gt;    &amp;lt;/init-param&amp;gt;&lt;br /&gt;  &amp;lt;/servlet&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;...and, add inject-16.jar, javamail-141.jar and resin.jar from the quercus download to your download path.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.caucho.com/resin-3.0/quercus/"&gt;http://www.caucho.com/resin-3.0/quercus/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Then stick your php in the war directory and point your gwt ajax calls at the php scripts. :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/684397662881399859-1956451043604999963?l=shadowmint.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shadowmint.blogspot.com/feeds/1956451043604999963/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://shadowmint.blogspot.com/2010/05/php-gwt-in-dev-mode.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/684397662881399859/posts/default/1956451043604999963'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/684397662881399859/posts/default/1956451043604999963'/><link rel='alternate' type='text/html' href='http://shadowmint.blogspot.com/2010/05/php-gwt-in-dev-mode.html' title='Php + GWT in Dev mode'/><author><name>Doug Linder</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-JWqwUMiA7OA/AAAAAAAAAAI/AAAAAAAAACk/1--zQIzvNFw/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-684397662881399859.post-3339038699174606634</id><published>2010-04-28T01:57:00.000-07:00</published><updated>2010-04-28T01:58:54.313-07:00</updated><title type='text'>Teehee~</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.mikematas.com/albums/Photos/original/Santorini_Cat.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 420px;" src="http://www.mikematas.com/albums/Photos/original/Santorini_Cat.jpg" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Care of &lt;a href="http://www.mikematas.com/"&gt;http://www.mikematas.com/&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/684397662881399859-3339038699174606634?l=shadowmint.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shadowmint.blogspot.com/feeds/3339038699174606634/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://shadowmint.blogspot.com/2010/04/teehee.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/684397662881399859/posts/default/3339038699174606634'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/684397662881399859/posts/default/3339038699174606634'/><link rel='alternate' type='text/html' href='http://shadowmint.blogspot.com/2010/04/teehee.html' title='Teehee~'/><author><name>Doug Linder</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-JWqwUMiA7OA/AAAAAAAAAAI/AAAAAAAAACk/1--zQIzvNFw/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-684397662881399859.post-2945626979774309022</id><published>2010-04-27T22:00:00.000-07:00</published><updated>2010-04-28T01:59:30.093-07:00</updated><title type='text'>Telescopes? Hell yes.</title><content type='html'>&lt;a href="http://blogs.discovermagazine.com/badastronomy/2010/04/27/amazing-shuttle-picture/"&gt;http://blogs.discovermagazine.com/badastronomy/2010/04/27/amazing-shuttle-picture/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Nice. This guy managed to snap a photo of the ISS with just a telescope and a digital camera. Sooooo cool. :)&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://blogs.discovermagazine.com/badastronomy/files/2010/04/vandebergh_sts131.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px;" src="http://blogs.discovermagazine.com/badastronomy/files/2010/04/vandebergh_sts131.jpg" border="0" alt="" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/684397662881399859-2945626979774309022?l=shadowmint.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shadowmint.blogspot.com/feeds/2945626979774309022/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://shadowmint.blogspot.com/2010/04/telescopes-hell-yes.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/684397662881399859/posts/default/2945626979774309022'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/684397662881399859/posts/default/2945626979774309022'/><link rel='alternate' type='text/html' href='http://shadowmint.blogspot.com/2010/04/telescopes-hell-yes.html' title='Telescopes? Hell yes.'/><author><name>Doug Linder</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-JWqwUMiA7OA/AAAAAAAAAAI/AAAAAAAAACk/1--zQIzvNFw/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-684397662881399859.post-5016560177786780006</id><published>2010-04-26T23:50:00.003-07:00</published><updated>2010-04-26T23:57:48.149-07:00</updated><title type='text'>Operator please...?</title><content type='html'>Never been such a fan of operator please, but I quite enjoy this new one, 'Back and Forth'. [ &lt;a href="http://listen.grooveshark.com/#/s/Back+And+Forth/2KezGK"&gt;Listen&lt;/a&gt; ]&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/684397662881399859-5016560177786780006?l=shadowmint.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shadowmint.blogspot.com/feeds/5016560177786780006/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://shadowmint.blogspot.com/2010/04/operator-please.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/684397662881399859/posts/default/5016560177786780006'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/684397662881399859/posts/default/5016560177786780006'/><link rel='alternate' type='text/html' href='http://shadowmint.blogspot.com/2010/04/operator-please.html' title='Operator please...?'/><author><name>Doug Linder</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-JWqwUMiA7OA/AAAAAAAAAAI/AAAAAAAAACk/1--zQIzvNFw/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-684397662881399859.post-4356970366091758260</id><published>2010-04-26T23:50:00.001-07:00</published><updated>2010-04-26T23:57:08.922-07:00</updated><title type='text'>There goes Heineken again: Men with Talent</title><content type='html'>&lt;a href="http://ettf.net/archives/14129"&gt;http://ettf.net/archives/14129&lt;/a&gt;&lt;br /&gt;nice.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/684397662881399859-4356970366091758260?l=shadowmint.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shadowmint.blogspot.com/feeds/4356970366091758260/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://shadowmint.blogspot.com/2010/04/there-goes-heineken-again-men-with.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/684397662881399859/posts/default/4356970366091758260'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/684397662881399859/posts/default/4356970366091758260'/><link rel='alternate' type='text/html' href='http://shadowmint.blogspot.com/2010/04/there-goes-heineken-again-men-with.html' title='There goes Heineken again: Men with Talent'/><author><name>Doug Linder</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-JWqwUMiA7OA/AAAAAAAAAAI/AAAAAAAAACk/1--zQIzvNFw/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-684397662881399859.post-5264154836373764623</id><published>2010-04-05T03:27:00.000-07:00</published><updated>2010-04-05T03:38:55.924-07:00</updated><title type='text'>Conversations about taichi late at night...</title><content type='html'>So late last night we were standing around in the chilly night air, talking about taichi and drinking tawny port. Well... I was drinking port anyway.&lt;br /&gt;&lt;br /&gt;Totally awesome night, I'm so sad I didn't get any pictures of the fairy lights up inside the tent. Note to self: next time, make sure phone is charged before going out...&lt;br /&gt;&lt;br /&gt;Tomorrow, a new layout for the zen garden; this one is starting to feel a little stale now I think.&lt;br /&gt;&lt;br /&gt;Meanwhile, I leave you with this wonderful picture from the Swancon Masquerade (&lt;a href="http://www.lympago.com/rdm_galleries/SwanconMasq2010/index1.html" target="_blank"&gt;src&lt;/a&gt;).&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_PZ5XKfxvXg4/S7m9JkRrm5I/AAAAAAAAABo/kz_thIJl4s8/s1600/img-31.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 250px; height: 320px;" src="http://1.bp.blogspot.com/_PZ5XKfxvXg4/S7m9JkRrm5I/AAAAAAAAABo/kz_thIJl4s8/s320/img-31.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5456600395590376338" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Hopefully no one managed to catch any pictures of me that evening...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/684397662881399859-5264154836373764623?l=shadowmint.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shadowmint.blogspot.com/feeds/5264154836373764623/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://shadowmint.blogspot.com/2010/04/conversations-about-taichi-late-at.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/684397662881399859/posts/default/5264154836373764623'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/684397662881399859/posts/default/5264154836373764623'/><link rel='alternate' type='text/html' href='http://shadowmint.blogspot.com/2010/04/conversations-about-taichi-late-at.html' title='Conversations about taichi late at night...'/><author><name>Doug Linder</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-JWqwUMiA7OA/AAAAAAAAAAI/AAAAAAAAACk/1--zQIzvNFw/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_PZ5XKfxvXg4/S7m9JkRrm5I/AAAAAAAAABo/kz_thIJl4s8/s72-c/img-31.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-684397662881399859.post-6708896764193227380</id><published>2010-03-23T05:04:00.000-07:00</published><updated>2010-03-23T05:09:15.756-07:00</updated><title type='text'>Zen Gardens are Tricky...</title><content type='html'>So I've updated my website to put this blog inline on the page, instead of my twitter feed, because it seems a little more appropriate.&lt;br /&gt;&lt;br /&gt;Also, this way I can comment on particularly tasteful garden rakings, such as this one:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_PZ5XKfxvXg4/S6iuwmfMCCI/AAAAAAAAABg/jqFWgwT00dU/s1600-h/garden.png"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 240px; height: 320px;" src="http://1.bp.blogspot.com/_PZ5XKfxvXg4/S6iuwmfMCCI/AAAAAAAAABg/jqFWgwT00dU/s320/garden.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5451799498920298530" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This is a my second attempt at a single-pass-raking, where the entire zen garden is done in a single continuous motion. Unfortunately as I ranked outward from the center stones (as you're supposed to; the lines in the sand supposedly akin to the ripple of a pebble cast into a pond), the edges ended up a little messily. I'll have to plan ahead a little bit better next time...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/684397662881399859-6708896764193227380?l=shadowmint.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shadowmint.blogspot.com/feeds/6708896764193227380/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://shadowmint.blogspot.com/2010/03/zen-gardens-are-tricky.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/684397662881399859/posts/default/6708896764193227380'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/684397662881399859/posts/default/6708896764193227380'/><link rel='alternate' type='text/html' href='http://shadowmint.blogspot.com/2010/03/zen-gardens-are-tricky.html' title='Zen Gardens are Tricky...'/><author><name>Doug Linder</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-JWqwUMiA7OA/AAAAAAAAAAI/AAAAAAAAACk/1--zQIzvNFw/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_PZ5XKfxvXg4/S6iuwmfMCCI/AAAAAAAAABg/jqFWgwT00dU/s72-c/garden.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-684397662881399859.post-3408893677910859217</id><published>2010-01-07T19:35:00.000-08:00</published><updated>2010-01-07T19:39:05.598-08:00</updated><title type='text'>Secret handsake machine</title><content type='html'>Have to give it to these guys, they made a very cool toy:&lt;br /&gt;&lt;a href="http://amandapeyton.com/mas834/"&gt;http://amandapeyton.com/mas834/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Check out the video too; super frikking awesome.&lt;br /&gt;&lt;object width="400" height="265"&gt;&lt;param name="allowfullscreen" value="true" /&gt;&lt;param name="allowscriptaccess" value="always" /&gt;&lt;param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=7742617&amp;amp;server=vimeo.com&amp;amp;show_title=1&amp;amp;show_byline=1&amp;amp;show_portrait=0&amp;amp;color=&amp;amp;fullscreen=1" /&gt;&lt;embed src="http://vimeo.com/moogaloop.swf?clip_id=7742617&amp;amp;server=vimeo.com&amp;amp;show_title=1&amp;amp;show_byline=1&amp;amp;show_portrait=0&amp;amp;color=&amp;amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="400" height="265"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;p&gt;&lt;a href="http://vimeo.com/7742617"&gt;ShakeOnIt Demo&lt;/a&gt; from &lt;a href="http://vimeo.com/user2419141"&gt;David Cranor&lt;/a&gt; on &lt;a href="http://vimeo.com"&gt;Vimeo&lt;/a&gt;.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;Man... we need to stop using swipe cards &lt;i&gt;immediately&lt;/i&gt; and shift to this technology for user recognition... ;)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/684397662881399859-3408893677910859217?l=shadowmint.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shadowmint.blogspot.com/feeds/3408893677910859217/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://shadowmint.blogspot.com/2010/01/have-to-give-it-to-these-guys-they-made.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/684397662881399859/posts/default/3408893677910859217'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/684397662881399859/posts/default/3408893677910859217'/><link rel='alternate' type='text/html' href='http://shadowmint.blogspot.com/2010/01/have-to-give-it-to-these-guys-they-made.html' title='Secret handsake machine'/><author><name>Doug Linder</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-JWqwUMiA7OA/AAAAAAAAAAI/AAAAAAAAACk/1--zQIzvNFw/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-684397662881399859.post-3291480987012714314</id><published>2010-01-04T20:28:00.001-08:00</published><updated>2010-01-04T20:47:22.886-08:00</updated><title type='text'>No fair~</title><content type='html'>Wow, these guys look like that have way toooo much fun at work. Sigh~&lt;br /&gt;&lt;a href="http://giantsparrow.com/blog/"&gt;http://giantsparrow.com/blog/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I'm sure it's not &lt;i&gt;all&lt;/i&gt; playing with paint in the sunshine.&lt;br /&gt;&lt;br /&gt;&lt;img style="cursor:pointer; cursor:hand;width: 500px; height: 333px;" src="http://farm3.static.flickr.com/2784/4204267537_6591a4f79e.jpg" border="0" alt="" /&gt;&lt;br /&gt;&lt;br /&gt;surely...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/684397662881399859-3291480987012714314?l=shadowmint.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shadowmint.blogspot.com/feeds/3291480987012714314/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://shadowmint.blogspot.com/2010/01/no-fair.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/684397662881399859/posts/default/3291480987012714314'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/684397662881399859/posts/default/3291480987012714314'/><link rel='alternate' type='text/html' href='http://shadowmint.blogspot.com/2010/01/no-fair.html' title='No fair~'/><author><name>Doug Linder</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-JWqwUMiA7OA/AAAAAAAAAAI/AAAAAAAAACk/1--zQIzvNFw/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://farm3.static.flickr.com/2784/4204267537_6591a4f79e_t.jpg' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-684397662881399859.post-7077997371539226510</id><published>2010-01-01T22:49:00.000-08:00</published><updated>2010-01-01T22:55:51.281-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='gwt'/><category scheme='http://www.blogger.com/atom/ns#' term='junit'/><title type='text'>Unit Tests in GWT</title><content type='html'>Wow, the google tutorial about how to make unit tests in GWT using the eclipse plugin is strangely unhelpful.&lt;br /&gt;&lt;br /&gt;It's actually very easy...&lt;br /&gt;&lt;br /&gt;1) Create a test for your class.&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;package com.hax.gwt.client.events;&lt;br /&gt;&lt;br /&gt;import com.google.gwt.junit.client.GWTTestCase;&lt;br /&gt;&lt;br /&gt;public class ActionTest extends GWTTestCase {&lt;br /&gt;    &lt;br /&gt;    @Override&lt;br /&gt;    public String getModuleName() {&lt;br /&gt;        return(&amp;quot;com.hax.gwt.Libs&amp;quot;);&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;    public void testSample() {&lt;br /&gt;        Action a = new Action();&lt;br /&gt;        assertEquals(&amp;quot;OK&amp;quot;, a.sample());&lt;br /&gt;    }&lt;br /&gt;}&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;2) Create a test suite.&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;package com.hax.gwt.client.events;&lt;br /&gt;&lt;br /&gt;import junit.framework.Test;&lt;br /&gt;import junit.framework.TestSuite;&lt;br /&gt;import com.google.gwt.junit.tools.GWTTestSuite;&lt;br /&gt;&lt;br /&gt;public class eventsTestSuite extends GWTTestSuite {&lt;br /&gt;    public static Test suite() {&lt;br /&gt;        TestSuite suite = new TestSuite(&amp;quot;Tests for: com.hax.gwt.client.events&amp;quot;);&lt;br /&gt;        suite.addTestSuite(ActionTest.class);&lt;br /&gt;        return suite;&lt;br /&gt;    }&lt;br /&gt;}&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;3) Use the 'run as GWT unit test' on the test suite.&lt;br /&gt;&lt;br /&gt;:D! Note that getModuleName() should return a reference to an xml definition for a web application; it doesn't have to do anything, but that's the profile that is used to launch the client side unit tests.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/684397662881399859-7077997371539226510?l=shadowmint.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shadowmint.blogspot.com/feeds/7077997371539226510/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://shadowmint.blogspot.com/2010/01/unit-tests-in-gwt.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/684397662881399859/posts/default/7077997371539226510'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/684397662881399859/posts/default/7077997371539226510'/><link rel='alternate' type='text/html' href='http://shadowmint.blogspot.com/2010/01/unit-tests-in-gwt.html' title='Unit Tests in GWT'/><author><name>Doug Linder</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-JWqwUMiA7OA/AAAAAAAAAAI/AAAAAAAAACk/1--zQIzvNFw/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-684397662881399859.post-7207165129864782167</id><published>2009-12-22T20:11:00.000-08:00</published><updated>2009-12-23T21:36:36.022-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='jquery'/><category scheme='http://www.blogger.com/atom/ns#' term='christmas'/><title type='text'>jSnow Mods</title><content type='html'>Christmas is the perfect time for a bit of random snowflake action on the website, and jSnow (http://www.DuMmWiaM.com/jSnow) is an awesome little GPL jquery plugin to help with that.&lt;br /&gt;&lt;br /&gt;There are a couple of bugs tho, which I've fixed and GPL being great, here's the full source of the code post-mod.&lt;br /&gt;&lt;br /&gt;Changes:&lt;div&gt;- Unpacked (why was it ever packed? O_o)&lt;/div&gt;&lt;div&gt;- Now automatically replaces .png with .gif for IE6, IE7.&lt;/div&gt;&lt;div&gt;- Scrollbar doesn't go crazy in firefox.&lt;/div&gt;&lt;div&gt;- zIndex works properly in IE6.&lt;/div&gt;&lt;br /&gt;&lt;div&gt;To use it;&lt;/div&gt;&lt;pre  style="font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;;background-image:URL(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif);padding:0px;color:#000000;text-align:left;line-height:20px;"&gt;&lt;code style="color:#000000;word-wrap:normal;"&gt;   $(function() {  &lt;br /&gt;     $().jSnow({  &lt;br /&gt;       flakes : 25,  &lt;br /&gt;       flakeCode : [  &lt;br /&gt;         "/img/jsnow/snow.1.png",  &lt;br /&gt;         "/img/jsnow/snow.1.png",  &lt;br /&gt;         "/img/jsnow/snow.2.png",  &lt;br /&gt;         "/img/jsnow/snow.3.png",  &lt;br /&gt;         "/img/jsnow/snow.4.png",  &lt;br /&gt;         "/img/jsnow/snow.5.png",  &lt;br /&gt;         "/img/jsnow/snow.6.png",  &lt;br /&gt;         "/img/jsnow/snow.5.png",  &lt;br /&gt;         "/img/jsnow/snow.7.png",  &lt;br /&gt;         "/img/jsnow/snow.7.png"  &lt;br /&gt;       ],  &lt;br /&gt;       fallingSpeedMax : 2,  &lt;br /&gt;       fallingSpeedMin : 0,  &lt;br /&gt;       zIndex : 65535,  &lt;br /&gt;       interval : 30  &lt;br /&gt;     });  &lt;br /&gt;   });  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Notice how some of the images are repeated? That's handy for increasing the frequency of some types of snow flakes.&lt;br /&gt;&lt;br /&gt;And, here's the source:&lt;br /&gt;&lt;pre  style="font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;;background-image:URL(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif);padding:0px;color:#000000;text-align:left;line-height:20px;"&gt;&lt;code style="color:#000000;word-wrap:normal;"&gt; // jSnow, a jQuery Plugin v1.1.mod1  &lt;br /&gt; // Licensed under GPL licenses.  &lt;br /&gt; // Copyright (C) 2009 Nikos "DuMmWiaM" Kontis, dummwiam@gmail.com  &lt;br /&gt; // http://www.DuMmWiaM.com/jSnow  &lt;br /&gt; // Modified 2009~  &lt;br /&gt; (function ($) {  &lt;br /&gt;   $.fn.jSnow = function (h) {  &lt;br /&gt;     var j = $.extend({},  &lt;br /&gt;     $.fn.jSnow.defaults, h);  &lt;br /&gt;     var k, WIN_HEIGHT;  &lt;br /&gt;     setWaH();  &lt;br /&gt;     var l = j.flakes;  &lt;br /&gt;     var m = j.flakeCode;  &lt;br /&gt;     var n = j.flakeColor;  &lt;br /&gt;     var o = j.flakeMinSize;  &lt;br /&gt;     var p = j.flakeMaxSize;  &lt;br /&gt;     var q = j.fallingSpeedMin;  &lt;br /&gt;     var r = j.fallingSpeedMax;  &lt;br /&gt;     var s = j.interval;  &lt;br /&gt;     var t = j.zIndex;  &lt;br /&gt;     var useGif = false;  &lt;br /&gt;     if ($.browser.msie &amp;amp;&amp;amp; (parseFloat($.browser.version) &amp;lt; 8))  &lt;br /&gt;       useGif = true;  &lt;br /&gt;     if ($.browser.msie &amp;amp;&amp;amp; (parseFloat($.browser.version) &amp;lt; 8) &amp;amp;&amp;amp; t == "auto")  &lt;br /&gt;       t = 0;  &lt;br /&gt;     var u = $("&amp;lt;div \/&amp;gt;");  &lt;br /&gt;     u.css({  &lt;br /&gt;       width: k + "px",  &lt;br /&gt;       height: 1,  &lt;br /&gt;       display: "block",  &lt;br /&gt;       overflow: "visible",  &lt;br /&gt;       position: "absolute",  &lt;br /&gt;       top: $("html").scrollTop() + 1 + "px",  &lt;br /&gt;       left: "1px",  &lt;br /&gt;       zIndex: t  &lt;br /&gt;     });  &lt;br /&gt;     $("body").prepend(u).css({  &lt;br /&gt;       height: "100%"  &lt;br /&gt;     });  &lt;br /&gt;     $("html").css({  &lt;br /&gt;       "overflow-y": "scroll",  &lt;br /&gt;       "overflow-x": "hidden"  &lt;br /&gt;     });    var v = Array();  &lt;br /&gt;     generateFlake(l, false);  &lt;br /&gt;     setInterval(animateFlakes, s);  &lt;br /&gt;     window.onresize = setWaH;  &lt;br /&gt;     function setWaH() {  &lt;br /&gt;       k = $('body').width();  &lt;br /&gt;       WIN_HEIGHT = window.innerHeight || document.documentElement.clientHeight  &lt;br /&gt;       WIN_HEIGHT -= 50;  &lt;br /&gt;     };  &lt;br /&gt;     window.onscroll = function () {  &lt;br /&gt;       u.css({  &lt;br /&gt;         top: $("html").scrollTop() + "px"  &lt;br /&gt;       })  &lt;br /&gt;     };  &lt;br /&gt;     function generateFlake(a, b) {  &lt;br /&gt;       a = a || 1;  &lt;br /&gt;       b = b || false;  &lt;br /&gt;       var i = 0;  &lt;br /&gt;       for (i = 0; i &amp;lt; a; i++) {  &lt;br /&gt;         var c = $("&amp;lt;span \/&amp;gt;");  &lt;br /&gt;         var d = o + Math.floor(Math.random() * p);  &lt;br /&gt;         var e = m[Math.floor(Math.random() * m.length)];  &lt;br /&gt;         if (e.indexOf(".gif") != -1 || e.indexOf(".png") != -1) {  &lt;br /&gt;           var f = new Image();  &lt;br /&gt;           if (useGif)  &lt;br /&gt;             e = e.replace("png", "gif");  &lt;br /&gt;           f.src = e;  &lt;br /&gt;           e = "&amp;lt;img src='" + e + "' alt='jSnowFlake'&amp;gt;"  &lt;br /&gt;         }  &lt;br /&gt;         c.html(e).css({  &lt;br /&gt;           color: n[Math.floor(Math.random() * n.length)],  &lt;br /&gt;           fontSize: d + "px",  &lt;br /&gt;           display: "block",  &lt;br /&gt;           position: "absolute",  &lt;br /&gt;           cursor: "default",  &lt;br /&gt;           "z-index": t  &lt;br /&gt;         });  &lt;br /&gt;         $(u).append(c);  &lt;br /&gt;         f_left = Math.floor(Math.random() * (k - c.width() - 50)) + 25;  &lt;br /&gt;         f_top = (b) ? -1 * c.height() : Math.floor(Math.random() * (WIN_HEIGHT - 50));  &lt;br /&gt;         var g = Math.floor(Math.random() * 90);  &lt;br /&gt;         jQuery.data(c, "posData", {  &lt;br /&gt;           top: f_top,  &lt;br /&gt;           left: f_left,  &lt;br /&gt;           rad: Math.random() * 50,  &lt;br /&gt;           i: Math.ceil(q + Math.random() * (r - q)),  &lt;br /&gt;           swingRange: g  &lt;br /&gt;         });  &lt;br /&gt;         c.css({  &lt;br /&gt;           top: f_top + "px",  &lt;br /&gt;           left: f_left + "px"  &lt;br /&gt;         });  &lt;br /&gt;         v.push(c)  &lt;br /&gt;       }  &lt;br /&gt;     };  &lt;br /&gt;     function animateFlakes() {  &lt;br /&gt;       var i = 0;  &lt;br /&gt;       for (i = v.length - 1; i &amp;gt;= 0; i--) {  &lt;br /&gt;         var f = v[i];  &lt;br /&gt;         var a = jQuery.data(f, "posData");  &lt;br /&gt;         a.top += a.i;  &lt;br /&gt;         var b = Number();  &lt;br /&gt;         b = Math.cos((a.rad / 180) * Math.PI);  &lt;br /&gt;         a.rad += 2;  &lt;br /&gt;         var X = a.left - b * a.swingRange;  &lt;br /&gt;         f.css({  &lt;br /&gt;           top: a.top + "px",  &lt;br /&gt;           left: X + "px"  &lt;br /&gt;         });  &lt;br /&gt;         if (a.top &amp;gt; WIN_HEIGHT) {  &lt;br /&gt;           jQuery.removeData(f);  &lt;br /&gt;           f.remove();  &lt;br /&gt;           v.splice(i, 1);  &lt;br /&gt;           generateFlake(1, true)  &lt;br /&gt;         }  &lt;br /&gt;       }  &lt;br /&gt;     };  &lt;br /&gt;     return this  &lt;br /&gt;   };  &lt;br /&gt;   $.fn.jSnow.defaults = {  &lt;br /&gt;     flakes: 30,  &lt;br /&gt;     fallingSpeedMin: 1,  &lt;br /&gt;     fallingSpeedMax: 3,  &lt;br /&gt;     flakeMaxSize: 20,  &lt;br /&gt;     flakeMinSize: 10,  &lt;br /&gt;     flakeCode: ["&amp;amp;bull;"],  &lt;br /&gt;     flakeColor: ["#fff"],  &lt;br /&gt;     zIndex: "auto",  &lt;br /&gt;     interval: 50  &lt;br /&gt;   }  &lt;br /&gt; })(jQuery);  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/684397662881399859-7207165129864782167?l=shadowmint.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shadowmint.blogspot.com/feeds/7207165129864782167/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://shadowmint.blogspot.com/2009/12/jsnow-mods.html#comment-form' title='9 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/684397662881399859/posts/default/7207165129864782167'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/684397662881399859/posts/default/7207165129864782167'/><link rel='alternate' type='text/html' href='http://shadowmint.blogspot.com/2009/12/jsnow-mods.html' title='jSnow Mods'/><author><name>Doug Linder</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-JWqwUMiA7OA/AAAAAAAAAAI/AAAAAAAAACk/1--zQIzvNFw/s512-c/photo.jpg'/></author><thr:total>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-684397662881399859.post-9207904506667131600</id><published>2009-12-15T19:12:00.000-08:00</published><updated>2009-12-15T19:19:18.083-08:00</updated><title type='text'>Mortal Combat Coffee?</title><content type='html'>&lt;div&gt;&lt;img style="margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 320px; height: 240px;"src="http://images.cheezburger.com/completestore/2009/12/9/129048835070297810.jpg" border="0" alt="" /&gt;&lt;/div&gt;&lt;div&gt;&lt;p&gt;Dragon coffee! Wow, this is the most awesome thing I've seen in ages~&lt;/p&gt;&lt;p&gt;I wish the local coffee place here made coffee like this... *sigh*&lt;/p&gt;&lt;p&gt;cred: &lt;a href="http://epicwinftw.com/2009/12/12/careful-the-beverage-youre-about-to-enjoy-is-extremely-awesome/"&gt;link&lt;/a&gt;.&lt;/p&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/684397662881399859-9207904506667131600?l=shadowmint.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shadowmint.blogspot.com/feeds/9207904506667131600/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://shadowmint.blogspot.com/2009/12/mortal-combat-coffee.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/684397662881399859/posts/default/9207904506667131600'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/684397662881399859/posts/default/9207904506667131600'/><link rel='alternate' type='text/html' href='http://shadowmint.blogspot.com/2009/12/mortal-combat-coffee.html' title='Mortal Combat Coffee?'/><author><name>Doug Linder</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-JWqwUMiA7OA/AAAAAAAAAAI/AAAAAAAAACk/1--zQIzvNFw/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry></feed>
