Skip to content

Instantly share code, notes, and snippets.

View Offbeatmammal's full-sized avatar

Offbeatmammal Offbeatmammal

View GitHub Profile
@Offbeatmammal
Offbeatmammal / prune.ps1
Last active June 12, 2024 02:28
We had an issue where the default number of versions in SharePoint was consuming a lot of space. We were able to reset the default, but there isn't a quick way to prune the old versions across and entire site (have to do it file by file) so built a quick and dirty PowerShell script we could use to handle one or more sites, limited to only PowerP…
# Ensure you have installed PnP Powershell
# https://pnp.github.io/powershell/articles/installation.html
# Set Variables
$SiteURL = "https://{URL}.sharepoint.com/sites/"
# ragged array of two or three parameters:
# - the name of the site (to be concatenated with the $SiteURL),
# - the root folder of the site to prune
# - optionally any message to display to the user while the script runs for that folder
$Sites = ("{site}","{root folder}"),("{site}","{root folder}","{comment to display}"),("{site}","root folder}")
Verifying that +offbeatmammal is my blockchain ID. https://onename.com/offbeatmammal
@Offbeatmammal
Offbeatmammal / html5videoEvents.html
Created September 13, 2012 23:03
A sample showing HTML5 video events and appropriate properties. Useful for testing different browser behaviors. The Java file is an Android webView that can be used to host the HTML sample
package com.offbeatmammal.android.webview;
import android.app.Activity;
import android.os.Bundle;
import android.webkit.WebChromeClient;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.widget.RelativeLayout;
public class WebViewActivity extends Activity {
@Offbeatmammal
Offbeatmammal / pls2audio.html
Created October 6, 2011 04:06
HTML5, JavaScript to load a .pls file to <audio> tag. Uses error and ended events to move to the next item
<! DOCTYPE html>
<html>
<head>
<title>PLS Processor</title>
<!-- needed for IE9 to ensure it treats page as HTML5 properly -->
<meta http-equiv="X-UA-Compatible" content="IE=9" >
</head>
<body>
<p>Audio PLS processor<p>
<audio id="audio" controls="controls"></audio >