This file contains hidden or 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 | |
| declare(strict_types=1); | |
| return [ | |
| // Provides application-wide services. | |
| // We recommend using fully-qualified class names whenever possible as | |
| // service names. | |
| 'dependencies' => [ | |
| // Use 'aliases' to alias a service name to another service. The |
This file contains hidden or 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
| RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer |
This file contains hidden or 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
| USE [master] | |
| GO | |
| if not exists(select * from sys.databases where name = 'SqlTrainingOnlineSimpleDB') | |
| CREATE DATABASE [SqlTrainingOnlineSimpleDB] | |
| GO | |
| USE [SqlTrainingOnlineSimpleDB] | |
| GO |
This file contains hidden or 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
| switch $name { | |
| case (preg_match('/John.*/', $name) ? true : false) : | |
| // do stuff for people whose name is John, Johnny, ... | |
| break; | |
| } |
This file contains hidden or 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 | |
| namespace Code; | |
| abstract class AbstractFactoryMethod | |
| { | |
| abstract function getLivroPHP($idoma); | |
| } |
This file contains hidden or 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
| location / { | |
| try_files $uri $uri/ /index.php?$args; | |
| } |
This file contains hidden or 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
| function git_branch_name() { | |
| git branch 2>/dev/null | grep -e '^*' | sed -E 's/^\* (.+)$/(\1) /' | |
| } | |
| function show_colored_git_branch_in_prompt() { | |
| PS1="\[\033[38m\]\h:\[\033[032m\]\W\[\033[31m\]\$(git_branch_name)\[\033[m\]$ " | |
| } | |
| show_colored_git_branch_in_prompt |
This file contains hidden or 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
| Tem gente por aí criando pseudo-curso, se achando o bam-bam-bam, e diz que da suporte vitalício aos alunos. | |
| 1 - Para um aluno precisar de suporte vitalício é que o professor deve ser tão ruim que aluno demorará a eternidade para aprender. | |
| 2 - Oferecer suporte vitalício para meia dúzia de gatos pingados é fácil. Quando fizer isso para 15.000 alunos, aí vem me criticar. | |
| 3 - Ops, Não emite nota fiscal né... Izzi, acho que é porque não tem nem CNPJ (porque será que não tem??). Sonegar imposto é coisa feia viu ;) | |
| --- |
This file contains hidden or 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
| public function getServiceConfig() | |
| { | |
| return array( | |
| 'factories' => array( | |
| 'Cache' => function($sm) { | |
| $config = $sm->get('Config'); | |
| $cache = \Zend\Cache\StorageFactory::factory( | |
| array( | |
| 'adapter' => 'memcached', | |
| 'memcached' => array( |
This file contains hidden or 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
| public function getServiceConfig() | |
| { | |
| return array( | |
| 'factories' => array( | |
| 'Cache' => function($sm) { | |
| $config = $sm->get('Config'); | |
| $cache = \Zend\Cache\StorageFactory::factory( | |
| array( | |
| 'adapter' => 'memcached', | |
| 'ttl' => 3600, |