Skip to content

Instantly share code, notes, and snippets.

@isidromerayo
isidromerayo / gist:3772431
Created September 23, 2012 17:35
permisos para proyecto web
find /var/www/html -type d -exec chmod -R 775 {} \;
find /var/www/html -type f -exec chmod -R 664 {} \;
@isidromerayo
isidromerayo / gist:3781107
Created September 25, 2012 10:35
ls -la releases
~/my_app_deploy]$ ls -al releases/20120925094501/
total 0
?--------- ? ? ? ? ? .
?--------- ? ? ? ? ? ..
?--------- ? ? ? ? ? .buildpath
?--------- ? ? ? ? ? build.xml
?--------- ? ? ? ? ? Capfile
?--------- ? ? ? ? ? composer.json
?--------- ? ? ? ? ? composer.lock
?--------- ? ? ? ? ? config
@isidromerayo
isidromerayo / testing.yml
Created September 25, 2012 10:38
mage enviroment testing
#testing
deployment:
user: my_user
from: ./
to: /var/www/my_user/my_app_deploy
excludes:
- build
- tests
releases:
enabled: true
@isidromerayo
isidromerayo / gist:3786949
Created September 26, 2012 09:13
Permisos en Symfony
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
@isidromerayo
isidromerayo / all-in-one-symfony2-jobeet.sh
Created September 28, 2012 16:45
symfony2-jobeet (sf2.1.x)
#!/bin/sh
curl -s https://getcomposer.org/installer | php
php composer.phar create-project isidromerayo/symfony2-jobeet
cd symfony2-jobeet
@isidromerayo
isidromerayo / backup_mysql_per_table.sh
Created October 1, 2012 12:57
backup mysql file per table
#!/bin/bash
# comands
ECHO=/bin/echo
DATE=/bin/date
DF=/bin/df
EXPORT=/usr/bin/mysqldump
#validate number params
@isidromerayo
isidromerayo / restore_mysql_all_tables.sh
Created October 1, 2012 12:58
restore mysql all tables from file per table
#!/bin/bash
# comands
ECHO=/bin/echo
DATE=/bin/date
DF=/bin/df
EXPORT=/usr/bin/mysqldump
#validate number params
@isidromerayo
isidromerayo / .gitignore
Created November 2, 2012 19:06
my personal gitignore (PHP and IDEs)
# https://github.com/github/gitignore
# build - files generate with tools for static PHP code analyses
build
## generic files to ignore
*~
*.lock
*.DS_Store
*.swp
@isidromerayo
isidromerayo / Guardfile
Created November 8, 2012 09:54
guard phpunit symfon2 to src/Hcuv
guard 'phpunit', :cli => '-c app/ ', :tests_path => 'src',
:keep_failed => true, :all_after_pass => true do
watch(%r{^src/Hcuv/(.+)Tests/.+Test\.php$}) { |m| "#{m[0]}" }
watch(%r{^src/Hcuv/(.+)/(.*)/(.+)\.php$}) { |m| "src/Hcuv/#{m[1]}/Tests/#{m[2]}/#{m[3]}Test.php" }
end
@isidromerayo
isidromerayo / gist:4042122
Created November 8, 2012 22:19
problems to update packagist.ogr
[Composer\Repository\InvalidRepositoryException] Some branches contained invalid data and were discarded, it is advised to review the log and fix any issues present in branches
Reading composer.json of isidromerayo/simple_php_skeleton (v0.6)
Importing tag v0.6 (0.6.0.0)
Reading composer.json of isidromerayo/simple_php_skeleton (v0.5)
Importing tag v0.5 (0.5.0.0)
Reading composer.json of isidromerayo/simple_php_skeleton (gh-pages)
Skipped branch gh-pages, no composer file
Reading composer.json of isidromerayo/simple_php_skeleton (master)
Importing branch master (dev-master)
Skipped branch master, Invalid package information: