Skip to content

Instantly share code, notes, and snippets.

View mark05e's full-sized avatar

mark05E mark05e

View GitHub Profile
@mark05e
mark05e / eqbank-year-filter.js
Created February 7, 2026 22:29
Helper script to programmatically set EQ Bank transaction date filters on an Angular-controlled date picker. Uses the native input value setter to bypass Angular form interception. May require multiple executions due to Angular validation timing.
/**
* EQ Bank – Angular Date Picker Helper
* -----------------------------------
* Tested on:
* https://secure.eqbank.ca/accounts/main/details
*
* Purpose:
* Programmatically set date values on Angular-controlled
* date picker inputs and submit the filter form.
*
@mark05e
mark05e / tpl_event_calendar_button.user.js
Last active November 28, 2025 00:06
Adds a button to TPL event pages to quickly add the event details to Google Calendar.
// ==UserScript==
// @name TPL Event Google Calendar Button
// @namespace http://tampermonkey.net/
// @version 1.0
// @description Adds a button to TPL event pages to quickly add the event details to Google Calendar.
// @author mark05e & Gemini
// @match https://www.torontopubliclibrary.ca/detail.jsp?*Entt=RDMEVT*
// @run-at document-idle
// @updateURL https://gist.github.com/mark05e/fe76e1f27e15477983e9ea1844aff254/raw
// ==/UserScript==
# Summary of the Python Code
# The Python script export_scripts_from_json.py takes a JSON file as input, extracts JavaScript code snippets from specific nodes within the JSON structure, and saves each snippet as a separate .js file.
#
# Key Functionality
# ------------------
# JSON Input: The script reads a JSON file from the path provided as a command-line argument.
# Data Extraction: It navigates the JSON structure to find nodes of type "script" and extracts the content of the "script" property within their "properties".
# File Output: Each extracted script is saved to a .js file. The files are named using a combination of a sequential counter (01, 02, 03, etc.) and the script's "uid" property. The script creates a directory (if it doesn't exist) named after the workflowName in the JSON file and saves all the .js files in that directory.
# Error Handling: The script includes error handling for file not found, invalid JSON format, missing keys in the JSON data, and issues during file writing.
# Filename San

Integrating TSIP: Browser Protocol vs. REST API

This post explores two methods for integrating with TSIP (SIP Client): leveraging browser protocol integration and utilizing a REST API through shell2http.

Method 1: Browser Protocol Integration

TSIP supports a custom protocol, tsip:, which allows direct execution of Lua scripts from a web browser. This method eliminates the need for an intermediary server.

To execute a script, construct a URL with the tsip: protocol and the SCRIPT_B64 parameter, which contains the base64-encoded Lua script.

Incontact DB Connector Notes

Windows Service Information

function Get-DBCServiceInformation {
    $DisplayName = "Incontact"

    # Check if running PowerShell 5 or earlier
    if ($PSVersionTable.PSVersion.Major -le 5) {
        # Get all services that match the display name using Get-WmiObject
@mark05e
mark05e / Execute-FFmpeg.ps1
Last active July 26, 2025 19:26
Audio Conversion script for low-bandwidth, telephony-related audio conversions
<#
.SYNOPSIS
Executes the FFmpeg command to convert an input file to a specified audio format.
.DESCRIPTION
This function converts a given input file to the specified audio format using the FFmpeg command-line tool.
It allows customization of audio parameters such as sampling rate, channels, bitrate, and codec.
.PARAMETER InputFile
The path to the input file.

Extract Base Url

FUNCTION extract_base_url(input_url)
{
  // Split the input URL by protocol ("://")
  url_components = input_url.split("://")

  // Check if the split resulted in at least two parts (protocol and domain)
  IF (url_components.count() >= 2) 
  {
@echo off
:: Display the full path of this batch file for debugging
:: echo Debug: Batch file path: %~f0
:: Get the full path of this batch file
set "batchFilePath=%~f0"
:: Get the base name (without extension) of the batch file
set "baseName=%~n0"
:: echo Debug: Base name of batch file: %baseName%
@mark05e
mark05e / wealthsimple-transaction-for-ynab.user.js
Last active February 8, 2026 19:19 — forked from shotasenga/wealthsimple-transaction-for-ynab.user.js
Export transactions from Wealthsimple to a CSV file for YNAB import
// ==UserScript==
// @name Export Wealthsimple transactions to CSV for YNAB
// @namespace wealthsimple.activity.export
// @version 20260208
// @description Export transactions from Wealthsimple to a CSV file for YNAB import with enhanced Payee info
// @author https://gist.github.com/shotasenga
// @author https://gist.github.com/kaipee
// @author https://gist.github.com/mark05e
// @downloadURL https://gist.githubusercontent.com/mark05e/4e8bcfa54df846529a0bd756c27f2222/raw
// @updateURL https://gist.githubusercontent.com/mark05e/4e8bcfa54df846529a0bd756c27f2222/raw