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
define(function () { | |
//debugger; | |
var rconfig = { | |
baseUrl: '../Scripts/app', | |
deps: | |
[ | |
'spruntime_js','sp_js' | |
], | |
paths: { |
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
var userInfoWebModule = function (jQuery) { | |
// Define user class/module | |
var userModule = function () { | |
function _getUserName() { | |
var context = SP.ClientContext.get_current(); | |
var user = context.get_web().get_currentUser(); |
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
var userProfileModule = function (jQuery) { | |
// Define user class/module | |
var userProfileInfoModule = function () { | |
function _getUserName() { | |
var userProfileProperties; | |
//Get Current Context |
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
var startModule = function (jQuery,userInfoWeb,userInfoProfile) { | |
function ShowUserName() { | |
userInfoWeb.getUserName(); | |
userInfoProfile.getUserName(); | |
}; | |
SP.SOD.loadMultiple(['sp.js', 'userprofile'], ShowUserName); |
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
// UnhandledExceptionFilterAttribute.cs | |
// http://stackoverflow.com/questions/12519561/throw-httpresponseexception-or-return-request-createerrorresponse | |
// http://pastebin.com/Uu65fRwT | |
// https://blog.iamandycohen.com/2013/02/09/webapi-and-the-behavior-of-exceptions-and-an-alternative-configurable-way-to-deal/ | |
// https://github.com/iamandycohen/Omegaluz.GlobalApiExceptions/blob/master/ExampleApi/App_Start/WebApiExceptionConfig.cs | |
namespace Northwind.WebApi2Services.Filters | |
{ | |
using System; |
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
// Amikiri/src/Amikiri.Api/Infrastructure/Filters/ValidationExceptionFilter.cs | |
namespace Amikiri.Api.Infrastructure.Filters | |
{ | |
using System.Linq; | |
using System.Net; | |
using System.Net.Http; | |
using System.Web.Http.Filters; | |
using global::FluentValidation; |
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
if(-not (Get-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorAction SilentlyContinue)){Add-PSSnapin "Microsoft.SharePoint.PowerShell"} | |
# update SharePoint cache token lifetime | |
$SPContentService = [Microsoft.SharePoint.Administration.SPWebService]::ContentService | |
$SPContentService.TokenTimeout = (New-TimeSpan -minutes 5) | |
$SPContentService.Update() | |
# udpate SharePoint claims token lifetime |
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
//Example 1: inline definition... not configurable :-( | |
angular.module("myApp", []) | |
.provider("Dummy", <ng.IServiceProvider>{ | |
'$get': function() { | |
return { value: 1 }; | |
} | |
}) | |
.config(["DummyProvider", function(Dummy: ng.IServiceProvider) { |
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
<div ng-app="wizardApp"> | |
<div ng-controller="WizardSignupController"> | |
<h2>Signup wizard</h2> | |
<div ui-view></div> | |
</div> | |
</div> | |
<script type="text/javascript" src="/js/vendor/angular-ui-router/release/angular-ui-router.min.js"></script> | |
<script type="text/javascript"> | |
angular.module('wizardApp', [ | |
'ui.router', |
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
# =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+= | |
# Script: TW-CreateBlankClientExtranetSite.ps1 | |
# | |
# Author: Pete Skelly | |
# Twitter: ThreeWillLabs | |
# http://www.threewill.com | |
# | |
# Description: Add a blank site collection to an Office 365 tenant in SharePoint Online | |
# | |
# WARNING: Script provided AS IS with no warranty. Your mileage will vary. Use |
OlderNewer