Skip to content

Instantly share code, notes, and snippets.

View RainerAtSpirit's full-sized avatar

Rainer Wittmann RainerAtSpirit

View GitHub Profile
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html dir="ltr" lang="en-US">
<head><meta name="GENERATOR" content="Microsoft SharePoint" /><meta http-equiv="Content-type" content="text/html; charset=utf-8" /><meta http-equiv="X-UA-Compatible" content="IE=10" /><meta http-equiv="Expires" content="0" /><meta content="width=device-width, initial-scale=1" name="viewport" /><meta name="msApplication-TileImage" value="/_layouts/15/images/SharePointMetroAppTile.png" /><meta name="msApplication-TileColor" value="0072C6" /><title>
SharePointApp1
</title><link rel="shortcut icon" href="/_layouts/15/images/favicon.ico" type="image/vnd.microsoft.icon" id="favicon" /><link rel="stylesheet" type="text/css" href="https://spirit2013preview.sharepoint.com/sites/dev/_layouts/15/defaultcss.ashx?ctag=0"/>
<script type="text/javascript" src="https://cdn.sharepointonline.com/2776/_layouts/15/init.js?rev=msptCBHw90mLJ2YXhvPe5Q%3D%3D"></script>
@RainerAtSpirit
RainerAtSpirit / ResultDefault.aspx
Created August 23, 2012 12:50
Goodbye Ferrari, hello Napa
<!DOCTYPE HTML>
<html>
<head>
<title>
Goodbye Ferrari, hello Napa
</title>
<!-- Add your CSS styles to the following file -->
<link rel="Stylesheet" type="text/css" href="../Content/App.css" />
</head>
<body>
@RainerAtSpirit
RainerAtSpirit / OOTB_apps.js
Created August 26, 2012 11:23
Napa OOTB Apps.js leaking globals
var context;
var web;
var user;
// This code runs when the DOM is ready. It ensures the SharePoint
// script file sp.js is loaded and then executes sharePointReady()
$(document).ready(function () {
SP.SOD.executeFunc('sp.js', 'SP.ClientContext', sharePointReady);
});
@RainerAtSpirit
RainerAtSpirit / app.js
Created August 28, 2012 14:01
Nappa apps and Chrome Control
(function () {
var params = getParams(),
scriptbase = params.SPHostUrl + "/_layouts/15/";
// Load the js file and continue to the
// success handler.
$.getScript(scriptbase + "SP.UI.Controls.js", renderChrome)
// Load the js file and continue to the
// success event handler.
@RainerAtSpirit
RainerAtSpirit / Fiddler Raw
Created September 19, 2012 12:46
JayData 1.2 using SharePoint Odata provider throws error on MERGE
MERGE https://spirit2013preview-b0204c96e901b7.sharepoint.com/sites/dev/ToDoSPhosted/_vti_bin/listdata.svc/Tasks(1) HTTP/1.1
Host: spirit2013preview-b0204c96e901b7.sharepoint.com
User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:15.0) Gecko/20100101 Firefox/15.0.1
Accept: application/atomsvc+xml;q=0.8, application/json;odata=verbose;q=0.5, */*;q=0.1
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip, deflate
Connection: keep-alive
If-Match: W/"1"
DataServiceVersion: 1.0
Content-Type: application/json; charset=UTF-8;odata=verbose
@RainerAtSpirit
RainerAtSpirit / api.js
Created October 8, 2012 10:41
Odata v3: SharePoint 2013 _api $metadata conversion
////////////////////////////////////////////////////////////////////////////////////////
////// Autogenerated by JaySvcUtil.exe http://JayData.org for more info /////////
////// oData v3 /////////
////////////////////////////////////////////////////////////////////////////////////////
(function(global, $data, undefined) {
@RainerAtSpirit
RainerAtSpirit / example1.js
Created October 11, 2012 10:44
Feedback test
northwind.Products
.toArray()
.then( function( products ) {
console.dir( products );
} );
@RainerAtSpirit
RainerAtSpirit / ListDataSvcmetadata.xml
Created October 23, 2012 13:33
SharePoint 2013 listdata.svc/$metadata
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<edmx:Edmx Version="1.0" xmlns:edmx="http://schemas.microsoft.com/ado/2007/06/edmx">
<edmx:DataServices xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" m:DataServiceVersion="1.0">
<Schema Namespace="Microsoft.SharePoint.DataService" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns="http://schemas.microsoft.com/ado/2007/05/edm">
<EntityType Name="AttachmentsItem" m:HasStream="true">
<Key>
<PropertyRef Name="EntitySet"/>
<PropertyRef Name="ItemId"/>
<PropertyRef Name="Name"/>
</Key>
@RainerAtSpirit
RainerAtSpirit / ListDataMetaData.d.ts
Created October 29, 2012 10:42
listdata.svc/$metadata
///<reference path="./jaydata.d.ts" />
/*//////////////////////////////////////////////////////////////////////////////////////
////// Autogenerated by JaySvcUtil.exe http://JayData.org for more info /////////
////// oData V1.1 TypeScript /////////
//////////////////////////////////////////////////////////////////////////////////////*/
module Microsoft.SharePoint.DataService {
class AttachmentsItem extends $data.Entity {
constructor ();
@RainerAtSpirit
RainerAtSpirit / metadata.xml
Created October 31, 2012 14:13
project list metadata
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<edmx:Edmx Version="1.0" xmlns:edmx="http://schemas.microsoft.com/ado/2007/06/edmx">
<edmx:DataServices xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" m:DataServiceVersion="1.0">
<Schema Namespace="MyApp.DataService" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns="http://schemas.microsoft.com/ado/2007/05/edm">
<EntityType Name="AttachmentsItem" m:HasStream="true">
<Key>
<PropertyRef Name="EntitySet" />
<PropertyRef Name="ItemId" />
<PropertyRef Name="Name" />
</Key>