Skip to content

Instantly share code, notes, and snippets.

View unabridgedxcrpt's full-sized avatar

Jonathan Bird unabridgedxcrpt

View GitHub Profile
@patricksimpson
patricksimpson / static-search.js
Created January 14, 2019 05:02
A little search for static sites, using Lunr.js!
(function() {
if (window.fetch) {
let searchPage = document.querySelector('.search-body');
if (searchPage) {
let addLunr = document.createElement('script');
addLunr.src = '/static/js/lunr.js';
document.body.appendChild(addLunr);
addLunr.onload = function() {
fetch('/lunr.json').then(function(response) {
return response.json();
@DavidBuchanan314
DavidBuchanan314 / panopto_dl.py
Last active June 22, 2023 22:21
Panopto video downloader
import requests
import json
import os
import youtube_dl
PANOPTO_BASE = "https://cardiff.cloud.panopto.eu"
"""
Place the value of your .ASPXAUTH token in the following variable
"""
@jbdammeier
jbdammeier / sample_get_canvas_grades.py
Last active March 16, 2023 15:51
This is a sample Python program demonstrating how to use the Canvas API to pull a list of active courses with total score information. Produces CSV with Percent & Letter Grade.
import requests, json
from pprint import pprint
from urllib.request import Request, urlopen
import csv
import os
import timeit
def getInput(file):
'''Opens the file, produces list of lines in the file, removes the header row, and returns the list'''
inFile = open(file)
@mcandre
mcandre / macOS-in-virtualbox.md
Created March 19, 2018 02:01 — forked from rob-smallshire/macOS-in-virtualbox.md
Notes on getting macOS Sierra running in Virtualbox on a Windows 10 host

On Mac

Download, but don't run, the Sierra installer from the Mac App Store. This places the installer at /Applications/Install\ macOS\ Sierra.app/.

Now run the following commands to build a suitable VM image from the installer:

git clone https://github.com/jonanh/osx-vm-templates
cd osx-vm-templates/packer

sudo ../prepare_iso/prepare_vdi.sh -D DISABLE_REMOTE_MANAGEMENT -o macOS_10.12.vdi /Applications/Install\ macOS\ Sierra.app/ .

@grahampugh
grahampugh / Remove Application.sh
Last active February 17, 2025 18:15
A Jamf Pro script to remove applications in the Applications folder.
#!/bin/bash
#######################################################################
#
# Remove Application Script for Jamf Pro
#
# This script can delete apps that are sandboxed and live in /Applications
#
# The first parameter is used to kill the app. It should be the app name or path
# as required by the pkill command.
@danaspiegel
danaspiegel / zdl.py
Last active July 16, 2024 12:40
Zoom Recording Downloader
#!/usr/bin/env python3
import os
import requests
import itertools
from dateutil.parser import parse
API_KEY = ''
API_SECRET = ''
@joshuatly
joshuatly / podcastgen.py
Last active August 24, 2019 19:45 — forked from alghanmi/podcastgen.py
Podcast Feed Generator -- Generate an podcast RSS feed for a set of media in a directory.
"""Podcast Feed Generator
This version if forked from alghanmi/podcastgen.py.
Several changes made including:
- Make compatible with files without ID3 tags
- Remove podcast episode description that is generated from ID3 tags
- Change podcast episode title to get directly from filename so it does not rely on ID3 tags
Generate an podcast RSS feed for a set of media in a directory.
Use the list-extensions argument to see the list of supported extensions. You can add custom extensions using
@misbach
misbach / ExportOffice365Org.js
Last active July 3, 2024 09:12
Export Office 365 Org Chart
/*
Description:
Exports all people in an organization starting from a specified person.
To run:
1. Go to the People landing page in Office 365 and view a specific person
2. Change the starting person email, and UUID.
3. Paste the code below into the javascript console
Misc. Info
@Jeff-Russ
Jeff-Russ / PHP Performance: if,elseif vs case,switch vs nested if.php
Created December 17, 2016 03:00
PHP Performance: if/elseif vs case/switch vs nested if
<?php
$iter = 500000;
$start = microtime(true);
$n = 0;
for ($c=0; $c<7*$iter; $c++) {
$i = $c % 16;
if ($i===0) $n += 0;
<!-- Modify this according to your requirement -->
<h3>
Redirecting to duckdev.com after <span id="countdown">10</span> seconds
</h3>
<!-- JavaScript part -->
<script type="text/javascript">
// Total seconds to wait
var seconds = 10;