Skip to content

Instantly share code, notes, and snippets.

View stefanosala's full-sized avatar
👋

Stefano Sala stefanosala

👋
View GitHub Profile
400 acqua
2 lievito
20 olio
400 integrale
100 00 240W
8 sale
@stefanosala
stefanosala / Stefano_Sala.md
Last active December 22, 2015 01:29 — forked from pvh/gist:6394061

Stefano Sala

Hello! My name is Stefano. I am a software developer since 2003, coming from Italy, I'm now living in the countryside near Zurich.

I am a freelance since a couple of years, after beeing employed in top consultancy companies and agencies.

While I have some experience in the frontend development, I've been moving toward backend web development with Symfony2 framework and testing methodologies.

Please have a look at my Github profile and at my resume.

<?php
for ($i = 1; $i <= 100; $i++) {
if ($i % 3 === 0 && $i % 5 === 0) {
echo 'FooBar';
} elseif ($i % 3 === 0) {
echo 'Foo';
} elseif ($i % 5 === 0) {
echo 'Bar';
} else {
@stefanosala
stefanosala / Best bundle list.md
Last active December 20, 2015 18:09
Best bundles for Symfony2

Here's a list of bundles I would suggest to use on every project that needs them. I will do my best to keep it updated, but please feel free to send PR.

API

File handling

@stefanosala
stefanosala / dev.zone
Last active December 19, 2015 11:28
My dynamic vhost configuration on OSX
$TTL 86400
$ORIGIN dev.
@ 1D IN SOA @ root (
424 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
1D IN NS @
@stefanosala
stefanosala / gist:3881637
Created October 12, 2012 21:31
My vhosts configuration
<VirtualHost *:80>
ServerName dev
ServerAlias *.dev
DocumentRoot /Users/stefanosala/Sites
SetEnv LocalDev true
RewriteEngine on
RewriteCond %{HTTP_HOST} !^www.* [NC]
<?php
if (!$iniPath = get_cfg_var('cfg_file_path')) {
$iniPath = 'WARNING: not using a php.ini file';
}
echo "********************************\n";
echo "* *\n";
echo "* Symfony requirements check *\n";
echo "* *\n";
public function testLocaleNameNotNull()
{
$em = $this->getContainer()->get('doctrine')->getEntityManager();
$valley = new Valley();
$valley->setName('Valley');
$valley->setTranslatableLocale('it');
$em->persist($valley);
array(4) {
["value"]=>
string(2) "ko"
["message"]=>
string(23) "Unable to validate poi."
["app_error_code"]=>
int(0)
["errors"]=>
array(4) {
[0]=>
GET /pois/1/comments
{"status":{"value":"ok","message":"","app_error_code":0},"response":[{"id":2,"user":{"username":"fooUsername","email":"foo@email.it","id":1,"skierType":{"id":1,"name":"SkierType 1"},"myDolomitiSkiCardValid":false,"createdAt":"2011-10-07T10:46:12+0200","updatedAt":"2011-10-07T10:46:12+0200","culture":"IT","registrationType":0,"emailValid":true,"acceptedPrivacy":true,"acceptedTerms":true,"receiveNewsletter":false},"message":"Lorem ipsum dolor sit amet.","createdAt":"2011-10-01T00:00:00+0200","poi":{"id":1,"name":"Poi 1","valley":{"id":2,"name":"Valley 1","geoLocation":{"latitude":"1","longitude":"1"}},"poiCategory":{"id":1,"name":"Poi category 1","icon":"dummyIcon.png","checkeable":true},"geoLocation":{"latitude":"1","longitude":"1"},"address":"Cortina d'Ampezzo","zipCode":"20100","province":{"name":"Province 1","code":"P1"},"description":"Lorem ipsum dolor sit amet.","icon":"dummyIcon.png"}},{"id":1,"user":{"username":"fooUsername","email":"foo@email.it","id":1,"skierType":{"id":1,"name":"