Skip to content

Instantly share code, notes, and snippets.

Focusing on final MSc Data visualisation assignment and SharePoint migration

tristian o'brien tristian2

Focusing on final MSc Data visualisation assignment and SharePoint migration
View GitHub Profile
tristian2 / gist:eaac1a50c15784a6813525edfe5d5a92
Created Sep 20, 2018
deepdream google cloud for the band MoonDrive71
View gist:eaac1a50c15784a6813525edfe5d5a92
sudo apt install git-all
git clone
add line to deploy.prototxt file (use sudo nano deploy.prototxt)
force_backward: true
Untar &move
tristian2 / sitesForR.ps1
Created Sep 19, 2018
look at sites hierarchy and output as css, for further analysis in R
View sitesForR.ps1
#depict the site hierarchy, for further analysis in R or SPSS
#setup csv
Add-Content -Path C:\SiteStructure.csv -Value '"Node","Parent","Template"'
function GetAllWebs($url)
$w = Get-SPWeb -identity $url;
tristian2 / createSubSiteBasicTestGroups.ps1
Last active Sep 7, 2018
subsite default groups association demo why it doesnt work
View createSubSiteBasicTestGroups.ps1
#my tenancy
#based upon
#at this poiint this doesn not setup the association, so it doesnt work. sets up the groups nicely though
$UserName= "tristian2@******"
$Password = "*******"
$SiteUrl = "https://******"
$subsite = "testSubSite"
$subsiteTitle = "test SubSite"
tristian2 / RESTful SharePoint Online data
Created Aug 24, 2018
How to get data from a SharePoint online list using REST
View RESTful SharePoint Online data
<!DOCTYPE html>
<html lang="en" xmlns="">
<meta charset="utf-8" />
<script src=""></script>
<script src="js/JSON-to-Table.min.1.0.0.js"></script>
View SharePoint 2010 webservices calls to do various things to the page
function removeMySiteLink(username) {
var webAbsoluteUrl = window.location.protocol + "//" + + _spPageContextInfo.siteServerRelativeUrl;
var art = null;
var migratedDate = "";
if (window.ActiveXObject) {
art = new ActiveXObject("Microsoft.XMLHTTP");
}//Mozilla, chrome, etc.,
else if (window.XMLHttpRequest) {
tristian2 / Ships.js
Created Aug 19, 2016
BattleShips demo of how we can "subclass" in JS
View Ships.js
var TrisCorp = TrisCorp || {};
TrisCorp.BattleShips = TrisCorp.BattleShips || {};
TrisCorp.BattleShips.Ship = TrisCorp.BattleShips.Ship || {};
TrisCorp.BattleShips.Ship = function() {
if (this.constructor === TrisCorp.BattleShips.Ship) {
tristian2 / gist:54bc9febfd2be5b30467dfd300e5891d
Created Aug 10, 2016
BattleShips port rom GROOVY to c#
View gist:54bc9febfd2be5b30467dfd300e5891d
using System;
using System.Collections;
using System.Linq;
public class Program
public static void Main()
tristian2 / gist:936c6a388c0bd2e20da2286d890faf33
Created Aug 4, 2016
my 2016 AutSPInstaller file with powershell
View gist:936c6a388c0bd2e20da2286d890faf33
<?xml version="1.0" ?>
<!-- AutoSPInstaller Sample Configuration File
General Instructions:
1. If you use the characters ' " < > & in your configuration (e.g. in passwords) you should encode them as follows:
' &apos;
" &quot;
< &lt;
> &gt;
& &amp;
View Preplog.cpp
* File: preplog.cpp
* Author: David Grant(MS)
* Purpose: Removes lines beginning with "#" from an input
* text file
* Written to remove header lines from IIS
* web logs for BULK IMPORT to SQL
* Disclaimer: This code is to be used for sample purposes only
View PS get Shizzle from key for AzureAD
$certPath = "C:\Certs\TrisOfficePnP.cer"
$cert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2
$rawCert = $cert.GetRawCertData()
$base64Cert = [System.Convert]::ToBase64String($rawCert)
$rawCertHash = $cert.GetCertHash()
$base64CertHash = [System.Convert]::ToBase64String($rawCertHash)
$KeyId = [System.Guid]::NewGuid().ToString()
You can’t perform that action at this time.