Skip to content

Instantly share code, notes, and snippets.

@boyska
boyska / multipart.py
Last active December 24, 2020 11:45
This post_process plugin for rss2email/rss2email addresses #101 in a pluggable way.
'''
Converts html messages in multipart messages with both text/html and text/plain parts
post-process = rss2email.post_process.multipart process
'''
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
@boyska
boyska / 00base.sh
Created May 15, 2016 13:04
test libreant upgrade
#!/bin/bash
basedir=$(readlink -f $(dirname $0))
source "$basedir/config"
source "$basedir/lib-run.sh"
set -e
set -u
run /bin/bash do-base.sh
@boyska
boyska / create.ui
Created October 23, 2011 16:26
Tomb create gui (sketch)
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>Wizard</class>
<widget class="QWizard" name="Wizard">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>709</width>
<height>368</height>
@boyska
boyska / gist:154765
Created July 25, 2009 10:26
create a function with a custom number of arguments (len of out_string+1)
code = 'def _f(inst'
for i in range(len(out_string)):
code += ', arg%d' % i
code += '): pass\n'
print code, 'C'
exec code in locals()
func = _f