Skip to content

Instantly share code, notes, and snippets.

@dusual
dusual / rsvp.py
Last active December 15, 2015 19:09
#Email Decode imports
from email import Encoders
import random
import imaplib,rfc822, re, StringIO, time, os, sys
from time import strftime
from datetime import datetime, timedelta
import email, email.Errors, email.Header, email.Message, email.Utils
import smtplib
from email.MIMEMultipart import MIMEMultipart
from email.MIMEBase import MIMEBase
function escapePath(p) {
return encodeURIComponent(p)
.replace(/%2F/g, '/')
.replace(/\)/g, '%29')
.replace(/\(/g, '%28');
}
// test for jsonp callback functionality
function escapePath(p) {
return encodeURIComponent(p)
.replace(/%2F/g, '/')
.replace(/\)/g, '%29')
.replace(/\(/g, '%28');
}
// test for jsonp callback functionality
@dusual
dusual / __init__.py
Created September 20, 2011 14:07
The main file of my new Siesta fork that uses httplib2 and handles different auth methods
# Python Siesta
#
# Copyright (c) 2008 Rafael Xavier de Souza
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
function buildmessage(params){
var boundary = 'sAxIqse3tPlHqUIUI9ofVlHvtdt3tpaG'
//
// var body = [
// "Content-Type: multipart/form-data;boundary="+boundary ,
// "Content-Length:" +params.content.length,
// "--"+boundary,
// "Content-Disposition: form-data, file=" + params.file,