Please click below to be redirected!
http://blog.mdnsolutions.com/
Thanks!
$ \curl -L https://get.rvm.io | bash -s stable --ruby
# Virtual hosts
Include /private/etc/apache2/extra/httpd-vhosts.conf
#
# Use name-based virtual hosting.
#
NameVirtualHost *:80
<VirtualHost *:80>
DocumentRoot "/Library/WebServer/Documents"
ServerName localhost
</VirtualHost>
<VirtualHost *:80>
<Directory /Users/<youruser>/Sites/vhOne>
AllowOverride All
</Directory>
DocumentRoot "/Users/<youruser>/Sites/vhOne"
ServerName vhOne.local
</VirtualHost>
127.0.0.1 vhOne.local
I hope it is userful. See ya around!$ wget https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-beta_current_i386.deb
Instalando o mod_pagespeed desta forma um repositório do google será adicionado ao seu sistema automanticamente mantendo assim o módulo sempre atualizado. Caso você não deseje esse recurso basta apenas digitar o comando "touch /etc/default/mod-pagespeed" antes de instalar o pacote.
$ dpkg -i mod-pagespeed-*.deb
$ apt-get -f install
$ yum install at # if you do not already have 'at' installed
$ rpm -U mod-pagespeed-*.rpm
$query = Doctrine_Query::create()
->select('t1.*')
->from('entityName t1')
->where('t1.columnName is NULL');
$resultSet = $query->execute(array(), Doctrine::HYDRATE_ARRAY);
$dql = $entityManager->createQueryBuilder()
->select('t')
->from('ns:Entity', 't')
->where('t.columnName is NULL ');
$arrayOfData = $dql->getQuery()->execute();
Cron Job que rode todo dia as 08:00am
0 8 * * * linha-de-comando
Cron Job que rode a meia-noite de três em três dias
0 0 */3 * * linha-de-comando
Cron Job que rode as 14h30 de segunda e sexta
30 14 * * 1,5 linha-de-comando
Cron Job que rode todo dia a cada duas horas
0 */2 * * * linha-de-comando
$ sudo nano /etc/crontab
* 1 * * * root /var/www/arquivo_cron.txt
$ chmod 755 /var/www/arquivo_cron.txt
$ tail -f /var/log/syslog
$ cd /var/www
$ git clone https://github.com/zendframework/ZendSkeletonApplication.git zf2
$ composer self-update
$ composer install
$ curl -s https://getcomposer.org/installer | php
$ curl -s https://getcomposer.org/installer | php
All settings correct for using Composer
Downloading...
Composer successfully installed to: /home/medina/composer.phar
Use it: php composer.phar
$ sudo mv composer.phar /usr/local/bin/composer
$ composer create-project symfony/framework-standard-edition path/ 2.1.2
$ rm -rf .git
$ php ./app/check.php
$ sudo apt-get install php5-intl
short_open_tag = Off
$ chmod 777 -R app/cache/ $ chmod 777 -R app/logs/
$ php ./app/console server:run
Some settings on your machine may cause stability issues with Composer.
If you encounter issues, try to change the following:
The date.timezone setting should be provided.
Add the following to the end of your `php.ini`:
; UTC here is an example, use your own timezone, see http://www.php.net/manual/en/timezones.php
date.timezone = UTC
Downloading...
Composer successfully installed to: /home/user/composer.phar
Use it: php composer.phar
shell> nano /etc/php5/cli/php.ini
[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone = 'America/Sao_Paulo'
shell> ln -s /etc/apache2/mods-available/rewrite.load /etc/apache2/mods-enabled/
shell> cd /etc/apache2/sites-available/
<VirtualHost *:80>
ServerName local.zf
DocumentRoot "/var/www/zf/public"
SetEnv APPLICATION_ENV "development"
<Directory "/var/www/zf/public">
Options Indexes MultiViews FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
shell> ln -s /etc/apache2/sites-available/local.zf /etc/apache2/sites-enabled/
shell> nano /etc/hosts
shell> unzip ZendFramework-1.12.0-minimal.zip
shell> rm -R ZendFramework-1.12.0-minimal.zip
cd /var/www$ ./path/ZendFramework-1.12.0-minimal/bin/zf.sh create project zf
shell> cp -R /path/ZendFramework-1.12.0-minimal/library/Zend/ /var/www/zf/library/
shell> /etc/init.d/apache2 restart
shell> service apache2 restart
<?php
echo "Go to: ";
goto middle;<p>
echo 'The Begin';
exit;
middle:
echo 'The middle';
exit;
end:
echo 'The end';
exit;
?>
<?php
for($i=0, $j=50; $i<100; $i++) {
while ($j--) {
if ($j==17) goto end;
}
}
echo "i = " . $i;
end:
echo 'j hit 17';
?>
<?php
goto loop;
for($i=0,$j=50; $i<100; $i++) {
loop:
echo 'test';
}
echo "$i = $i";
?>
<VirtualHost *:80>
ServerName test.local
DocumentRoot "/home/local/public"
SetEnv APPLICATION_ENV "development"
AllowEncodedSlashes On
<Directory "/home/local/public">
DirectoryIndex index.php
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>