Skip to content

Instantly share code, notes, and snippets.

@ahsanranjha
ahsanranjha / gist:054bd95447dadb39b7dcef3afaacb3af
Created June 8, 2017 05:35 — forked from ichord/gist:9808444
demo of using pdf.js to extract pages to images
<script src="http://cdnjs.cloudflare.com/ajax/libs/processing.js/1.4.1/processing-api.min.js"></script><html>
<!--
Created using jsbin.com
Source can be edited via http://jsbin.com/pdfjs-helloworld-v2/8598/edit
-->
<body>
<canvas id="the-canvas" style="border:1px solid black"></canvas>
<input id='pdf' type='file'/>
<!-- Use latest PDF.js build from Github -->
@ahsanranjha
ahsanranjha / SP.ListItem.moveTo.js
Created July 4, 2017 11:32 — forked from vgrem/SP.ListItem.moveTo.js
The example demonstrates how to move list item into folder via SharePoint JSOM API
var listTitle = "Requests"; //list title
var itemId = 1; //list item id
var targetFolderUrl = "/Lists/Requests/Archive"; //target folder server relative url
var ctx = SP.ClientContext.get_current();
var list = ctx.get_web().get_lists().getByTitle(listTitle);
var item = list.getItemById(itemId);
ctx.load(item,['FileRef','FileDirRef']);
ctx.executeQueryAsync(
function(){
@ahsanranjha
ahsanranjha / SharePointSendEmail.js
Created November 28, 2017 10:08 — forked from BasantPandey/SharePointSendEmail.js
Send Email using SharePoint Rest API
var Email= function(){
// Email Either email groupname or email address
var from = 'abc.yahoo.com',
to = 'abc.yahoo.com',
cc = 'abc.yahoo.com',
subject='My Email Subject';
this.options = this.options || {};
this.options['fromEmail'] = this.options['fromEmail'] || {};
this.options['toEmail'] = this.options['toEmail'] || {};