RSS

Archive for the ‘Programming’ 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

[...]

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

Xtext – Language Development Framework

Wednesday, February 16th, 2011

With Xtext you can easily create your own programming languages and domain-specific languages (DSLs). The framework supports the development of language infrastructures including compilers and interpreters as well as full blown Eclipse-based IDE integration. While Xtext equips you with a set of sensible defaults, you can tweak every single aspect of your language with Xtext’s powerful APIs. A comprehensive documentation as well as the vivid community will help you getting started in no time. And if that is not enough you can buy trainings, consulting or support contracts delivered directly by the committers.

More about this here: http://www.eclipse.org/Xtext/

JSON vs. XML

Tuesday, February 1st, 2011

James Clark, technical lead for the World Wide Web Consortium’s XML activity, published a blog post today about the perceived competition between JSON and XML. Twitter and Foursquare both recently dropped support for XML, opting to use JSON exclusively. Clark doesn’t see XML going away, but sees it less and less as a Web technology. “I think the Web community has spoken,” Clark concludes. “And it’s clear that what it wants is HTML5, JavaScript and JSON.” Clark cites a few particular reasons why JSON is winning the hearts and minds of web developers.

Read more here: http://blog.jclark.com/2010/11/xml-vs-web_24.html