Skip to content

Instantly share code, notes, and snippets.

@williammincy
williammincy / New-VideoFromImages.ps1
Created March 15, 2023 10:31
Creates a video from a folder of images using ffmpeg, with an optional frame rate parameter
function New-VideoFromImages {
param (
[string]$InputFolder,
[string]$OutputFile,
[int]$FrameRate = 30
)
$cmd = "ffmpeg -framerate $FrameRate -pattern_type glob -i '$InputFolder\*.png' -vf `"scale=1280:-1:flags=lanczos`" -c:v libx264 -profile:v high -crf 20 -pix_fmt yuv420p -vf `"pad=ceil(iw/2)*2:ceil(ih/2)*2`" `"$OutputFile`""
Invoke-Expression $cmd
}
@williammincy
williammincy / form.pug
Last active August 12, 2017 16:22
pug mixin for easy form field creation
mixin inputText(id, label, val)
div.row
label(for= id)= label
input(type="text", name= id, id= id, value= val,autocomplete="off")
mixin inputPassword(id, label, val)
div.row
label(for= id)= label
input(type="password", name= id, id= id, value= val,autocomplete="off")
@williammincy
williammincy / mixin.social.facebook.pug
Last active January 15, 2017 14:37
Pug Mixins for Social Media metadata within HTML pages
mixin facebookMetadata(options)
if options.admin
meta(property="fb:admins", content= options.admin)
if options.appid
meta(property="fb:app_id", content= options.appid)
if options.url
meta(property="og:url", content= options.url)
if options.type
meta(property="og:type", content= options.type)
if options.title
@williammincy
williammincy / download_windows_vms_virtualbox.sh
Created August 25, 2015 18:02
Download all Microsoft modern.ie VMs for Virtualbox
#!/bin/bash
clear
echo 'Downloading VMs into ~/Documents/VirtualboxVMs/modern.ie_vms'
mkdir -p ~/Documents/VirtualboxVMs/modern.ie_virtualbox_20150801 && cd ~/Documents/VirtualboxVMs/modern.ie_virtualbox_20150801
echo ''
echo '| | (00% Complete)'
curl -O -L "https://az792536.vo.msecnd.net/vms/VMBuild_20150801/VirtualBox/MSEdge/Mac/Microsoft%20Edge.Win10.For.Mac.VirtualBox.zip"
clear
@williammincy
williammincy / gist:6202938
Created August 11, 2013 01:15
This is a simple POC for using the code I added to the DMS Dev branch (fork) to enable sorting of items within DMS options panels. This was implemented against 'multi' type options and is initialized by a 'sortable' key within the options array.
<?php
/*
Section: Sortable
Author: William Mincy
Author URI: http://slipperysource.com
Description: Example of sortable options reordering content
Class Name: wmSortable
Filter: Component
Loading: active,templates,main,sb_1,sb_2,sb_wrap, footer, footermore
*/