Add remote2
as a remote
$ git remote -v
remote2 git@github.com:repo2.git (fetch)
remote2 git@github.com:repo2.git (push)
origin git@github.com:repo.git (fetch)
origin git@github.com:repo.git (push)
<!-- | |
More faster : lint only modified files | |
-------------------------------------- | |
We create a new target to retrieve a list of modified files | |
If there is modified files, execute the lint target, else skip | |
with the `if="modifiedFiles"` option. | |
The list of modified files is stored in ${files.modified}, one file per line. |
In August 2007 a hacker found a way to expose the PHP source code on facebook.com. He retrieved two files and then emailed them to me, and I wrote about the issue:
http://techcrunch.com/2007/08/11/facebook-source-code-leaked/
It became a big deal:
http://www.techmeme.com/070812/p1#a070812p1
The two files are index.php (the homepage) and search.php (the search page)
use Zend\Mail\Message; | |
use Zend\Mail\Transport\Smtp as SmtpTransport; | |
use Zend\Mime\Message as MimeMessage; | |
use Zend\Mime\Part as MimePart; | |
use Zend\Mail\Transport\SmtpOptions; | |
////////// | |
$message = new Message(); |
<?php | |
include '../vendor/autoload.php'; | |
$classLoader = new \Doctrine\Common\ClassLoader('Entities', __DIR__); | |
$classLoader->register(); | |
$classLoader = new \Doctrine\Common\ClassLoader('Proxies', __DIR__); | |
$classLoader->register(); | |
// config | |
$config = new \Doctrine\ORM\Configuration(); |
<?php | |
class ReconnectingPDO | |
{ | |
protected $dsn, $username, $password, $pdo, $driver_options; | |
public function __construct($dsn, $username = "", $password = "", $driver_options = array()) | |
{ | |
$this->dsn = $dsn; | |
$this->username = $username; | |
$this->password = $password; |
<?php | |
namespace Ormigo\Bundle\OrmigoBundle\Form\Model; | |
use DateTime; | |
class DateRange | |
{ | |
/** | |
* @var DateTime |
<?xml version="1.0" encoding="UTF-8"?> | |
<!-- Set some basic project information and targets --> | |
<project name="My Symfony2 Project" default="build"> | |
<target name="build" | |
depends="prepare, vendors, dbupdate, fixtures, lint, phploc, phpmd, phpcpd, phpcs, phpunit"/> | |
<target name="build-parallel" | |
depends="prepare, vendors, dbupdate, fixtures, lint, tools-parallel, phpcpd, phpunit"/> |
<?php | |
# PDO Wrapper, supporting MySQL and Sqlite | |
# Usage: | |
# $db = new db(); | |
# | |
# // table, data | |
# $db->create('users', array( | |
# 'fname' => 'john', | |
# 'lname' => 'doe' | |
# )); |