Skip to content

Instantly share code, notes, and snippets.

@KirovAir
KirovAir / batch-convert-h264-to-h265-HEVC.ps1
Created December 7, 2023 21:18
A snippet to batch convert
# Set the path to the folder containing the video files
$folderPath = "C:\Users\me\Downloads\Movies"
$cacheDir = "C:\Users\me\Downloads\Cache"
$minSize = 3GB # minimal size to trigger a x265 conversion
# Get a list of video files with "264" in the filename and .mkv or .mp4 extension, including subdirectories
$videoFiles = Get-ChildItem -Path $folderPath -Filter "*264*.m*" -Recurse | Where-Object { $_.Extension -eq '.mkv' -or $_.Extension -eq '.mp4' }
# Display the list of files, including their sizes
Write-Host "List of video files to be converted:"
@KirovAir
KirovAir / synology-drive-hack.sh
Last active November 22, 2023 09:26
Synology DS216+II eSata as a volume on DSM 7.2
# THANKS TO:
# https://www.casler.org/wordpress/synology-ssd-cache-on-external-devices/
# https://www.youtube.com/watch?v=KvW6LRw1RZs
# THESE ARE THE synoinfo.conf CHANGES I MADE:
# DEFAULT:
maxdisks="2"
internalportcfg="0x3" # 0000 0011
esataportcfg="0x4" # 0000 0100
@KirovAir
KirovAir / gist:81cbd0ba383fa45246ac41c2b1874a75
Created September 27, 2022 17:27
Motion sensor with sun condition
blueprint:
name: Motion-activated Light with sun condition
description: Turn on a light when motion is detected and sunset.
domain: automation
input:
motion_entity:
name: Motion Sensor
selector:
entity:
domain: binary_sensor
@KirovAir
KirovAir / PHPCompatibilityInstaller.bat
Created October 23, 2018 10:05
Set up a quick PHPCompatibility installation on windows using Git.
@echo off
echo Make sure you have the following installed correctly in your PATH:
echo - Git
echo - PHP (Or place the php directory in right here so php is in php/php.exe)
pause
set PHP_PEAR_PHP_BIN=php/php
IF EXIST PHP_CodeSniffer (
cd PHP_CodeSniffer
git pull
cd ..
@KirovAir
KirovAir / topangafiles.txt
Created March 1, 2018 07:19
Electra topanga filelist
bin/bash
bin/dd
bin/ln
bin/sed
bin/vdir
bin/bunzip2
bin/dir
bin/ls
bin/sh
bin/zcat