RSS

FOSUserBundle remember me function

January 22nd, 2012 • PHP, Programming, Web DevelopmentNo Comments »

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

January 20th, 2012 • PHP, Programming, Web DevelopmentNo Comments »

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

May 29th, 2011 • PHP, Programming, Web DevelopmentNo Comments »

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

[...]

How to Increase Mac OS X Snow Leopard Virtual Machine Screen Resolution on VirtualBox and VMware

April 12th, 2011 • Sys adminNo Comments »

Are you running Snow Leopard on Intel or AMD Computers by any of the desktop virtualization software VMware or VirtualBox? Then this post will be helpful to increase screen resolution size of Snow Leopard Virtual Machine to get full screen. Adjusting screen size including wide screen on VMware is easy since VMware tools ( Not official, with VGA driver) available, but setting up screen resolution in VirtualBox is slightly different for each installation methods [...]

Build Your Own Linux Test Server

April 9th, 2011 • Linux, Sys adminNo Comments »

Last year, we built a DIY Linux workstation with an eye toward creating a high-end development machine with the ability to run multiple virtual machines at the same time. Now, we’re going to build a machine fit for testing server operating systems to include functioning as a KVM or Xen virtual host. The other goal is to have a flexible machine capable of being quickly reconfigured for testing purposes. As new versions of operating systems are released, they must be tested with any custom software applications before being putt into production. Our DIY server will, hopefully, fulfill this role perfectly [...].

JSMin – The JavaScript Minifier

April 9th, 2011 • JavaScript, Web DevelopmentNo Comments »

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

April 9th, 2011 • JavaScript, Programming, Web DevelopmentNo Comments »

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

Use Linux and WebDAV to Facilitate Online Collaboration

April 9th, 2011 • General, Linux, Sys adminNo Comments »

Unlike FTP, HTTP provides strong authentication and encryption, as well as caching and proxy support — and because WebDAV works over HTTP, WebDAV gets all of that for free. SSH would be another option, but SSH is a bit more limited in terms of moving files around, and it has nowhere near the quality of client support and tools available. [...]

Negative CAPTCHA

April 7th, 2011 • CSS, Web DevelopmentNo Comments »

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. [...]

Linux Tips: Password usage in sudo (PASSWD / NOPASSWD)

April 6th, 2011 • Linux, Sys adminNo Comments »

If you are using sudo you most certainly know that the default setup will require the user running sudo to enter a password (by default the password of the user running sudo).
I will show you in this post what options sudo offers related to passwords and how they can be used. [...]