This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function escapePath(p) { | |
return encodeURIComponent(p) | |
.replace(/%2F/g, '/') | |
.replace(/\)/g, '%29') | |
.replace(/\(/g, '%28'); | |
} | |
// test for jsonp callback functionality |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function escapePath(p) { | |
return encodeURIComponent(p) | |
.replace(/%2F/g, '/') | |
.replace(/\)/g, '%29') | |
.replace(/\(/g, '%28'); | |
} | |
// test for jsonp callback functionality |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from datetime import datetime | |
from datetime import timedelta | |
from pony.orm import * | |
db = Database("sqlite", "data.sqlite", create_db=True) | |
class User(db.Entity): | |
#Answer 3 : Correcting User db | |
domain = Optional('Domain') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from flask import Flask, request, render_template,session | |
import plivohelper | |
import os | |
from simplekv.memory import DictStore | |
from flaskext.kvsession import KVSessionExtension | |
from datetime import datetime | |
import flask | |
import pickle | |
import urllib |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir heroku | |
cd heroku/ | |
virtualenv --no-site-packages env | |
source env/bin/activate | |
pip install bottle gevent | |
pip freeze > requirements.txt | |
cat >app.py <<EOF | |
try: | |
import gevent.monkey |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function abc() { | |
var deferred = $.Deferred(); | |
(function() { | |
var a = 1; | |
deferred.resolve(a); | |
})(); | |
return deferred.promise(); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
United States | |
Albania | |
American Samoa | |
Armenia | |
Australia | |
Austria | |
Azerbaijan | |
Belarus | |
Belgium | |
Bosnia and Herzegovina |
OlderNewer