Skip to content

Instantly share code, notes, and snippets.

@kganser
kganser / json-table-sortable.css
Created July 20, 2016 08:52
Sortable json-table styles
table {
font-size: 13px;
border-collapse: separate;
border-spacing: 0;
border: 1px solid #777;
position: relative;
}
th {
font-weight: normal;
text-align: left;
@kganser
kganser / memcache_grep
Last active March 21, 2016 02:38
Grep for a key in memcache
#!/bin/bash
host=$1
port=${PORT:-11211}
grepfor=$2
echo -e "stats items\nquit" | nc $host $port | cut -d: -f2 | sort -n | uniq | grep -v END | while read i; do echo -e "stats cachedump $i 100000\nquit" | nc $host $port | grep $grepfor; done