text

Jenne's charset

$charset = 'latin1';
db_query("SET character_set_results = '$charset', character_set_client = '$charset', character_set_connection = '$charset', character_set_database = '$charset', character_set_server = '$charset'");

code

iconv -f ISO-8859-1 -t UTF-8 dump-iso.sql >> dump-utf.sql

text

Extis Quotes

DELETE FROM shop_sales_flat_quote WHERE updated_at < DATE_SUB(Now(),INTERVAL 30 DAY) AND items_count = '0' AND customer_group_id = '0'

text

Jenne's regexp

perl -p -i -e 's/\\\"\$([a-z]+)\[([a-z]+)\]\\\"/\047\"\.\$$1\[$2\]\.\"\047/g'

perl -p -i -e 's/\$([a-z]+)\[([a-z]+)\]/\$$1\[\047$2\047\]/g'


text

make nbd and dm available in lxc

change config inĀ /usr/share/lxc/config e.g. debian.common.conf

uncomment / add


lxc.aa_profile = lxc-container-default-with-mounting

lxc.mount.auto = cgroup

## dev mapper

lxc.cgroup.devices.allow = c 10:236 rwm

## loop devices

lxc.cgroup.devices.allow = b 7:* rwm

## nbd devices

lxc.cgroup.devices.allow = b 43:* rwm

## dm devices

lxc.cgroup.devices.allow = b 251:* rwm

lxc.cgroup.devices.allow = b 252:* rwm