This file contains 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
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 |
This file contains 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
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: |
This file contains 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 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!") | |
This file contains 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, 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(): |
This file contains 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
<!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> |
This file contains 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
<!DOCTYPE html> | |
<html lang="en"> | |
<body> | |
<h1>Your message has been sent.</h1> | |
</body> | |
</html> |
This file contains 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, 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 ReturnForm(): |
This file contains 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
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
. ~/.bashrc | |
mkdir ~/local | |
mkdir ~/node-latest-install | |
cd ~/node-latest-install | |
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
./configure --prefix=~/local | |
make install # ok, fine, this step probably takes more than 30 seconds... | |
curl https://npmjs.org/install.sh | sh |
This file contains 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
it ('Should check the page title', function (){ | |
browser.get(url); | |
var browserTitle = browser.getTitle(); | |
expect(browserTitle).toEqual('My Title'); | |
}); |
This file contains 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
it('Should display the right number of elements on the page', function(){ | |
// myExpectedObjects is an array of items i'm expecting to be | |
// drawn on the page | |
var elementMissing = false; | |
_.forEach(object in myExpectedObjects, function(myObject){ | |
if(!element(by.id(myObject.id)).isPresent()){ | |
elementMissing = true; | |
} | |
}); |
OlderNewer