Skip to content

Instantly share code, notes, and snippets.

View mark05e's full-sized avatar

mark05E mark05e

View GitHub Profile
# 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 January 14, 2025 15:19
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
Created December 29, 2024 21:15 — 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 https://shotasenga.com/
// @version 2024090300
// @description Export transactions from Wealthsimple to a CSV file for YNAB import
// @author Shota Senga
// @match https://my.wealthsimple.com/app/activity*
// @icon https://www.google.com/s2/favicons?sz=64&domain=wealthsimple.com
// @grant none
// ==/UserScript==

Extracting Custom Font Icons: A Step-by-Step Guide

Summary

This guide outlines the process of extracting custom font icons from a font file (EV-IVR--Script-Studio) using FontForge. With the assistance of Meta AI, we successfully extracted the required icons in SVG format.

Steps Taken

Step 1: Inspect Element and Identify Font Family

Exploring Available Certificate Authorities in AWS Lambda

Analysis of the Certificate Authorities accessible within AWS Lambda.

Instructions