January 22nd, 2012 • PHP, Programming, Web Development • No 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
January 20th, 2012 • PHP, Programming, Web Development • No 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
May 29th, 2011 • PHP, Programming, Web Development • No 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
[...]
April 12th, 2011 • Sys admin • No 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 [...]
April 9th, 2011 • Linux, Sys admin • No 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 [...].
April 9th, 2011 • JavaScript, Web Development • No 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. [...]
April 9th, 2011 • JavaScript, Programming, Web Development • No Comments »
Douglas Crockford presents a debate existing around XML and JSON, and the negative effect of the Intellectual Property laws on open source software. [...]
April 9th, 2011 • General, Linux, Sys admin • No 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. [...]
April 7th, 2011 • CSS, Web Development • No 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. [...]
April 6th, 2011 • Linux, Sys admin • No 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. [...]