Skip to content

Instantly share code, notes, and snippets.


Tristan Bessoussa tristanbes

View GitHub Profile
View gist:8580f379c1ec4ef42894
failed: [5.135.xx.xx] => (item=ldap) => {"changed": true, "cmd": ["java", "-jar", "/opt/jenkins/jenkins-cli.jar", "-s", "http://localhost:8081", "install-plugin", "ldap"], "delta": "0:00:00.095061", "end": "2014-08-10 12:18:26.911847", "item": "ldap", "rc": 1, "start": "2014-08-10 12:18:26.816786"}
stderr: Exception in thread "main" Failed to connect to http://localhost:8081/
at hudson.cli.CLI.getCliTcpPort(
at hudson.cli.CLI.<init>(
at hudson.cli.CLIConnectionFactory.connect(
at hudson.cli.CLI._main(
at hudson.cli.CLI.main(
Suppressed: Connection refused
at Method)
tristanbes / github_hook.php
Created Apr 13, 2015
Pull Request Builder: PHP Script which triggers Ansible Tower
View github_hook.php
$payload = $_POST['payload'];
$json = json_decode($payload);
if (isset($json->action)) {
$action = $json->action;
$prNumber = $json->pull_request->number;
switch ($action) {
case 'opened':
exec_script('scripts/', array($prNumber, true));
echo "Building "$YPROX_PR
# build the new PR
cd /var/www/gh_hook/scripts
tristanbes / Condition.php
Created May 22, 2012
The form's client data is expected to be of type scalar, but is an instance of class Doctrine\ORM\PersistentCollection
View Condition.php
namespace GamerCertified\TeamBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
* GamerCertified\TeamBundle\Entity\Conditions
* @ORM\Table(name="conditions")
View Car.php
class Car
* @ORM\OneToMany(targetEntity="Condition", mappedBy="Car", cascade={"all"}, orphanRemoval=true)
private $conditions;
View gist:3150616
Failed loading dlopen(, 9): image not found
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/zend/lib/php_extensions/' -
dlopen(/usr/local/zend/lib/php_extensions/, 9): no suitable image found.
Did find: /usr/local/zend/lib/php_extensions/ mach-o, but wrong architecture in Unknown on line 0
View gist:3150677
curl -s | bash -s 5.4
View ProfileTranslation.php
namespace AwesomeNamespace\AwesomeBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Translatable\Entity\MappedSuperclass\AbstractPersonalTranslation;
* @ORM\Entity
* @ORM\Table(name="profile_translations",
View Category.php
namespace AwesomeNamespace\AwesomeBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\ArrayCollection;
use Gedmo\Mapping\Annotation as Gedmo;
* AwesomeNamespace\AwesomeBundle\Entity\Profile
View ProfileAdmin.php
namespace AwesomeNamespace\AwesomeBundle\Admin;
use Sonata\AdminBundle\Admin\Admin;
use Sonata\AdminBundle\Form\FormMapper;
use Sonata\AdminBundle\Datagrid\ListMapper;
* Profile Admin
You can’t perform that action at this time.