- https://coreskills.mmodrow.rocks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$videos = Get-ChildItem *.mp4 | |
foreach ($video in $videos) { | |
$duration = [float](ffprobe -i $video.fullName -show_entries format=duration -v quiet -of csv="p=0") | |
ffmpeg -i $video.fullName -ss 0 -to ($duration - 5) (Join-Path "..\trimmed" ($video.name)) | |
} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$videos = @(Get-ChildItem *.avi | Where-Object { -not $_.name.contains("_h264") -and -not $_.name.contains("_noAudio") }) | |
$total = $videos.count | |
$current = 1 | |
foreach ($video in $videos) { | |
$silentVideoName = $video.basename + "_noAudio_h264.mp4" | |
Write-Progress -Status "Stripping Audio and recoding video to h.264." -PercentComplete ($current / $total * 100) -Activity "Writing file $current of $total." | |
if ( -not (Test-Path $silentVideoName )) { | |
Write-Host ("Converting " + $silentVideo.name + " to " + $silentVideoName + ".") | |
ffmpeg -i $video.name -an -c:v libx264 -hide_banner -v warning $silentVideoName |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$silentVideos = Get-ChildItem *.mp4 -Include @("*_noAudio*", "*_h264*") | Where-Object { $_.length -gt 0 } | |
foreach ($silentVideo in $silentVideos) { | |
$silentVideoName = ($silentVideo.basename.replace("_noAudio", "").replace("_h264", "")) + ".avi" | |
if (Test-Path($silentVideoName)) { | |
Write-Host ( "removing " + $silentVideoName) | |
Remove-Item $silentVideoName | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[CmdletBinding()] | |
param ( | |
[string] | |
$jsonImportPath, | |
[string] | |
$jsonExportPath, | |
[string] | |
$cardName | |
) | |
$trelloData = Get-Content $jsonImportPath -Encoding UTF8 | ConvertFrom-Json |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[CmdletBinding()] | |
param ( | |
[string] | |
$midiFilePath, | |
[string] | |
$label = "Label", | |
[int[]] | |
$midiChannels = @(2), | |
[int] | |
$ticksPerQuarterNote = 192, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[CmdletBinding()] | |
param ( | |
[Parameter()] | |
[String] | |
$filePath, | |
[long] | |
$targetSizeInBytes = 500000000, #4294967296 Bit = 512MiB | |
[switch] | |
$deleteFile = $false | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[CmdletBinding()] | |
param ( | |
[Parameter(Mandatory)] | |
[ValidateNotNullOrEmpty()] | |
[string] | |
$source, | |
[Parameter(Mandatory)] | |
[ValidateNotNullOrEmpty()] | |
[string] | |
$destination, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ************************************************************************* | |
* Filter TimeCamp Time Tracking Report. | |
* ************************************************************************* | |
* Goto https://app.timecamp.com/app#/reports/projects_and_tasks/detailed | |
* Filter the desired time span etc. | |
* Inspect result of https://app.timecamp.com/time_tracking/ajax_get_reports_data | |
* in your browser dev tools network analysis. | |
* ************************************************************************* */ | |
var response = response ?? {}; // insert response from the ajax call in the header - can be several thousands of lines long. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ************************************************************************* | |
* Filter TimeCamp Location Report for specific Locations (e.g. to check | |
* home office days vs. on premise days). | |
* ************************************************************************* | |
* Goto https://app.timecamp.com/app#/location | |
* Filter the desired time span etc. | |
* Inspect result of https://app.timecamp.com/location/index in your browser | |
* dev tools network analysis. | |
* ************************************************************************* */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Get-AsStacks{ | |
param([int]$count, [int]$size = 64, [string]$stackLabel = "Stacks") | |
[float]$divisor = [float]([float]$count / [float]$size) | |
$floatingPointDigits = $divisor % 1 | |
$stacks = $divisor - $floatingPointDigits | |
$singles = [int]($floatingPointDigits * $size) | |
Write-Host ("$stacks $stackLabel + $singles") | |
} |
NewerOlder