Skip to content

Instantly share code, notes, and snippets.

View cohoe's full-sized avatar

Grant Cohoe cohoe

View GitHub Profile
@cohoe
cohoe / validate.sh
Created October 28, 2020 17:29
Wrapper to validate the integrity of a media file with ffmpeg
#!/usr/bin/env bash
# Parse arguments
if [[ -z "${1}" ]]; then
echo "Must give path to file as first arg."
exit 1
fi
if [[ -d "${1}" ]]; then
echo "File ${1} is a directory. Skipping."
@cohoe
cohoe / h19.txt
Last active October 28, 2019 18:15
College Hockey 2019-20 Season Calendar
Grant Cohoe (@grantcohoe)
Hit list:
* Metro Riveters
--- Week 00: Pre-Exhibitions -----------------------------------------------
Sep 20 Friday
Sep 21 Saturday
----------------------------------------------------------------------------
College Hockey 2018-19 Season Calendar
Grant Cohoe (@grantcohoe)
--- Week 00: Pre-Exhibitions -----------------------------------------------
Sep 22 Saturday
02:00PM Northeastern Women vs NWHL Boston @ Matthews Arena (Boston MA)
--- Week 01: Womens Exhibitions --------------------------------------------
Sep 28 Friday
Sep 29 Saturday
# Download the Puppet Agent
$puppet_local_package='puppet.msi'
$puppet_download_directory='C:\Users\camper\Downloads'
if (!(Test-Path $puppet_download_directory\$puppet_local_package)) {
Invoke-WebRequest https://downloads.puppetlabs.com/windows/puppet-agent-x64-latest.msi -OutFile $puppet_download_directory\$puppet_local_package
}
msiexec /q /i $puppet_download_directory\$puppet_local_package
'Windows: Where I need a shell wrapper to run a shell script because it appears with a GUI box.
Set objShell = CreateObject("Wscript.shell")
objShell.run "powershell.exe -NoProfile -WindowStyle hidden -command C:\Users\cohoe\Desktop\bluetooth.ps1 -BluetoothStatus toggle", 0, True
@cohoe
cohoe / AutoHotkey.ahk
Last active March 30, 2018 21:11
Windows IR Remote Tweaks
^+!1::
Run "C:\Program Files (x86)\Steam\Steam.exe" "-tenfoot"
Return
^+!2::
Run "C:\Windows\explorer.exe" "shell:appsFolder\EF712BA7.HDHomeRunDVR_23nna27hyxhag!App"
Return
^+!3::
Run "C:\Program Files (x86)\Plex Home Theater\Plex Home Theater.exe"
<html>
<head>
<style type="text/css">
body {
background-color: black;
}
span {
font-family: Arial, Helvetica, sans-serif;
@cohoe
cohoe / ansibled.md
Last active December 1, 2017 23:21
Ansible daemon to replace Func

Host Setup

sshd_config:

TrustedUserCAKeys /path/to/ca.pub
AuthorizedPrincipalsFile .ssh/auth_users
PasswordAuthentication no
PidFile /var/run/ansibled.pid
SyslogFacility LOCAL
Port 7022
rtmp://23.108.62.4:1935/flash4/rithockeyvideo
https://o6.stretchinternet.com/loadbalancer
rtmp://o8.stretchinternet.com:1935/flash4/rithockeyvideo
rtmp://o8.stretchinternet.com:1935/flash4/ritwhockeyvideo