Skip to content

Instantly share code, notes, and snippets.

@asith-w
asith-w / searchInboxBySubject.xml
Last active August 29, 2015 14:12
find Items By subject or body soap
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header>
<t:RequestServerVersion Version="Exchange2010" />
</soap:Header>
<soap:Body>
<m:FindItem Traversal="Shallow">
<m:ItemShape>
<t:BaseShape>IdOnly</t:BaseShape>
<t:AdditionalProperties>
<t:FieldURI FieldURI="item:Subject" />
@asith-w
asith-w / soapMessages.js
Created January 1, 2015 07:00
findPeopleSOAP /getSendMailSOAPMessage
function getSendMailSOAPMessage() {
var soapMsg =
'<?xml version="1.0" encoding="utf-8"?>' +
'<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ' +
' xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" ' +
' xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" ' +
' xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">' +
'<soap:Header>' +
' <t:RequestServerVersion Version="Exchange2007_SP1" />' +
'</soap:Header>' +
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery-2.1.1.min.js"></script>
<script src="https://rawgithub.com/eligrey/FileSaver.js/master/FileSaver.js" type="text/javascript"></script>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
$.ajax({
url: 'https://dav-virtru.s3.amazonaws.com/Shane/Hello_World.xml',
type: 'GET',
contentType: 'application/ooxml;'
}).done(function (data) {
}).fail(function (status) {
console.log('fail');
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery-2.1.1.min.js"></script>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<input id="attach" type="file" /><span id="maxSize">(less than 1MB)</span>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">
// global variable
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">
@asith-w
asith-w / Prototype-Link.json
Created June 26, 2015 07:04
Prototype-Link.json
@asith-w
asith-w / forceToDownload.js
Created April 27, 2016 06:07
forceToDownload.js
var link = $("<a />");
link.appendTo("body");
link.attr("id", "csvDwnLink");
window.URL = window.URL || window.webkitURL;
var csv = "\ufeff" + "col1;col2;col3",
blob = new window.Blob([csv], {type: 'text/csv, charset=UTF-8'}),
csvUrl = window.URL.createObjectURL(blob),
filename = 'export.csv';