This file contains hidden or 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
| /*! | |
| * Created by Matthew Bramer | |
| * Released under the MIT license | |
| * Date: 2016-08-05 | |
| * Tested using SharePoint Online. | |
| */ | |
| // Get $sp.min.js from here. | |
| // https://gist.github.com/iOnline247/cc8d68cb611b056695434224e6c2aa19 | |
| import '../vendor/$sp.min'; |
This file contains hidden or 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
| { | |
| "name": "my-app", | |
| "version": "1.0.0", | |
| "description": "My test app", | |
| "main": "src/js/index.js", | |
| "scripts": { | |
| "jshint:dist": "jshint src/js/*.js'", | |
| "jshint": "npm run jshint:dist", | |
| "jscs": "jscs src/*.js", | |
| "browserify": "browserify -s Validating -o ./dist/js/build.js ./lib/index.js", |
This file contains hidden or 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
| /*! | |
| * Created by Matthew Bramer | |
| * Released under the MIT license | |
| * Date: 2016-07-11 | |
| * Props to: http://blogs.msmvps.com/windsor/2015/02/13/reduce-code-need-for-rest-api-calls-with-sprestrepository/ | |
| * Tested using SharePoint Online & 2013 On-Prem. | |
| */ | |
| // http://sharepoint.stackexchange.com/questions/74978/can-i-tell-what-version-of-sharepoint-is-being-used-from-javascript |
This file contains hidden or 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
| (function(window) { | |
| function isFunction (func) { | |
| return typeof func === 'function'; | |
| } | |
| function isStorageEnabled () { | |
| const str = 'test'; | |
| try { | |
| this.store.setItem(str, str); | |
| this.store.removeItem(str); |
This file contains hidden or 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
| function getDownloadLink(el, i) { | |
| 'use strict'; | |
| var rlastForwardSlash = /.+\//, | |
| fileId = (el.href) ? el.href.replace(rlastForwardSlash, '') : '', | |
| downloadPath = 'https://www.yammer.com/api/v1/uploaded_files/' + fileId + '/download' | |
| ; | |
| return downloadPath; | |
| } | |
| function downloadFile(dataUrl) { | |
| 'use strict'; |
This file contains hidden or 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
| <xsl:output method="html" indent="no"/> | |
| <xsl:decimal-format NaN=""/> | |
| <xsl:param name="dvt_apos">'</xsl:param> | |
| <!-- Define the HttpVDir variable --> | |
| <xsl:param name="HttpVDir"/> | |
| <!-- | |
| Usage: <xsl:call-template name="addnew" /> | |
| --> | |
| <xsl:template name="addnew"> |
This file contains hidden or 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
| 'use strict' | |
| var Benchmark = require('benchmark') | |
| var suite = new Benchmark.Suite; | |
| var list = [1, 2, 3, [[4]], [[[5]]], [6], [[7]]] | |
| function flattenRecursive (list) { | |
| var flatList = [] | |
| list.forEach(function (item) { |
This file contains hidden or 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
| # https://www.petri.com/powershell-problem-solver-finding-long-file-names | |
| $folderPath = "\\servername\c$\folderPath" | |
| $csvPath = "C:\fileLengthCheck.csv" | |
| dir -LiteralPath $folderPath -File -Recurse -Force | | |
| Select Directory,Name,@{Name="NameLength";Expression={$_.name.length}} | | |
| Where {$_.NameLength -ge 45} | | |
| Export-Csv -LiteralPath $csvPath -Force -NoTypeInformation |
This file contains hidden or 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
| /*! | |
| * Created by Matthew Bramer :: @iOnline247 | |
| * Released under the MIT license | |
| * Date: 2016-02-12 v1 | |
| * Inspired from script written on: 2014-05-17 | |
| * https://dl.dropboxusercontent.com/u/21583725/demos/SPSDC-ModalMania/demo/js/iframeDemo.js | |
| * Tested using SharePoint Online. | |
| * | |
| * Helpful Links | |
| * https://msdn.microsoft.com/en-us/library/office/dn531432.aspx#bk_UserCustomActionRequestExamples |
This file contains hidden or 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
| /*! | |
| * Created by Matthew Bramer | |
| * Released under the MIT license | |
| * Date: 2015-04-18 | |
| * Props to: http://plumsail.com/blog/2015/02/start-sharepoint-2013-workflows-selected-items/ | |
| * Tested using SharePoint Online. | |
| * On-Prem still needs testing. | |
| */ | |
| window.$sp = window.$sp || {}; |