Skip to content

Instantly share code, notes, and snippets.

View benheymink's full-sized avatar

Ben Heymink benheymink

View GitHub Profile
@benheymink
benheymink / form.html
Created January 16, 2013 09:20
Simple Twilio HTML Form
<!DOCTYPE html>
<html lang="en">
<body>
<h1>BenSpammer V1.0</h1>
<h2>Enter the message you wish to send to my phone:</h2>
<form action="." method="POST">
<input type="text" name="Message">
<input type="submit" name="my-form" value="Send">
</form>
</body>
@benheymink
benheymink / TwilioAndFlask
Created January 16, 2013 09:07
A simple Twilio and Flask App
from flask import Flask, render_template, request
from twilio.rest import TwilioRestClient
app = Flask(__name__)
account = "MY_ACCOUNT_SID"
token = "MY_ACCOUNT_TOKEN"
client = TwilioRestClient(account, token)
@app.route('/')
def SendSMS():
@benheymink
benheymink / TwilioTest
Created January 16, 2013 08:58
A sample Twilio App
from twilio.rest import TwilioRestClient
account = "MY_ACCOUNT_SID"
token = "MY_ACCOUNT_TOKEN"
client = TwilioRestClient(account, token)
def SendSMS():
message = client.sms.messages.create(to="MY_NUMBER", from_="MY_TWILIO_NUMBER",
body="Hello, World!")
@benheymink
benheymink / GetArchiveInfo.py
Created November 20, 2012 09:16
GetArchiveInfo
import requests, re, time, getpass
from xml.dom.minidom import parseString
def getVaultInfo(archiveId, user, password, evServerRoot):
url = evServerRoot + "/EnterpriseVault/GetVaultInformation.aspx"
headers = {'archiveId': archiveId}
r = requests.get(url, data=headers, auth=(user, password))
if r.status_code == requests.codes.ok:
@benheymink
benheymink / ThisAddIn.cs
Created August 14, 2012 10:17
Sample Outlook Add-in code to enumerate items
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Xml.Linq;
using Outlook = Microsoft.Office.Interop.Outlook;
using Office = Microsoft.Office.Core;
namespace ConnectSampleAddin