connect-static2x is middleware identical to connect’s native static() middleware except for enabling support for image resizing on the fly. After an image is processed it’s saved in the same directory as the original so the next request is cached.
This makes it incredibly easy to serve dynamically sized images and support retina devices without having to worry about creating sprites or multiple versions of images. Retina support is a snap when used with something like retina.js on the frontend.
static2x will interpret and process any jpeg or png in the following format using the default options:
/example.png Served as usual.
/email@example.com Nothing will happen. Original file will be returned instead of upscaling.
/example-200x200.png The original file will be returned proportionally scaled to 200×200.
/example-200x200c.png The original file will be returned proportionally scaled and cropped to 200×200.
/firstname.lastname@example.org The original file will be returned proportionally scaled and cropped to 400×400.
As you apply API level event listeners throughout your application you must remember to remove the event when you are done with it, usually when the window is closed. Otherwise your events will end up firing multiple times and things can get messy. Especially if a sql query is part of the call. These stray event listeners are also known as “zombie event listeners”.
The object below can help you manage your events and you will never have to worry about removing them. Any event listener you add with this wrapper will automatically get removed when the window is closed. It is essentially a wrapper for Ti.API.addEventListener and allows you to assign an event to a specific window.
At work we have a shell script to handle the migration from to dev to staging to production and so on. The script properly converts the serialized objects containing the domain name and replacing the old one. It works great, however, it’s a shell script. I wanted something faster, easier, and something I could use from any computer, anywhere. So I wrote peach. Also, this doesn’t have to be WordPress site, it will handle ANY standard mysql dump. And I named it Peach. Enjoy.
It is commonly used for tweening powered by css. This is all well and good, but what if you want to tween a dom element attribute such as viewBox on a SVG element? Well, the animation method can handle that as well. Take a look.
Also, see a working example here. (Works in all modern browsers)
The “duration” is the amount of milliseconds the tween will last. “step” will be called at every step of the tween which is where you will put your animation logic of course, and finally “complete” will be called once the tween if finished. Tween on.
This app distinguishes itself in it’s ease of use by instantly calculating rates without having to press extraneous buttons. When negotiating a loan, this can be useful on both sides of the table by allowing the users to convert from APR to Effective rate and back seamlessly and effortlessly.