Skip to content

Instantly share code, notes, and snippets.

View jayotterbein's full-sized avatar

Jay Otterbein jayotterbein

  • Austin, TX, USA
View GitHub Profile
@jayotterbein
jayotterbein / userscript_gcal_rc_dashes.js
Last active February 12, 2020 16:12
Ring Central Google Calendar add dashes to ID (Tampermonkey)
// ==UserScript==
// @name Ring Central ID dashes
// @namespace http://tampermonkey.net/
// @version 0.6
// @description Add dashes to Ring Central meeting IDs in the "ID:" display
// @author Jay Otterbein
// @match https://calendar.google.com/calendar*
// @grant none
// @updateURL https://gist.githubusercontent.com/jayotterbein/9bc44309c15c48cbd4ac5147445ae1fa/raw/userscript_gcal_rc_dashes.js
// @homepageURL https://gist.github.com/jayotterbein/9bc44309c15c48cbd4ac5147445ae1fa/userscript_gcal_rc_dashes.js
@jayotterbein
jayotterbein / bulkunwatch.sh
Created June 12, 2017 13:56
Unwatch everything in JIRA
#!/bin/bash
# Bulk Unwatch
# JIRA doesn't support unwatch from the bulk change action
# This script fills the gap
# Known to work with JIRA 5 via the REST API
#
# 1. Using JIRA, Issue Navigator, write a query to get all
# the issues you want to unwatch. Something like
# "issue in watchedIssues() AND status != Closed"
@jayotterbein
jayotterbein / clonevm.sh
Last active May 30, 2022 21:35
Shell script to clone a VMWare fusion VM and rename all the appropriate files
#!/bin/bash
shopt -s nullglob # When expanding wildcards into files, return null when no matches are found
set -e # Abort script on any error
src="Windows 10 x64" # Default source VM
pushd "$HOME/Documents/Virtual Machines.localized" # Avoid full path usage everywhere
if [ $# -eq 0 ]; then
echo "Usage: $(basename $0) newvm"
echo "$src is used for the source vm"
exit
@jayotterbein
jayotterbein / sln.ps1
Last active June 4, 2018 21:36
Open solution file in current directory with most recent visual studio
Function sln([string]$hintPath = $null)
{
[string[]]$installed = @(gci HKLM:\Software\Microsoft\VisualStudio\) |% { $_.Name } |% { Split-Path $_ -Leaf }
$versions = @()
foreach ($i in $installed)
{
[Version]$v = "0.0"
if ([Version]::TryParse($i, [ref]$v))
{
$versions += $v
public static class FuncEqualityComparer
{
public static IEqualityComparer<T> Create<T>(Func<T, T, bool> func)
{
return new FuncEqualityComparerType<T>(func);
}
public static IEqualityComparer<T> CreateEqualityComparerFor<T>(this IEnumerable<T> enumerable, Func<T, T, bool> func)
{
return new FuncEqualityComparerType<T>(func);