Skip to content

Instantly share code, notes, and snippets.

View Huaba's full-sized avatar

Martin Huber Huaba

View GitHub Profile
<?php $thumb = thumb($cover, array('width' => 300)) ?>
<img src="<?php echo $thumb->url() ?>" width="<?php echo $thumb->width() ?>" width="<?php echo $thumb->height() ?>" alt="">
@tongpu
tongpu / dirvish-statusmail.py
Created January 28, 2014 23:30
A simple script to send an email with important information about a dirvish backup run via email. Also sends an extra email on error. Add it to post-server in your dirvish.conf. Based losely on http://wiki.dirvish.org/FuhHoe
#!/usr/bin/env python
from email.mime.text import MIMEText
import os
import re
import smtplib
mailfrom = 'from@example.com'
mailto = 'to@example.com'
mailerr = 'err@example.com'