This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @expectedException OutOfBoundsException | |
*/ | |
public function testThrowsException() | |
{ | |
$mock = m::mock('MyMockedClass'); | |
$mock->shouldReceive('foo')->andThrow(new OutOfBoundsException); | |
$mock->foo(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
curl -s https://getcomposer.org/installer | php | |
php composer.phar create-project isidromerayo/simple_php_skeleton --dev | |
cd simple_php_skeleton | |
bin/phpunit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ composer.phar create-project symfony/framework-standard-edition demo_sf2.x | |
Installing symfony/framework-standard-edition (dev-master 506ffaab8d8474db2512fca879ca4b9877616a1e) | |
- Installing symfony/framework-standard-edition (dev-master master) | |
Cloning master | |
Created project in demo_sf2.x | |
Loading composer repositories with package information | |
Installing dependencies from lock file | |
Your lock file is out of sync with your composer.json, run "composer.phar update" to update dependencies | |
Your requirements could not be resolved to an installable set of packages. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://www.catswhocode.com/blog/10-useful-htaccess-snippets-to-have-in-your-toolbox | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find /var/www/html -type d -exec chmod -R 775 {} \; | |
find /var/www/html -type f -exec chmod -R 664 {} \; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~/my_app_deploy]$ ls -al releases/20120925094501/ | |
total 0 | |
?--------- ? ? ? ? ? . | |
?--------- ? ? ? ? ? .. | |
?--------- ? ? ? ? ? .buildpath | |
?--------- ? ? ? ? ? build.xml | |
?--------- ? ? ? ? ? Capfile | |
?--------- ? ? ? ? ? composer.json | |
?--------- ? ? ? ? ? composer.lock | |
?--------- ? ? ? ? ? config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#testing | |
deployment: | |
user: my_user | |
from: ./ | |
to: /var/www/my_user/my_app_deploy | |
excludes: | |
- build | |
- tests | |
releases: | |
enabled: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo setfacl -R -m u:www-data:rwx -m u:`whoami`:rwx app/cache app/logs | |
sudo setfacl -dR -m u:www-data:rwx -m u:`whoami`:rwx app/cache app/logs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
curl -s https://getcomposer.org/installer | php | |
php composer.phar create-project isidromerayo/symfony2-jobeet | |
cd symfony2-jobeet |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# comands | |
ECHO=/bin/echo | |
DATE=/bin/date | |
DF=/bin/df | |
EXPORT=/usr/bin/mysqldump | |
#validate number params |