Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am jnonon on github.
  • I am jnonon (https://keybase.io/jnonon) on keybase.
  • I have a public key ASCb1mUN0St2nMFPrKzdNLdA1LufiUGNbIOvczLvV4kjZwo

To claim this, I am signing this object:

@jnonon
jnonon / docker-disk-maintenance.sh
Last active February 12, 2016 19:42
Docker disk maintenance
#!/bin/bash
# References: https://lebkowski.name/docker-volumes/
# https://github.com/docker/docker/issues/18601
set -e
export JQ=/tmp/jq
if [ ! -e $JQ ]
then
{
"id":"/mesos-consul-container",
"args":[
"--zk=zk://zookeeper.service.consul:2181/mesos",
"--log-level=WARN",
"--refresh=5s",
"--mesos-ip-order=host,docker",
"--healthcheck",
"--healthcheck-ip=0.0.0.0"
],
@jnonon
jnonon / xdebug.js
Created October 28, 2015 15:25
Setting XDebug session ID
function setXdebugSessionCookie(sessionId) {
var now = new Date();
var time = now.getTime();
var expireTime = time + 1000*36000;
now.setTime(expireTime);
document.cookie = 'XDEBUG_SESSION='+sessionId+';expires='+now.toGMTString()+';path=/';
console.log(document.cookie);
}
//Use: Assuming your session id for XDebug is 12345, then setting the cookie setXdebugSessionCookie(12345) will allow to debug AJAX calls.