Skip to content

Instantly share code, notes, and snippets.

View cjerrington's full-sized avatar

Clayton Errington cjerrington

View GitHub Profile
@cjerrington
cjerrington / install-jekyll.sh
Last active May 6, 2022 03:15
Simple way to install Jekyll on your Ubuntu based distro
#!/bin/bash
# Check if script is run as sudo/root
if [[ $EUID -ne 0 ]]; then
# https://www.linuxjournal.com/content/automatically-re-start-script-root-0
sudo -p 'Restarting as root, password: ' bash $0 "$@"
exit $?
#echo "Please rerun script with 'sudo ./serversetup.sh'"
#exit 1
fi
@cjerrington
cjerrington / jellyfin-update.ps1
Created December 26, 2022 16:20
Jellyfin update check
# Setup of variables:
# Update server and port to your local values
$server = "localhost"
$port = 8096
$myinstall = (Invoke-WebRequest -UseBasicParsing http://$($server):$port/System/Info/Public).Content | ConvertFrom-Json
$latest = (Invoke-WebRequest -UseBasicParsing https://api.github.com/repos/jellyfin/jellyfin/releases/latest) | ConvertFrom-Json
if ( $myinstall.Version -eq $latest.name){
@cjerrington
cjerrington / openpgp.md
Created January 15, 2023 04:52
Verifying keyoxide

[Verifying my keyoxide cryptographic key: openpgp4fpr:22A87774A7342FE3DF25E15D08528E69B3B9CA3E]

@cjerrington
cjerrington / Keybase.md
Created September 17, 2023 03:56
Keybase claim

Keybase proof

I hereby claim:

  • I am cjerrington on github.
  • I am cjerrington (https://keybase.io/cjerrington) on keybase.
  • I have a public key ASCmzLyC__Ic3zd1WreR5woBrzm9zoTA6G4uoF8y3PbnKgo

To claim this, I am signing this object:

@cjerrington
cjerrington / ConsoleView.ps1
Created January 31, 2024 02:44
Powershell function to show/hide the console window. I’ve used this format to start a process of a powershell GUI and hid the console after load. Can then be used to toggle the console as well.
function Show-Console
{
param ([Switch]$Show,[Switch]$Hide)
if (-not ("Console.Window" -as [type])) {
Add-Type -Name Window -Namespace Console -MemberDefinition '
[DllImport("Kernel32.dll")]
public static extern IntPtr GetConsoleWindow();
[DllImport("user32.dll")]