Skip to content

Instantly share code, notes, and snippets.


Trevor Sullivan pcgeek86

View GitHub Profile
pcgeek86 /
Last active May 12, 2022 12:07
Convert an animated .webp file to GIF with Python
#!/usr/bin/env python3
# Trevor Sullivan <>
# IMPORTANT: Install the webp Python package, using the following command:
# pip3 install --user webp
# Import the webp package
pcgeek86 / workspaces.ps1
Created January 19, 2020 21:48
Create VPC, AWS Directory Service, and Amazon WorkSpace, using AWS PowerShell module
View workspaces.ps1
$ErrorActionPreference = 'Stop'
Install-Module -Name AWS.Tools.DirectoryService, AWS.Tools.EC2, AWS.Tools.WorkSpaces -Scope CurrentUser -Force
$VPC = New-EC2Vpc -CidrBlock
pcgeek86 / powershell-ansi-color.ps1
Created September 14, 2019 22:06
Apply 24-bit colors to your text using PowerShell and ANSI escape sequences
View powershell-ansi-color.ps1
while ($true) {
$Red = Get-Random -SetSeed (Get-Date).Ticks.ToString().Substring(10,8) -Maximum 255
$Green = Get-Random -SetSeed (Get-Date).Ticks.ToString().Substring(10,8) -Maximum 255
$Blue = Get-Random -SetSeed (Get-Date).Ticks.ToString().Substring(10,8) -Maximum 255
Write-Host -Object ("$([char]27)[38;2;{0};{1};{2}mtrevor" -f $Red, $Green, $Blue)
pcgeek86 / gist:a1fd9d26f8ad46b51adf9513f67b95f2
Last active March 4, 2023 20:54
Install & test Selenium with Firefox / Gecko driver on headless Ubuntu 18.04 LTS server
View gist:a1fd9d26f8ad46b51adf9513f67b95f2
sudo apt update
sudo apt install firefox python3-pip xvfb x11-utils --yes
sudo -H pip3 install bpython selenium
export DISPLAY=:2
Xvfb $DISPLAY -ac &
export GECKO_DRIVER_VERSION='v0.24.0'
tar -xvzf geckodriver-$GECKO_DRIVER_VERSION-linux64.tar.gz
View test.css
body {
color: blue;
pcgeek86 / cheatsheet.ps1
Last active May 22, 2023 12:37
PowerShell Cheat Sheet / Quick Reference
View cheatsheet.ps1
Get-Command # Retrieves a list of all the commands available to PowerShell
# (native binaries in $env:PATH + cmdlets / functions from PowerShell modules)
Get-Command -Module Microsoft* # Retrieves a list of all the PowerShell commands exported from modules named Microsoft*
Get-Command -Name *item # Retrieves a list of all commands (native binaries + PowerShell commands) ending in "item"
Get-Help # Get all help topics
Get-Help -Name about_Variables # Get help for a specific about_* topic (aka. man page)
Get-Help -Name Get-Command # Get help for a specific PowerShell function
Get-Help -Name Get-Command -Parameter Module # Get help for a specific parameter on a specific command
pcgeek86 /
Last active October 17, 2021 22:16
Install Balena CLI on Debian / Ubuntu
# Trevor Sullivan <>
export VERSION='v9.12.0'
export FILENAME="balena-cli-$VERSION-linux-x64"
export URL="$VERSION/$"
sudo apt update
sudo apt install httpie unzip --yes
cd $HOME
pcgeek86 / gist:c4c48ed7589b3f6ffa2a8e5c05f9c429
Last active April 7, 2021 02:16
Setup Chromebook - Crostini
View gist:c4c48ed7589b3f6ffa2a8e5c05f9c429
# Author: Trevor Sullivan <>
# Install pip3 package manager for Python 3.x
sudo apt install python3-pip --yes
# Upgrade pip3
sudo -H pip3 install --upgrade pip
pcgeek86 / gist:3842663d784f97c767d6ce57c1b2e41e
Last active March 18, 2020 22:44
WIP: Install Ultimaker Cura on ChromeOS v71 with Crostini (Linux apps) container support
View gist:3842663d784f97c767d6ce57c1b2e41e
# Trevor Sullivan
# I want to install Ultimaker Cura on ChromeOS, under the Crostini container environment.
# Cura is distributed officially as the Linux AppImage format, not a Debian package.
# Crostini doesn't support AppImage as of December 2018, due to dependency on FUSE, which isn't supported.
# Crostini is compatible with Debian packages.
# There is an Ubuntu Personal Package Archive (PPA) with Debian packages for Cura.
# However, Crostini starts as a Debian Stretch environment.
# The Cura package is only available for Debian Buster.
pcgeek86 /
Last active January 9, 2023 20:03 — forked from random-robbie/
Install Go Lang on Raspberry Pi
cd $HOME
sudo tar -C /usr/local -xvf $FileName
cat >> ~/.bashrc << 'EOF'
export GOPATH=$HOME/go
export PATH=/usr/local/go/bin:$PATH:$GOPATH/bin
source ~/.bashrc