Skip to content

Instantly share code, notes, and snippets.

View bryanhelmig's full-sized avatar
Zapier is hiring!

Bryan Helmig bryanhelmig

Zapier is hiring!
View GitHub Profile
➜ ~ ab -c 50 -n 1000 http://emailpie.com/
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking emailpie.com (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
@bryanhelmig
bryanhelmig / examples.js
Created March 21, 2012 03:02
EmailPie Samples
// An invalid domain.
// http://emailpie.com/v1/[email protected]
{
"didyoumean": null,
"errors": [
{
"message": "No MX records found for the domain.",
"severity": 7
}
<?php
/**
* Validate Email Addresses Via SMTP
* This queries the SMTP server to see if the email address is accepted.
* @copyright http://creativecommons.org/licenses/by/2.0/ - Please keep this comment intact
* @author [email protected]
* @contributers [email protected]
* @version 0.1a
*/
initRules: () ->
# Rules are children of reads. Setup the @rules collection, set a URL on the collection.
# then fetch all the children from the api
@rules = new Rules({})
@rules.urlRoot = "#{@url()}/rules"
@bryanhelmig
bryanhelmig / index.coffee
Created February 2, 2012 23:57
Simple Node.js Jabber/AIM REST API.
util = require "util"
xmpp = require "node-xmpp"
oscar = require 'oscar'
express = require "express"
###
The XMPP bot.
###
@bryanhelmig
bryanhelmig / index.coffee
Created February 1, 2012 16:13
Simple Node.js Jabber/AIM message sending API.
util = require "util"
xmpp = require "node-xmpp"
oscar = require 'oscar'
express = require "express"
###
The XMPP bot.
###
fields = ['user_name']
cur.execute("SELECT {0} FROM users LIMIT 10".format( ','.join(fields) ))
for r in cur:
pairs = zip(fields, r)
self.write(r[0] + '<br />')