Skip to content

Instantly share code, notes, and snippets.

View OlivierLM's full-sized avatar

Olm OlivierLM

View GitHub Profile

Keybase proof

I hereby claim:

  • I am olivierlm on github.
  • I am olsc (https://keybase.io/olsc) on keybase.
  • I have a public key whose fingerprint is 984C 2D0B 2FBE E53E 769B BA59 0AB5 96DA 56C0 DC7A

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am OlivierLM on github.
  • I am olivierlemonnier (https://keybase.io/olivierlemonnier) on keybase.
  • I have a public key whose fingerprint is 79D1 DA2C 8759 DF57 F795 0ECB 49F0 A8FD 0B98 1CE7

To claim this, I am signing this object:

--- /tmp/pre_updateInDB.php.orig 2016-03-21 17:20:04.366980889 +0100
+++ /tmp/pre_updateInDB.php.new 2016-03-21 17:20:22.927146259 +0100
@@ -2,6 +2,10 @@
if ($autoclosedelay == 0) {
$this->fields['status'] = self::CLOSED;
$this->input['status'] = self::CLOSED;
+ } else if (!self::isAllowedStatus($this->fields['status'], CommonITILObject::SOLVED)
+ && self::isAllowedStatus($this->fields['status'], CommonITILObject::CLOSED)) {
+ $this->fields['status'] = self::CLOSED;
+ $this->input['status'] = self::SOLVED;
@OlivierLM
OlivierLM / canSolve.diff
Created February 3, 2016 15:36
Allow solved state even if only closed state is allowed in lifecycle
--- /tmp/f1 2016-02-03 16:31:36.745929117 +0100
+++ /tmp/f2 2016-02-03 16:31:29.995928912 +0100
@@ -4,7 +4,8 @@
|| $this->isUser(CommonITILActor::ASSIGN, Session::getLoginUserID())
|| (isset($_SESSION["glpigroups"])
&& $this->haveAGroup(CommonITILActor::ASSIGN, $_SESSION["glpigroups"])))
- && self::isAllowedStatus($this->fields['status'], self::SOLVED)
+ && (self::isAllowedStatus($this->fields['status'], self::SOLVED)
+ || self::isAllowedStatus($this->fields['status'], self::CLOSED))
// No edition on closed status

Unionize: network superpowers for your docker containers

Unionize lets you connect together docker containers in arbitrarily complex scenarios.

Note: I recommend to use https://github.com/jpetazzo/pipework instead.

  • pipework is a better name than unionize
  • it's hosted on a "real" github repo instead of a small gist :-)

Now if you want Unionize, it's still here. Just check those examples.