Skip to content

Instantly share code, notes, and snippets.

<?php
error_reporting(E_ALL);
class O_o
{
public $wth,$mode,$num;
function __construct()
{
$this->wth = "";
$this->mode;
@polonskiy
polonskiy / gist:6290981
Created August 21, 2013 06:33
get all memcached keys and values
echo 'stats items' | nc localhost 11211 | while read line; do echo $line | grep -Po 'STAT items:\d+' | grep -Po '\d+'; done | sort -u | xargs -L1 -i echo 'stats cachedump {} 100' | nc localhost 11211 | grep 'ITEM' | sed 's/ITEM \([^ ]\+\) .*/\1/' | xargs -L1 -i echo 'get {}' | nc localhost 11211