Skip to content

Instantly share code, notes, and snippets.

@kerray
kerray / Signatures.Microsoft.Xrm.Data.PowerShell.psm1
Created July 26, 2024 09:07
Microsoft.Xrm.Data.PowerShell method signatures
# Microsoft.Xrm.Data.PowerShell.psm1 method signatures for better generated code
function Connect-CrmOnlineDiscovery{
[CmdletBinding()]
PARAM(
[parameter(Mandatory=$false)]
[PSCredential]$Credential,
[Parameter(Mandatory=$false)]
[switch]$InteractiveMode
)
@kerray
kerray / subtitles.ps1
Last active April 9, 2023 19:35
Script that copies and renames subtitle files from the 'Subs' folder to the folder containing the media file
<#
This script copies and renames subtitle files from the 'Subs' folder to the folder containing the media files.
It works recursively through all child folders.
The user can configure the languages, video formats, and subtitle formats to process.
Larger subtitle files are prioritized when multiple files are found for the same language.
#>
# Configuration
$languageMap = @{
"English" = "en"
@kerray
kerray / vimeo-downloader.js
Created October 13, 2021 18:28 — forked from alexdrean/vimeo-downloader.js
Download video from Vimeo (chopped m4s files)
// 1. Open the browser developper console on the network tab
// 2. Start the video
// 3. In the dev tab, locate the load of the "master.json" file, copy its full URL
// 4. Run: node vimeo-downloader.js "<URL>"
// (done automatically now) 5. Combine the m4v and m4a files with mkvmerge
const fs = require('fs');
const url = require('url');
const https = require('https');
const { exec } = require('child_process');