Skip to content

Instantly share code, notes, and snippets.

@dprado75
dprado75 / gist:617e3c46698bfa5323d31fc904848e02
Created January 31, 2024 09:07
Powershell script to transform a compilation of security camera videos into a timelapse with a few caviats - (1) extract a few frames from each security cam video (2) add a small label with a timestamp to each selected frame (3) rename the files sequentially (4) build a final video
param(
[string]$SourceFolder,
[string]$OutputFolder
)
# Ensure output folder exists
if (-not (Test-Path -Path $OutputFolder)) {
New-Item -ItemType Directory -Path $OutputFolder
}
@dprado75
dprado75 / lid_hibernate.ahk
Last active December 4, 2022 21:33
Fixes sleep problem for laptops using Windows 10 - the PC will hibernate whenever this script is running on battery power and you close the lid
/*
Daniel DP - https://gist.github.com/dprado75/eb317ebca12d5fea1663645039c0b6d9
Code created based in the following links:
Lid Library By Linear Spoon - https://www.autohotkey.com/board/topic/92888-lidwatcher-monitor-the-state-of-your-laptop-lid/
Battery status by AntonyB - https://www.autohotkey.com/board/topic/7022-acbattery-status/
*/
@dprado75
dprado75 / link.php
Created November 10, 2020 01:34
Code snippet to add custom thumbnail to a Mozilla Hubs link (works for Hubs Cloud too)
@dprado75
dprado75 / permissions-utils.js
Last active November 10, 2020 01:22
Code snippet to block visitor movements for Mozilla Hubs Cloud
export function showHoverEffect(el) {
//...
//insert before return line - return (isSpawner || !isPinned || isFrozen) && canMove;
if (window.APP.hubChannel.can("spawn_emoji"))
{
//enable visitors movements
AFRAME.scenes[0].systems["hubs-systems"].characterController.isMotionDisabled = false;
AFRAME.scenes[0].systems["hubs-systems"].characterController.isTeleportingDisabled = false;
}