While developing a website for a client, I was tasked with creating text that would fade in and out continuously. I figured that use case would be useful for many websites so I decided to create a class. It turns out the class is useful for cases where any html content has to be shown and hidden. The class is called Marquee.
I wrote several methods for controlling the Marquee class. Although I didn’t implement them for my current use case, I though they would be useful in the future. Methods included are
- load
- append
- start
- stop
- clear
- empty
- next
- previous
The class also accepts various options for configuring the Marquee and its messages. Last, I thought it would useful to monitor the different states of the Marquee so it allows several events to be observed. These are:
- start
- stop
- change
- before
- after
No Comments »
There’s been quite a bit of talk about polluting the global namespace. It is certainly one of those things I try to be conscious of when I develop. I wanted a convenient means of creating namespaces and importing classes into them. This led to the development of Package.
Package provides a method for dynamically creating namespaces. These namespaces can be immediately used to create classes, simple functions, variables, etc. Existing classes that are organized in folder structures can be imported at any time using a namespace that resembles the path to the class.
Other javascript and css files can also be included on a page using the static include method.
Using the require and include methods make it possible to create web pages that load much faster by delaying the load of classes until you need them in your code. There are also two events (success and failure) that can be observed so that code can executed accordingly.
Check out the project page for usage information and examples.
No Comments »
After a few days work, I am sharing with everyone my first (and surely not the last) prototypejs class. It allows you to easily provide notifications on your website similar to the Growl on the Mac OS.
This exists as a plugin for MooTools and jQuery but I didn’t see one for Prototype so I decided to provide one for the community.
Growler Project Page and Examples
4 Comments »
In this article, I will cover applications that can help make your Mac more secure.
Many people think like this:
- Macs run FreeBSD (linux) under the hood and linux is supposed to be more secure than Windows
- Macs don’t really get viruses like PCs
“…Apple now lags behind Microsoft’s latest software in implementing library randomization, data-execution protection, and other advanced security features” - MacWorld October 2008
Read the rest of this entry »
1 Comment »
Many have ask how I got the spaces on my dock in Mac OS X. While I got mine using MacPilot, I figured others may want it too so I did a little research. I found a way to add real separators to the dock, instead of adding dummy applications with empty or decorative icons, as indicated by many websites I found.
This works only in Leopard (OSX 10.5):
- Run the following commands from the Terminal:
defaults write com.apple.dock persistent-apps -array-add ‘{ “tile-type” = “spacer-tile”; }’
killall Dock
- Once the dock restarts, you should see a blank space after the last application that is permanently in the Dock (before the icons for applications that are currently running but not always in the Dock).
- You can now drag the empty spaces to where you want them, or right-click on them and select “Remove from Dock” if you no longer need them.
Note: you can run the “defaults” command several times in sequence before the “killall” command, to add multiple separators in one go and then just rearrange them as needed.
I also included an Automator Workflow to accomplish this task by double-clicking it.
Add Spacer to Dock zip
No Comments »
Just got back from the Rich Web Experience 2008. A lot of great information was covered there. This is a summary of the sessions and keynotes that I was privileged to hear.
Day 1
Day 2
Day 3
I gained a wealth of knowledge from attending these sessions. I would highly recommend them to everyone. Check back for more information where I will start covering most of the subjects that were covered at RWE2008.
1 Comment »