View gist:a1fd9d26f8ad46b51adf9513f67b95f2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' | |
wget https://github.com/mozilla/geckodriver/releases/download/$GECKO_DRIVER_VERSION/geckodriver-$GECKO_DRIVER_VERSION-linux64.tar.gz | |
tar -xvzf geckodriver-$GECKO_DRIVER_VERSION-linux64.tar.gz |
View test.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body { | |
color: blue; | |
} |
View cheatsheet.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
View install-balena-cli.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Trevor Sullivan <trevor@trevorsullivan.net> | |
export VERSION='v9.12.0' | |
export FILENAME="balena-cli-$VERSION-linux-x64" | |
export URL="https://github.com/balena-io/balena-cli/releases/download/$VERSION/$FILENAME.zip" | |
sudo apt update | |
sudo apt install httpie unzip --yes | |
cd $HOME |
View gist:c4c48ed7589b3f6ffa2a8e5c05f9c429
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Author: Trevor Sullivan <trevor@trevorsullivan.net> | |
# Install pip3 package manager for Python 3.x | |
sudo apt install python3-pip --yes | |
# Upgrade pip3 | |
sudo -H pip3 install --upgrade pip |
View gist:3842663d784f97c767d6ce57c1b2e41e
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Trevor Sullivan | |
# trevor@trevorsullivan.net | |
# 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. |
View install_go_pi.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd $HOME | |
FileName='go1.13.4.linux-armv6l.tar.gz' | |
wget https://dl.google.com/go/$FileName | |
sudo tar -C /usr/local -xvf $FileName | |
cat >> ~/.bashrc << 'EOF' | |
export GOPATH=$HOME/go | |
export PATH=/usr/local/go/bin:$PATH:$GOPATH/bin | |
EOF | |
source ~/.bashrc |
View AWSStepFunctions-UserOnboarding.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"StartAt": "HelloWorld", | |
"States": { | |
"HelloWorld": { | |
"Type": "Pass", | |
"Result": "Hello World!", | |
"Next": "ITSupport" | |
}, | |
"ITSupport": { | |
"Type": "Parallel", |
View Car Manufacturers.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
"Abarth", | |
"Alfa Romeo", | |
"Aston Martin", | |
"Audi", | |
"Bentley", | |
"BMW", | |
"Bugatti", | |
"Cadillac", | |
"Chevrolet", |
View Update-AWSPowerShell-Module.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
.Description | |
This PowerShell script will create and register a new launchd job that keeps the AWSPowerShell.NetCore module | |
up-to-date on your MacOS system. | |
If you receive an error upon registration, it's probably just because the service doesn't already exist. | |
This script tries to unload and reload the service, whether or not it exists, hence the error on initial run. | |
#> | |
$PListFile = @' |