Skip to content

Instantly share code, notes, and snippets.

View tuxcanfly's full-sized avatar
🏠
Working from home

Javed Khan tuxcanfly

🏠
Working from home
View GitHub Profile
@tuxcanfly
tuxcanfly / gnome-vfs.patch
Created June 22, 2010 08:00
ffmpegthumbnailer (rev214) Adds gnome vfs support to handle URIs passed by nautlius
Index: configure.ac
===================================================================
--- configure.ac (revision 214)
+++ configure.ac (working copy)
@@ -42,7 +42,24 @@
[pkgconfigdir=${withval}],
[pkgconfigdir='${libdir}/pkgconfig'])
+########################################################################
+# Check gnome vfs support

Ubuntu as a django development platform

Introduction:

Hi, I am Javed Khan, also known as tuxcanfly elsewhere on the internets. I have recently joined agiliq and am thrilled to be a part of the team.

This blog post covers the steps I took to convert a fresh ubuntu install to a full fledged django development platform.

<SOAP-ENV:Envelope
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ZSI="http://www.zolera.com/schemas/ZSI/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Header>
</SOAP-ENV:Header>
<SOAP-ENV:Body xmlns:ns1="https://www.eway.com.au/gateway/managedpayment">
<ns1:CreateCustomer>
#MARKUP SETTINGS
import markdown
from textile import textile
from docutils.core import publish_parts
from dinette.libs.postmarkup import render_bbcode
MARKUP_RENDERERS = (
('markdown', markdown.markdown),
('bbcode', render_bbcode),
('textile', textile),
diff --git a/markupfield/fields.py b/markupfield/fields.py
index 9398b0d..e3fa355 100644
--- a/markupfield/fields.py
+++ b/markupfield/fields.py
@@ -1,6 +1,8 @@
from django.conf import settings
from django.db import models
from django.utils.safestring import mark_safe
+from django.utils.html import escape
+
[loggers]
keys=root,doloto.pystories
[handlers]
keys=consoleHandler,rfileHandler
[formatters]
keys=simpleFormatter
[logger_doloto.pystories]
from __future__ import with_statement
import os
filename = "gh2bb.txt"
mapping = {}
with open(filename) as f:
lines = f.readlines()
for line in lines:

Testing webhooks in development platforms

Webhooks were popularized by PayPal and have become commonplace now a days. A typical webhook service fires a POST to a URL of your choice whenever something interesting happens. You handle this request and respond accordingly.

But you need to test webhooks regularly during development and it is a bit of a problem if your development server is inaccessible from the rest of the Internet. I have tried to solve this using ssh and nginx.

For this method to work you need:

  • Development server (which can hopefully process the webhook at /webhook) lets call it (D)
#!/bin/bash
FROM='from@example.com';
TO='to@example.com';
rm -rf pypi
if virtualenv --no-site-packages --distribute pypi && pip install -E pypi -r agiliq_packages.txt > test_result.txt; then
message='Installations successful!';
else

Quick start guide

Before installing django-registration, you'll need to have a copy of Django already installed. For the |version| release, Django 1.1 or newer is required.

For further information, consult the `Django download page