Skip to content

Instantly share code, notes, and snippets.

View RainerAtSpirit's full-sized avatar

Rainer Wittmann RainerAtSpirit

View GitHub Profile
@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 / machine.js
Created December 19, 2019 15:57
Generated by XState Viz: https://xstate.js.org/viz
const fetchMachine = Machine(
{
id: "fetch",
initial: "idle",
context: {
retries: 0
},
states: {
idle: {
initial: 'noError',
@RainerAtSpirit
RainerAtSpirit / machine.js
Last active November 22, 2019 16:28
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
// - XState (all XState exports)
@RainerAtSpirit
RainerAtSpirit / machine.js
Last active November 20, 2019 13:09
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@RainerAtSpirit
RainerAtSpirit / machine.js
Created November 18, 2019 20:55
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@RainerAtSpirit
RainerAtSpirit / machine.js
Created November 18, 2019 16:41
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@RainerAtSpirit
RainerAtSpirit / machine.js
Created November 7, 2019 12:04
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@RainerAtSpirit
RainerAtSpirit / machine.js
Created November 5, 2019 12:31
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@RainerAtSpirit
RainerAtSpirit / CustomBindingHandler.js
Created August 2, 2012 15:14
KnockoutJS, RequireJS and the revealing module pattern
define (['knockout', 'jquery', 'prettyDate', 'metrojs'], function ( ko, $ ) {
"use strict";
// See https://github.com/SteveSanderson/knockout/wiki/Bindings---class
ko.bindingHandlers['class'] = {
'update' : function ( element, valueAccessor ) {
if ( element['__ko__previousClassValue__'] ) {
ko.utils.toggleDomNodeCssClass (element, element['__ko__previousClassValue__'], false);
}
var value = ko.utils.unwrapObservable (valueAccessor ());
@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);
});