Skip to content

Instantly share code, notes, and snippets.

View geoff-maddock's full-sized avatar

Geoff Maddock geoff-maddock

View GitHub Profile
@markbalt
markbalt / Multiple Join where NULL (Propel)
Created May 30, 2012 16:04
Propel Criteria: Multiple LEFT JOIN with Alias WHERE NULL
$criteria->addAlias("acc", AccountPeer::TABLE_NAME);
$criteria->addMultipleJoin(array(
array(CustomerPeer::ID, AccountPeer::alias("acc", AccountPeer::CUSTOMER_ID)),
array(AccountPeer::alias("acc", AccountPeer::BILLING_SYSTEM_ID), BillingSystemPeer::PORTAL_65),
array(AccountPeer::alias("acc", AccountPeer::IS_ACTIVE), 1)),
Criteria::LEFT_JOIN);
$criteria->add(AccountPeer::alias("acc", AccountPeer::ID), null, Criteria::ISNULL);
$criteria->setDistinct(1);
@scr34m
scr34m / vmware-vsphere-list-vm.php
Created August 27, 2012 16:46
VMWare vSphere List VM's with PHP using webservices
<?php
class soapclientd extends soapclient
{
public $action = false;
public function __construct($wsdl, $options = array())
{
parent::__construct($wsdl, $options);
}
@bastman
bastman / docker-cleanup-resources.md
Created March 31, 2016 05:55
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm