Skip to content

Instantly share code, notes, and snippets.

View trq's full-sized avatar

Tony R Quilkey trq

  • thorpesystems
  • Sydney, Australia
View GitHub Profile
{{ Form::text('username', 'null', array('placeholder' => 'hold') }}
@trq
trq / gist:4a9e9263cb6788e1641d
Last active August 29, 2015 14:02
Re-define the package inline in your composer.json
{
"repositories": {
"doctrine-fixtures-bundle": {
"name": "doctrine/doctrine-fixtures-bundle",
"type": "symfony-bundle",
"version": "2.0.0",
"require": {
"php": ">=5.3.2",
"symfony/symfony": ">=2.0"
},
<?php
$errors = array();
foreach (array('email', 'name', 'age', 'occupation') as $key) {
if (!isset($_GET[$key]) || empty($_GET[$key])) {
$errors[] = "You need to fill in $key";
}
}
<?php
namespace Foo\SiteBundle\Controller;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
class CmsController implements ContainerAwareInterface
<?php
namespace SiteBundle\Controller;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
class CmsController implements ContainerAwareInterface
<?php
namespace CellCare\SiteBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Response;
class CmsController extends Controller
{
public function dynamicAction()
{
"name": "symfony/framework-standard-edition",
"license": "MIT",
"type": "project",
"description": "The \"Symfony Standard Edition\" distribution",
"autoload": {
"psr-0": { "": "src/", "SymfonyStandard": "app/" }
},
"require": {
"php": ">=5.3.3",
@trq
trq / Dvd.php
Created May 21, 2014 02:24 — forked from kfuchs/Dvd.php
/**
* Dvd
*
* @ORM\Table(name="dvd")
* @ORM\Entity
*/
class Dvd
{
/**
* @var integer
sudo chown -R $USER:www-data /var/www
find /var/www -type d -exec chmod 775 {} \;
find /var/www -type d -exec chmod 664 {} \;
chmod g+s /var/www
irssi_notifier() {
ssh freaks 'echo -n "" > ~/.irssi/fnotify; tail -f ~/.irssi/fnotify' | \
while read heading message; do
url=`echo \"$message\" | grep -Eo 'https?://[^ >]+' | head -1`;
if [ ! "$url" ]; then
terminal-notifier -title "\"$heading\"" -message "\"$message\""
else
terminal-notifier -title "\"$heading\"" -message "\"$message\"" -open "\"$url\"";
fi;