Skip to content

Instantly share code, notes, and snippets.

View achrafsoltani's full-sized avatar

Achraf Soltani achrafsoltani

View GitHub Profile
@Dattaya
Dattaya / 10.parameters.ini
Created January 24, 2012 13:24
How to store user's locale in database. FOSUserBundle, Symfony2.0.9
# symfony2/app/config/parameters.ini
locale="undefined"
fallback_locale="en"
@muratpurc
muratpurc / gist:1341358
Created November 5, 2011 10:08
PHP/CSS: Extract all url definitions (e. g. background images) in CSS declarations
/**
* Extracts all url definitions (e. g. urls to background images) in CSS.
*
* This snippet could be usefull within a build process where css files are
* distributed in different folder during development and should be merged together.
* Existing url definitions could be invalid in some cases.
*/
// example css content, could be read from a file
$cssFileContent = <<<CSS