Skip to content

Instantly share code, notes, and snippets.

@MikelMosso
MikelMosso / panopto_dl.py
Created February 10, 2021 23:08 — forked from DavidBuchanan314/panopto_dl.py
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
"""
@MikelMosso
MikelMosso / python_on_iphone.sh
Created November 17, 2020 19:26 — forked from AlecSchneider/python_on_iphone.sh
How to install apk and Python on your iPhone using the iSH Shell
cd
# you can do this all in one command
wget -qO- http://dl-cdn.alpinelinux.org/alpine/v3.12/main/x86/apk-tools-static-2.10.5-r1.apk | tar -xz sbin/apk.static && ./sbin/apk.static add apk-tools && rm sbin/apk.static
apk add python3
@MikelMosso
MikelMosso / youtube-dl.sh
Created November 17, 2020 19:25 — forked from AlecSchneider/youtube-dl.sh
Shows how to install pip -> youtube-dl and download videos
apk add py3-pip
pip3 install youtube-dl
# download video
youtube-dl --no-check-certificate link
# run in background
youtube-dl --no-check-certificate -q link &
function processInboxToSheet() {
//var threads = GmailApp.getInboxThreads();
// Have to get data separate to avoid google app script limit!
var start = 0;
var threads = GmailApp.search('in:unread', 0, 100);
var sheet = SpreadsheetApp.getActiveSheet();
var result = [];
for (var i = 0; i < threads.length; i++) {
var thread = threads[i];
function extractData(data, startStr, endStr) {
// This function extracts text between two strings
// i.e. extractData("Good_news,_everyone!", "Good_", ",_Everyone!") will return "News"
var startIndex, endIndex, text = 'N/A';
startIndex = data.indexOf(startStr);
if(startIndex != -1) {
startIndex += startStr.length;
text = data.substring(startIndex);
@MikelMosso
MikelMosso / gist:784c332c520d3e2157ed0d6df947fbe2
Created July 17, 2020 14:55 — forked from siygle/gist:9678772
Parse Gmail Inbox to sheet
function processInboxToSheet() {
//var threads = GmailApp.getInboxThreads();
// Have to get data separate to avoid google app script limit!
var start = 0;
var threads = GmailApp.getInboxThreads(start, 100);
var sheet = SpreadsheetApp.getActiveSheet();
var result = [];
for (var i = 0; i < threads.length; i++) {
var messages = threads[i].getMessages();