Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
<?php | |
namespace Upload; | |
class File implements IFile { | |
/** | |
* The meta data about the file (from the $_FILES array) | |
* | |
* @var array $uploadMeta |
<?php | |
namespace PW\ApplicationBundle\Command; | |
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand, | |
Symfony\Component\Console\Input\InputArgument, | |
Symfony\Component\Console\Input\InputInterface, | |
Symfony\Component\Console\Input\StringInput, | |
Symfony\Component\Console\Output\OutputInterface; |
#!/bin/bash | |
# Will add --dry-run unless the --go option is set. All other arguments passed to rsync (e.g. --delete) | |
SOURCE=. | |
DEST=example.com:/var/www/mysite | |
DRYRUN="--dry-run" | |
args=() | |
for var in "$@" |
<?php | |
namespace Silex\Provider; | |
use Silex\Application; | |
use Silex\SilexEvents; | |
use Silex\ControllerProviderInterface; | |
use Silex\ControllerCollection; | |
use Symfony\Component\HttpFoundation\Request; | |
use Symfony\Component\HttpFoundation\Response; | |
use Symfony\Component\HttpKernel\Event\GetResponseEvent; |
Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
<?php | |
/** | |
* One-pointer Circular Buffer | |
* | |
* This comes without any overwrite | |
* checks or FIFO functionality. | |
* You'll need SPL. | |
* | |
* @author Bernhard Häussner | |
* @date 2011-09-07 |
# add your user to www-data and vise versa | |
sudo usermod -a -G www-data myusername | |
sudo usermod -a -G myusername www-data | |
# override umask in ~/.bashrc and /etc/init.d/apache2 | |
umask 002 | |
#restart |