Skip to content

Instantly share code, notes, and snippets.

@clarkbw
clarkbw / lmtpd.py
Created March 6, 2011 17:53
A python LMTP server using the smtpd module
#!/bin/env python
from smtpd import SMTPChannel, SMTPServer
import asyncore
class LMTPChannel(SMTPChannel):
# LMTP "LHLO" command is routed to the SMTP/ESMTP command
def smtp_LHLO(self, arg):
self.smtp_HELO(arg)
@clarkbw
clarkbw / gist:645540
Created October 25, 2010 19:15
run chromeless using your installed Firefox instead of XULRunner
diff --git a/run b/run
index 9ff275b..308dd0b 100755
--- a/run
+++ b/run
@@ -44,4 +44,4 @@ print "You can also try other scripts such as ./run ui/thumbnails/index.html"
# now let's run the cfx thingy and specify the app-kit main module
# as our starting point
-os.system("impl/bin/cfx -a xulrunner -t ./template/app-extension --static-args {\\\"browser\\\":\\\""+ browserToLaunch+"\\\"} -p \"impl/packages/chromeless\" run")
+os.system("impl/bin/cfx -a xulrunner -t ./template/app-extension --static-args {\\\"browser\\\":\\\""+ browserToLaunch+"\\\"} -p \"impl/packages/chromeless\" --binary /Applications/Firefox.app run")