Skip to content

Instantly share code, notes, and snippets.

View rhymeswithmogul's full-sized avatar

Colin Cogle rhymeswithmogul

View GitHub Profile
@rhymeswithmogul
rhymeswithmogul / Find-SSDTimeBombs.ps1
Last active May 12, 2021 13:12
Check your HPE SSD's for the 32,768-hour time bomb and the 40,000-hour time bomb.
<#
.NOTES
Find-SSDTimeBombs.ps1, version 1.0.1
Copyright (c) 2020 Colin Cogle <colin@colincogle.name>.
This program is free software: you can redistribute it and/or modify it under
the terms of the GNU Affero General Public License as published by the Free
Software Foundation, either version 3 of the License, or (at your option) any
later version.
@rhymeswithmogul
rhymeswithmogul / New-GitLabRelease.ps1
Created November 7, 2019 23:33
Make a new release in GitLab until they add this as a sorely-needed point-and-click feature
#Requires -Version 3.0
#for Invoke-WebRequest
###
### FILL OUT THESE FIELDS
###
# You will need the following three pieces of information.
$GitLabServerAndPort = "gitlab.tailspintoys.com:4443" # the colon and port number can be omitted if it's 443
$APIAccessToken = "foo" # you can generate an API token in settings.
$ProjectID = "123" # the number shown on the project home page.
@rhymeswithmogul
rhymeswithmogul / DisableAutoclose.sql
Created November 7, 2019 23:27
Disable auto-close on all MSSQL databases in an instance (useful for backup software)
--You will get errors about master and tempdb; this is normal.
EXEC sp_MSforeachdb 'ALTER DATABASE [?] SET AUTO_CLOSE OFF WITH NO WAIT'
@rhymeswithmogul
rhymeswithmogul / Remove-TeamViewerRemotely.ps1
Created November 7, 2019 23:26
Remove TeamViewer remotely
<#
Remove-TeamViewerRemotely.ps1, version 1.0
-- a quick and dirty script that I wish weren't needed, but here we are.
by Colin Cogle <colin@colincogle.name>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
@rhymeswithmogul
rhymeswithmogul / renew-unifi-cert.sh
Last active July 29, 2021 15:58
Get a valid certificate for the UniFi Controller
#!/bin/sh
#########################################################################
# renew-unifi-cert.sh (Version 1.1, 2019-11-21)
# Copyright © 2019 Colin Cogle <colin@colincogle.name>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
@rhymeswithmogul
rhymeswithmogul / Replace-RDGatewayCertificate.ps1
Last active February 24, 2021 19:26
A post-renewal script for Certify that replaces the Remote Desktop Gateway certificate.
<#
Replace-RDGatewayCertificate.ps1
Version 1.0.1 -- fixed my bad grammar
by Colin Cogle <colin@colincogle.name>
This program is free software: you can redistribute it and/or modify it under the terms
of the GNU General Public License as published by the Free Software Foundation, either
version 3 of the License. This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

Keybase proof

I hereby claim:

  • I am rhymeswithmogul on github.
  • I am colincogle (https://keybase.io/colincogle) on keybase.
  • I have a public key ASDUaCWlNbx_lWy9wLPTUWZfv2Dgj2cdrrCT8RCJEDe0OAo

To claim this, I am signing this object: