Most of programs will not accept an email using just @localhost as domain.
So, edit /etc/hosts file to make the domain localhost.com point to your machine, including this content to the file:
127.0.0.1 localhost.com
| <?php | |
| $file="/parh/to/binary"; | |
| $fp = fopen($file, "rb"); | |
| $binary = fread($fp, filesize($file)); | |
| echo base64_encode($binary); | |
| ?> |
| <?php | |
| class AbstractManagerBase extends \PHPUnit_Framework_TestCase | |
| { | |
| protected function getEmMock() | |
| { | |
| $emMock = \Mockery::mock('\Doctrine\ORM\EntityManager', | |
| array( | |
| 'getRepository' => new FakeRepository(), | |
| 'getClassMetadata' => (object)array('name' => 'aClass'), |
| git fetch upstream | |
| git reset --hard upstream/master |
| #!/bin/bash | |
| echo "Generating an SSL private key to sign your certificate..." | |
| openssl genrsa -des3 -out myssl.key 1024 | |
| echo "Generating a Certificate Signing Request..." | |
| openssl req -new -key myssl.key -out myssl.csr | |
| echo "Removing passphrase from key (for nginx)..." | |
| cp myssl.key myssl.key.org | |
| openssl rsa -in myssl.key.org -out myssl.key |
| <?php | |
| use Zend\Db\Sql\Select; | |
| // basic table | |
| $select0 = new Select; | |
| $select0->from('foo'); | |
| // 'SELECT "foo".* FROM "foo"'; |
Most of programs will not accept an email using just @localhost as domain.
So, edit /etc/hosts file to make the domain localhost.com point to your machine, including this content to the file:
127.0.0.1 localhost.com
When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:
const Article = require('../../../../app/models/article');Those suck for maintenance and they're ugly.
| <?php | |
| namespace My; | |
| class Module | |
| { | |
| public function onBootstrap(\Zend\EventManager\EventInterface $e) | |
| { | |
| // event target is the application itself | |
| $e->getTarget()->getEventManager()->attach( |
| admin: | |
| resource: '@SonataAdminBundle/Resources/config/routing/sonata_admin.xml' | |
| prefix: /admin | |
| _sonata_admin: | |
| resource: . | |
| type: sonata_admin | |
| prefix: /admin | |
| soanata_user: |