Skip to content

Instantly share code, notes, and snippets.

View pcgeek86's full-sized avatar
🍺
🥓

Trevor Sullivan pcgeek86

🍺
🥓
View GitHub Profile
@pcgeek86
pcgeek86 / gist:c4c48ed7589b3f6ffa2a8e5c05f9c429
Last active April 7, 2021 02:16
Setup Chromebook - Crostini
#!/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
@pcgeek86
pcgeek86 / gist:3842663d784f97c767d6ce57c1b2e41e
Last active March 18, 2020 22:44
WIP: Install Ultimaker Cura on ChromeOS v71 with Crostini (Linux apps) container support
# 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.
@pcgeek86
pcgeek86 / install_go_pi.sh
Last active February 24, 2024 19:35 — forked from random-robbie/install_go_pi.sh
Install Go Lang on Raspberry Pi
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
@pcgeek86
pcgeek86 / AWSStepFunctions-UserOnboarding.json
Created October 17, 2018 16:19
Very basic AWS Step Functions example for user on-boarding workflow
{
"StartAt": "HelloWorld",
"States": {
"HelloWorld": {
"Type": "Pass",
"Result": "Hello World!",
"Next": "ITSupport"
},
"ITSupport": {
"Type": "Parallel",
@pcgeek86
pcgeek86 / Car Manufacturers.json
Last active April 1, 2024 04:17
Plain-text list of major car manufacturers
[
"Abarth",
"Alfa Romeo",
"Aston Martin",
"Audi",
"Bentley",
"BMW",
"Bugatti",
"Cadillac",
"Chevrolet",
@pcgeek86
pcgeek86 / Update-AWSPowerShell-Module.ps1
Created December 21, 2017 22:49
Blog: Creates a launchd job that updates the AWS PowerShell .NET Core module on a daily basis.
<#
.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 = @'
###############################################################################
# Author: Trevor Sullivan
#
# Date: October 28, 2009
#
# Lessons learned:
#
# 1. ADSI property names are lower case using DirectorySearcher or DirectoryEntry
# 2. Must explicitly cast 64-bit integers from AD
# 3. The Excel API is terrible (already knew that) #
@pcgeek86
pcgeek86 / Dockerfile
Created October 27, 2017 18:37
Install Python 3.6 and Boto3 package on Windows Server container
FROM microsoft/windowsservercore
MAINTAINER Trevor Sullivan <tsulli@amazon.com>
SHELL ["powershell", "-Command"]
ENV PYTHON_DOWNLOAD https://www.python.org/ftp/python/3.6.3/python-3.6.3-amd64.exe
ENV PYTHON_FILE python-3.6.3-amd64.exe
COPY Install-Boto3.py c:/Amazon/
@pcgeek86
pcgeek86 / existing code to git repo
Created March 23, 2017 15:34 — forked from zenideas/existing code to git repo
Adding existing source to remote git repo
If you've got local source code you want to add to a new remote new git repository without 'cloning' the remote first, do the following (I often do this - you create your remote empty repository in bitbucket/github, then push up your source)
1. Create the remote repository, and get the URL such as git://github.com/youruser/somename.git
2. If your local GIT repo is already set up, skips steps 2 and 3
3. Locally, at the root directory of your source, git init
4. Locally, add and commit what you want in your initial repo (for everything,
git add .
@pcgeek86
pcgeek86 / ClusterHQ-FlockerHub-Demo.sh
Last active November 28, 2016 16:41
This Bash script is a simple end-to-end example of ClusterHQ Fli + FlockerHub.
#!/bin/bash
### Visit http://ui.dev.voluminous.io/user-tokens to get a user token
### NOTE: This file should contain a function definition called 'fli'
source ~/.bash-fli
set -e
shopt -s expand_aliases