RSS

Archive for the ‘Web Development’ Category

FOSUserBundle remember me function

Sunday, January 22nd, 2012

If FOSUserBundle does not create a cookie for you there might be a problem with the security.yml. Make sure you have the following lines:

firewalls:
main:
remember_me:
key: aSecretKey
lifetime: 604800
path: /
domain: mydomain.com

Cleanup your Symfony

Friday, January 20th, 2012

I recently switched to Symfony (which is great BTW).
Anyway, I found annoying that as a regular user I can’t delete the generated files with apache permissions, so I created a shell script which does exactly that.
Here it comes:

#!/usr/bin/env bash

DIR="$(cd -P "$(dirname "${BASH_SOURCE[0]}")" && pwd)/.."

ok() {
printf "\033[32m"
printf "[OK]"
printf "\033[0m"
printf "\n"
}

msg() {
printf "\e[1;34m$1\t"
}

msg "Cleaning cache" && sudo rm -r $DIR/app/cache/* && ok
msg "Cleaning logs" && sudo rm -r $DIR/app/logs/* && ok
printf "\033[0m"

Place it in your project’s bin folder and you’re good to go :-bd

Smarty 3 extension for Zend Framework

Sunday, May 29th, 2011

Smarty 3 extension is easy to integrate and with full compatibility of view and layout templates which supports all standard features like modules and view rendering in ajax, json, xml. All helpers with Smarty 3 are working nicely without any intervention.

Features:

  • Layout and view rendering by standard rules
  • Static template path for each module
  • All helper support including ajax, json, xml contexts

[...]

JSMin – The JavaScript Minifier

Saturday, April 9th, 2011

JSMin is a filter which removes comments and unnecessary whitespace from JavaScript files. It typically reduces filesize by half, resulting in faster downloads. It also encourages a more expressive programming style because it eliminates the download cost of clean, literate self-documentation. [...]

Heresy & Heretical Open Source: A Heretic’s Perspective

Saturday, April 9th, 2011

Douglas Crockford presents a debate existing around XML and JSON, and the negative effect of the Intellectual Property laws on open source software. [...]

Negative CAPTCHA

Thursday, April 7th, 2011

It’s a neat idea, instead of asking the user to prove he’s human, it instead tricks the spam bot into revealing it’s a bot. It does this with a email field that is hidden from the user by CSS. [...]

Conditional-CSS

Tuesday, April 5th, 2011

Conditional-CSS was developed out of the desire to overcome CSS rendering bugs in a wide range of browsers, ensuring as many visitors as possible see your site’s design correctly. The core idea is based on the method of Conditional Comments found in Internet Explorer, extended to include other browsers, and to move the conditional statements inline with your CSS definitions.

Conditional-CSS isn’t really all that interested in which browser the user is using, but rather what rendering engine the user’s browser utilises. This is why Conditional-CSS uses ‘Gecko’ rather than the well known Firefox as one of it’s browser conditions. Likewise for Safari ‘Webkit’ is used. This allows other browsers using the same rendering engines to receive the same targeted CSS. An exception to this rule is made for IE (rather than using ‘Trident’) since this is what the IE conditional comments use and Trident isn’t particuarly well known. Similarly for Opera, since only the Opera browser uses it’s Presto rendering engine, ‘Opera’ is used.

It should be noted that if all browsers were to correctly implement the CSS specifications released by the W3C there would be no need for Conditional-CSS. However, CSS bugs are a fact of life for web-developers and are often extremely frustrating. Conditional-CSS offers us a simple solution to overcome these problems.

[...]

sIFR 2.0: Rich Accessible Typography for the Masses

Thursday, March 24th, 2011

It’s been well over ten years now since the debut of the graphical web browser and we still don’t have an easy way to deliver rich typography using HTML/CSS. With CSS we can size, style, color, kern, show, and hide our text but we can’t deliver something classical typesetters have delivered since at least the 15th century: custom typography. Until now. In concert with Shaun Inman and Tomas Jogin, I am releasing into the public domain a scalable, multiline, Flash 6 compatible version of IFR to help you reduce the amount of browser text in your life and free the world from the scourge of Arial.

An updated example of sIFR (now at version 2.0) is available here.

[...]

Introducing Text-Stroke

Wednesday, March 23rd, 2011

WebKit now supports stroking of text via CSS. In existing Web pages today, the glyphs that are drawn for text are always filled with a single color, specified by the color CSS property. Sometimes authors may want to stroke the edges of the glyphs with one color, and fill with a different color. By stroking text and not filling the interior at all, you can achieve an outline effect (this option exists in TextEdit for example and in OS X text field context menus).

I have introduced four new properties to CSS to support the stroking of text:

text-fill-color – This property allows you to specify a fill color for text. If it is not set, then the color property will be used to do the fill.
text-stroke-color – This property allows you to specify a stroke color for text. If it is not set, then the color property will be used to do the stroke.
text-stroke-width – This property allows you to specify the width of the stroke. It defaults to 0, meaning that only a fill is performed. You can specify a length for this value, and in addition the values thin, medium and thick can be used (with ‘thin’ being most like the outline behavior of OS X).
text-stroke – This property is a shorthand for the two stroke properties. [...]

What is OpenFaces?

Sunday, February 13th, 2011

OpenFaces is an open-source library of AJAX-powered JSF components, an Ajax framework and a client-side validation framework. OpenFaces is based on the set of JSF components formerly known as QuipuKit. It contains fully revised codebase of QuipuKit and introduces many new components and features.

Read more here: http://www.openfaces.org/