Skip to content

Instantly share code, notes, and snippets.

View stevenfollis's full-sized avatar

Steven Follis stevenfollis

View GitHub Profile
@stevenfollis
stevenfollis / SP2010-REST-Operations-jQuery
Last active January 4, 2016 08:49
SharePoint 2010 REST Endpoint Operations using jQuery
//==================================================================
// Get list items
// define the target list url
var listUrl = 'http://samplesite/_vti_bin/ListData.svc/Employee';
$.getJSON(listUrl, function(data) {
// loop through the result set
$.each(data.d.results, function(i, result) {
alert(result);
});
@stevenfollis
stevenfollis / SP2013-REST-Operations
Last active January 4, 2016 18:28
Snippets of jQuery/JavaScript for doing cool stuff with REST services in SharePoint 2013
/*============================================================================*/
/* Query an external endpoint via REST */
function queryEndpoint(url, callback) {
// Issue a POST request to the SP.WebProxy.Invoke endpoint.
// The body has the information to issue a GET request
$.ajax({
url: "../_api/SP.WebProxy.invoke",
type: "POST",
@stevenfollis
stevenfollis / SP2013-AppPart-Iframe-Resizer
Created August 20, 2014 15:39
SP2013 Resize AppPart iFrames from host page with jQuery
// select and loop through all iframes inside of webparts
$('.ms-WPBody iframe').each(function(i, frame) {
// define a variable to hold the new width
var newWidth;
// starting with the iframe, search up the DOM for the closest webpart zone
// then find its width and store it
newWidth = $(frame).closest('.ms-webpart-zone').width();

Keybase proof

I hereby claim:

  • I am stevenfollis on github.
  • I am stevenfollis (https://keybase.io/stevenfollis) on keybase.
  • I have a public key ASA9MxEDFrTKbVpehiiKM6ChYD1niUX7-QGa9m9rgbTywwo

To claim this, I am signing this object:

# https://docs.docker.com/engine/installation/windows/docker-ee/#install-docker-ee
<# Usage
Invoke-WebRequest `
-UseBasicParsing `
-OutFile C:\install-docker-ee.ps1 `
-Uri https://gist.githubusercontent.com/stevenfollis/91d2b64b07a3c2110f879727761fbf1f/raw/install-docker-ee.ps1
C:\install-docker-ee.ps1
#########################################################
#
# Name: ImportTestUsers.ps1
# Author: Israel Vega (Adjusted for JSON by Steven Follis)
# Version: 1.0
# Date: 06/08/2011
# Comment: Create test users from a JSON array for import into an AD
#
#########################################################
# Create directory to hold module files
mkdir -Force C:\DSC
#=================================
# Install xPendingReboot Module
# https://github.com/PowerShell/xPendingReboot
#=================================
# Download xPendingReboot
Invoke-WebRequest `
-UseBasicParsing `
@stevenfollis
stevenfollis / boxstarter.ps1
Last active December 2, 2017 17:29 — forked from jessfraz/boxstarter.ps1
Boxstarter Commands for a new Windows box.
# Description: Boxstarter Script
# Author: Jess Frazelle <jess@linux.com>
# Last Updated: 2017-09-11
#
# Install boxstarter:
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force
#
# You might need to set: Set-ExecutionPolicy RemoteSigned
#
# Run this boxstarter by calling the following from an **elevated** command-prompt:
@stevenfollis
stevenfollis / 1. Distribute Credential Spec File
Last active December 1, 2018 13:23
Docker Compose files to distribute and delete gMSA Cred Spec files across a Swarm Cluster
# Distribute a Credential Spec file to all Windows Server cluster nodes
# gmsa.json by default, else set $env:CREDSPEC with filename
version: '3.3'
configs:
credspec:
file: ${ProgramData}/Docker/CredentialSpecs/${CREDSPEC:-gmsa.json}
services:
copy:
command: cmd /c copy credspec C:\\out\\${CREDSPEC:-gmsa.json}
configs:
@stevenfollis
stevenfollis / profiles.json
Created June 27, 2019 13:16
Windows Terminal Panda Syntax Theme
{
...
"schemes" :
[
...
{
"background" : "#292A2B",
"black" : "#292A2B",
"blue" : "#45A9F9",
"brightBlack" : "#002B36",