Skip to content

Instantly share code, notes, and snippets.

Paul T. purtuga

Block or report user

Report or block purtuga

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
purtuga / bookmarklet-post-with-buffer.js
Created Jun 4, 2018
Post with Buffer by opening a new window to the buffer add page
View bookmarklet-post-with-buffer.js
(function(encodeURI, DOCUMENT){
var link = DOCUMENT.createElement("a");
link.href="" + encodeURI(DOCUMENT.title) + "&url=" + DOCUMENT.location;
link.setAttribute("style", "position:absolute;left=-99999px;top:-99999px;visibility:hidden");
link.setAttribute("target", "_blank");
setTimeout(function(){link.parentNode.removeChild(link);}, 10);
})(encodeURIComponent, document);
purtuga / ie.aspx
Last active Jan 11, 2019
SharePoint file that forces IE into EDGE mode and load a given aspx page in an iframe. See
View ie.aspx
<!DOCTYPE html>
Set the IE rendering engine to EDGE and loads a given aspx file in an iframe,
thus forcing it to be rendered using the browser's latest rendering engine.
Usage: ie.aspx?file.aspx
The default page to be loaded, when this file is accessed, can be set below (url variable).
purtuga / grunt.copy.onlyNew.js
Last active Aug 29, 2015
A grunt-copy task filter option function. Enables the copying of only changed files to the destination.
View grunt.copy.onlyNew.js
* Returns a function that can be used with grunt's copy
* task 'filter' option. Checks if file being copied
* is newer than that destination file. A local file can be
* used as the "destination" timestampt - a useful method for
* when the destination file is really in a remote system
* (ex. linux server, or a WEBDav folder).
* @param {Array} target
* The grunt Copy configurtaion task that this instance
purtuga / grunt.copy.includeFile.js
Last active Mar 10, 2019
A Grunt Copy process function to embed content of files into other files.
View grunt.copy.includeFile.js
* includeFile() - embeds a file content within another. Meant to be
* used from the copy task as a 'processContent' function. The following
* tokens can be used in files: <br>
* - BUILD_INCLUDE('file')
* - /* BUILD_INCLUDE('file') *\x47
* - &lt;!-- BUILD_INCLUDE("file") --&gt;
* In addition, options can be added to the token above that further
purtuga /
Created Oct 25, 2014
SPServices test file - forum post 444799
<%@ Page language="C#" MasterPageFile="~masterurl/default.master"
Inherits="Microsoft.SharePoint.WebPartPages.WebPartPage,Microsoft.SharePoint,Version=,Culture=neutral,PublicKeyToken=71e9bce111e9429c" %>
<%@ Register
Assembly="Microsoft.SharePoint, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register
Assembly="Microsoft.SharePoint, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
View gist:9138272
<FieldRef Name='ID'/>
<Value Type='Counter'>0</Value>
... Real filters here filters you want here ...
purtuga / jQuery.SPGetListItemInfoByUrl.js
Last active Aug 29, 2015
Sharepoint WebServices utlity to retrieve information about a List (or Document Library) item based on its URL.
View jQuery.SPGetListItemInfoByUrl.js
* Given a URL to an item, this method will retrieve information about
* that URL, including the List UID and the ID of the item within the
* list.
* @param {Object|String} options
* An object with the options below or a string with the URL.
* @param {String} options.url
* @param {String} [options.webURL=(current site)]
purtuga / jQuery.doWhen.js
Created Jan 4, 2014
A jQuery utility leveraging the Deferred Class to execute a code block in the future after a given condition is meet. See blog post for more:
View jQuery.doWhen.js
/*! Copyright (c) 2014 - Paul Tavares - purtuga - @paul_tavares - MIT License */
* Delays the execution of a function until an expression returns true.
* The expression is checked every 100 milliseconds for as many tries
* as defined in in the attempts option
* @param {Object} options
* @param {Function} options.when
purtuga / jquery.SPWidgets.js
Last active Dec 27, 2015
Proposed fix to Issue #9 of SPWidgets
View jquery.SPWidgets.js
* @fileOverview jquery.SPWidgets.js
* jQuery plugin offering multiple Sharepoint widgets that can be used
* for creating customized User Interfaces (UI).
* @version 20131106052852
* @author Paul Tavares,,
* @see
* @requires jQuery.js {@link}
You can’t perform that action at this time.