Below are snippets for albud.
12
Don't know if anyone will find this handly, but here's a CSS processor that I wrote that allows me to nest CSS Blocks, and various other things, making for an easier to maintain CSS file.
Warning: I'd recommend caching the results since I didn't have a need to optomize it for speed.
Things that it includes:
*Nested CSS Rules
*Removes Whitespace
*Allows for // comments
*Removes comments (so put them in at no cost)
Please let me know what you think
Warning: I'd recommend caching the results since I didn't have a need to optomize it for speed.
Things that it includes:
*Nested CSS Rules
*Removes Whitespace
*Allows for // comments
*Removes comments (so put them in at no cost)
Please let me know what you think
9
Rather than have standalone functions rtrim, ltrim, and trim (as in http://www.bytemycode.com/snippets/snippet/397/) why not have them as methods of all string objects?
8
I like to have these two methods in my toolbelt, even though it's syntactic sugar, I think it aids clarity.
7
A websafe colour palette generator in JavaScript. Coded this after looking at http://www.bytemycode.com/snippets/snippet/585/ and wanting to do it differently.
It's been refactored so that:
* can pass generateColourPalette an arbitrary array of colour codes and it'll generate a palette.
* it hooks into the page through the external file
* uses an internal stylesheet instead of inline styles
It's been refactored so that:
* can pass generateColourPalette an arbitrary array of colour codes and it'll generate a palette.
* it hooks into the page through the external file
* uses an internal stylesheet instead of inline styles
7
A proof of concept idea I had for implementing an aspect oriented framework in PHP (yes, I know about http://aophp.net, but it requires a module).
I thought it was neat, so I'm going to share it.
Hope someone likes it.
I thought it was neat, so I'm going to share it.
Hope someone likes it.









