This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# | |
# Description: List all Unmatched and Incorrectly matched files. | |
# Author: https://github.com/Rycochet | |
# Requires: plexapi, python_dotenv | |
# | |
# Config via a .env file, PLEX_TOKEN, PLEX_URL (optional), PLEX_PATH<n> + PLEX_PATH<n>_REPLACE | |
import glob | |
import os |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function gmailAutoarchive() { | |
const delayDays = 2; | |
const batchSize = 100; | |
const maxDate = new Date(); | |
maxDate.setDate(maxDate.getDate() - delayDays); | |
const threads = GmailApp.search(`in:inbox has:userlabels older_than:${delayDays}d`).filter((thread) => thread.getLastMessageDate() < maxDate); | |
if (threads.length) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const PostGIS = { | |
// FUNCTIONS | |
gisContains: { | |
description: "Returns TRUE if and only if no points of supplied lie in the exterior of field, and at least one point of the interior of supplied lies in the interior of field.", | |
fname: "ST_Contains", | |
}, | |
gisContainsProperly: { | |
description: "Returns TRUE if supplied intersects the interior of field but not the boundary (or exterior). Field does not contain properly itself, but does contain itself.", | |
fname: "ST_ContainsProperly", | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Get the height of the display, based on body height, then the lowest element within it | |
*/ | |
function getHeight(): number { | |
var i = 0, | |
body = document.body, | |
style = body.style, | |
elements = document.querySelectorAll("body *"), | |
best = body.offsetHeight + (parseInt(style.marginTop, 10) || 0) + (parseInt(style.marginBottom, 10) || 0);; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Type definitions for ExcelJS | |
* Project: https://github.com/guyonroche/exceljs | |
* Definitions by: Rycochet https://github.com/Rycochet | |
* | |
* This is a WIP | |
*/ | |
declare namespace ExcelJS { | |
type Zip = any; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This is free and unencumbered software released into the public domain. | |
// | |
// Anyone is free to copy, modify, publish, use, compile, sell, or | |
// distribute this software, either in source code form or as a compiled | |
// binary, for any purpose, commercial or non-commercial, and by any | |
// means. | |
// | |
// In jurisdictions that recognize copyright laws, the author or authors | |
// of this software dedicate any and all copyright interest in the | |
// software to the public domain. We make this dedication for the benefit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (!("offsetParent" in document.body)) { | |
Object.defineProperty(HTMLElement.prototype, "offsetParent", { | |
"get": function() { | |
var element = this, | |
parent = element.parentElement, | |
html = document.documentElement, | |
found = null, | |
style = window.getComputedStyle(element); | |
if (element && style.position !== "fixed") { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getQuery(search) { | |
if (!getQuery.parsed) { | |
var match, key, value, | |
rx = /([^=&]+)(?:=([^&]*))?/g, | |
parsed = getQuery.parsed = {}; | |
while ((match = rx.exec(document.location.search.substring(1)))) { | |
key = decodeURIComponent(match[1]); | |
value = match[2] === undefined ? true : decodeURIComponent(match[2]); | |
if (parsed.hasOwnProperty(key)) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Gets the _POST data with correct handling of nested brackets: | |
* "path[to][data[nested]]=value" | |
* "path" | |
* -> "to" | |
* -> "data[nested]" = value | |
* @return array | |
*/ | |
function get_real_post() { |
NewerOlder