Skip to content

Instantly share code, notes, and snippets.

@briantist
briantist / fixutdates.rb
Created September 11, 2012 20:35
Fixes incorrect Added On and Completed On dates in uTorrent.
#############################
# fixutdates.rb
# Fixes uTorrent added on / completed on dates
#
# by Brian Scholer
# http://www.briantist.com/
#
#############################
require 'rubygems'
@briantist
briantist / sample-workflow.yml
Created March 1, 2022 17:03
a sample workflow for notifying on merged PRs of interest
---
name: Notify on docs of interest
on:
pull_request_target:
branches: [devel]
types: [closed]
paths:
- path1
- docs/**/some*pattern.rst
LIBERTY LIBERTY LIBERTY
LIBERTY LIBERTY LIBERTY
LIBERTY LIBERTY LIBERTY
! H|H|H|H|H H__________________________________ H|§|§|§|H H|* * * * * *|---------------------| H|§|∞|§|H H| * * * * * |---------------------| H|§|§|§|H H|* * * * * *|---------------------| H|H|H|H|H H| * * * * * |---------------------| H|H|H|H|H H|---------------------------------| =============== H|---------------------------------| /| _ _ | H|---------------------------------| (| O O |) H|---------------------------------| /| U | H----------------------------------- | =/ | H _..._/ H _|I/|_ H _______/| H |/_______ H / / / H | | | / | H | ||o|| | H
@briantist
briantist / InstallWindowsManagementFramework.vbs
Last active April 3, 2020 15:42
Install Windows Management Framework core package
Set updateSession = CreateObject("Microsoft.Update.Session")
Set updateSearcher = updateSession.CreateupdateSearcher()
Set searchResult = updateSearcher.Search("IsInstalled=0 and Type='Software'")
Set toDL = CreateObject("Microsoft.Update.UpdateColl")
For I = 0 To searchResult.Updates.Count-1
Set update = searchResult.Updates.Item(I)
For kbidindex = 0 to update.KBArticleIDs.Count-1
@briantist
briantist / Replace-Using.ps1
Last active December 12, 2019 01:45
Manual substitution of $Using variables with serialized versions for embedding in DSC Script resources
function Replace-Using {
[CmdletBinding(DefaultParameterSetName = 'AsString')]
[OutputType([String], ParameterSetName = 'AsString')]
[OutputType([ScriptBlock], ParameterSetName = 'AsScriptBlock')]
param(
[Parameter(
Mandatory,
ValueFromPipeline
)]
[String]
@briantist
briantist / z
Last active November 23, 2018 17:13
This file has been truncated, but you can view the full file.
aa
aah
aal
aalii
aardvark
aardvarks
aardwolf
aardwolves
aargh
aarrghh
<#
.SYNOPSIS
Checks parameters of a specific command for parameters that should have a value but are not Mandatory.
.DESCRIPTION
If a parameter is not marked as Mandatory but the intention is for a value to be supplied, this function
will look for an alias that begins with the string "Required_". If such an alias is found and the
parameter is not bound, this function will throw an exception or set a breakpoint depending on the
options supplied.