This file contains 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 Foo\SiteBundle\EventListener; | |
use Doctrine\Common\EventSubscriber; | |
use Doctrine\ORM\Event\LifecycleEventArgs; | |
use Gedmo\Sluggable\Util\Urlizer; | |
use Foo\SiteBundle\Entity\Category; |
This file contains 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
cms_module.controller.search: | |
class: "%cms_module.controller.search.class%" | |
arguments: | |
- @templating | |
calls: | |
- [setApiKey, ["%google_cse_key%"]] | |
- [setCxKey, ["%google_cse_cx%"]] |
This file contains 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 | |
require_once '../include/conectar.php'; | |
if (isset($_POST['borrar_id']) && is_array($_POST['borrar_id'])) | |
{ | |
foreach ($_POST['borrar_id'] as $id) | |
{ | |
$result = $db->query("SELECT `direccion` FROM `imagenes` WHERE `id`='{$id}'"); | |
while ($obj = $result->fetchObject()) |
This file contains 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 | |
class TimePeriod | |
{ | |
protected $periodRepresentation; | |
protected function __construct($periodRepresentation) | |
{ | |
$this->periodRepresentation = $periodRepresentation; | |
} |
This file contains 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
* | |
!.gitignore |
This file contains 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() { | |
var calculator = angular.module('calculator', ['ui.check']); | |
calculator.controller('FormCtrl', ['$scope', '$http', function($scope, $http) { | |
$scope.selections = { | |
planType : null, | |
existingClient : null, | |
twins : null, | |
hospitalType : null, |
This file contains 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() { | |
var calculator = angular.module('calculator', ['ui.check', 'ui.tick', 'mm.foundation', 'mm.foundation.tooltip', 'mm.foundation.modal']); | |
calculator.controller('ModalInstanceCtrl', ['$scope', '$modalInstance', function($scope, $modalInstance, email) { | |
$scope.user = { | |
email = email | |
} | |
$scope.ok = function () { |
This file contains 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
Im getting this error: | |
Notice: Undefined index: userId in /var/www/html/symfony2/vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php line 688 | |
class UsersType extends AbstractType | |
{ | |
/** | |
* @param FormBuilderInterface $builder | |
* @param array $options |
This file contains 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 | |
require __DIR__.'/../bootstrap/autoload.php'; | |
$app = require_once __DIR__.'/../bootstrap/start.php'; | |
$app = new Cors($app, array( | |
// you can use array('*') to allow any headers | |
'allowedHeaders' => array('x-allowed-header', 'x-other-allowed-header'), | |
// you can use array('*') to allow any methods |
This file contains 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
#!/usr/bin/env bash | |
d=$(date +%s) | |
remote='some-aws-box' | |
dir="composer-$d.tmp" | |
if [ -f composer.json ]; then | |
ssh $remote mkdir "$dir" | |
scp composer.json $remote:"$dir"/composer.json |