Skip to content

Instantly share code, notes, and snippets.

View density215's full-sized avatar

Jasper den Hertog density215

View GitHub Profile
@density215
density215 / install_python_gz.sh
Created August 10, 2015 10:09
SmartOS python 2.7 in global zone
cd /
curl -k http://pkgsrc.joyent.com/packages/SmartOS/bootstrap/bootstrap-2015Q2-x86_64.tar.gz | gzcat | tar -xf -
pkg_admin rebuild
pkgin -y up
pkgin in python27
@density215
density215 / build_samba4_with_zfsacl.sh
Last active August 29, 2015 14:27
Build samba4 with zfsacl module from blackdot repo in base-64-lts zone
#!/bin/sh
# get and install joyent pkgsrc repo
mkdir -p /content/{distfiles,packages}
cd /content
git clone git://github.com/joyent/pkgsrc.git
cd pkgsrc
git checkout joyent/release/2014Q4
# edit mk.conf
@density215
density215 / blackdot-samba4.json
Created August 10, 2015 09:42
smartos blackdot samba4 zone xm file
{
"brand": "joyent",
"image_uuid": "b67492c2-055c-11e5-85d8-8b039ac981ec", #base-64-lts
"alias": "blackdot",
"hostname": "blackdot",
"max_physical_memory": 1700,
"quota": 200,
"resolvers": ["8.8.8.8", "192.168.178.1"],
"nics": [
{
@density215
density215 / inventory
Created August 10, 2015 09:40
Ansible inventory for smartOS
[smartos-zones]
192.168.178.25
# modify python path
[smartos-zones:vars]
ansible_python_interpreter = /opt/local/bin/python
# ansible command
# ansible -i ./inventory all -m ping -u root
@density215
density215 / gist:3146297
Created July 19, 2012 19:42
Django on OSX Snow Leopard with virtualenv
@density215
density215 / gist:3146202
Created July 19, 2012 19:28
Cyrus skiplist corruption repair

We have also seen skiplist corruption in seen databases. I don't have a recovery tool, but I have been able to manually recover seen db's to the point of corruption so that at least most of the users mails are in the correct 'read' state. Typically, you will see errors like:

DBERROR: skiplist recovery /usr/local/imap/user/k/kdelaney.seen: 0D2C should be ADD or DELETE

If you truncate the file at this point, it should fix the problem, and the users mail read state will be valid upto the point of corruption.