Skip to content

Instantly share code, notes, and snippets.

doing things

William Dibbern gotdibbs

doing things
View GitHub Profile
gotdibbs / chia-move-plots.ps1
Last active July 24, 2021 14:36
Hacky utility scripts for Chia on Windows
View chia-move-plots.ps1
# Safely move chia plots from one drive to another on Windows
$SOURCE_DIR = 'A:\Chia'
$DEST_DIR = 'B:\Chia'
$move_count = 0;
while (($plot_to_move = (Get-ChildItem $SOURCE_DIR -Filter '*.plot' | Select-Object -First 1)) -ne $null) {
$old_name = $plot_to_move.Name
# Temporarily rename the plot before moving
gotdibbs / convert.ps1
Last active March 8, 2021 23:59
Convert mp4 to h.265
View convert.ps1
# Assumes all videos are in a folder called "video" sitting alongside ffmpeg
# Note conversion is likely lossy, but not noticeable in my experience and the >50% space savings were worth it to me personally
# See more detailed notes below for tuning and options
$videosToConvert = Get-ChildItem -Filter '*.mp4'
foreach ($video in $videosToConvert) {
$destination = Join-Path 'output' $video.Name
If ((Test-Path -Path $destination -PathType Leaf) -ne $true) {
gotdibbs / gist:63a298ab0752fa9a7185d00e8b76efff
Created April 25, 2020 16:16
Mocking chainable APIs in Javascript, ex. mocking `useFirestore` from `react-redux-firebase`
View gist:63a298ab0752fa9a7185d00e8b76efff
let firestoreDefinition = {
collection: {
doc: {
get: true,
set: true,
update: true,
destroy: true
batch: {
gotdibbs / webapi.js
Created February 1, 2017 17:55
Web API, seriously?
View webapi.js
var activity = {
subject: subject
activity[['regardingobjectid_', _entityName, '_task@odata.bind'].join('')] =
['/', entitySetName, '(', Guid.decapsulate(entityId), ')'].join('');
gotdibbs / copy-spotlight.cmd
Created October 30, 2016 20:18
Copy Windows Spotlight Images
View copy-spotlight.cmd
@echo off
title "Copying Spotlight Images..."
mkdir Spotlight
xcopy %localappdata%\Packages\Microsoft.Windows.ContentDeliveryManager_cw5n1h2txyewy\LocalState\Assets\*.* Spotlight\
ren Spotlight\*.* *.jpg
gotdibbs /
Created April 17, 2015 16:23

Keybase proof

I hereby claim:

  • I am gotdibbs on github.
  • I am gotdibbs ( on keybase.
  • I have a public key whose fingerprint is 94E8 6A21 8AA2 882F FBB8 C559 ABA8 E423 39DF B401

To claim this, I am signing this object:

gotdibbs / orgquery.sql
Last active December 19, 2015 00:39
Check users against MSCRM_CONFIG database for invalid user id error #sql #crm
View orgquery.sql
select crm.FullName
from SystemUser crm
where crm.IsDisabled = 0
and not exists
select crm.SystemUserId
from MSCRM_CONFIG.dbo.SystemUserOrganizations config
join MSCRM_CONFIG.dbo.Organization org