Skip to content

Instantly share code, notes, and snippets.

Troy Fontaine troyfontaine

Block or report user

Report or block troyfontaine

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@troyfontaine
troyfontaine / remove_gh_package.sh
Created Dec 12, 2019
Bash script to Delete/Remove Private Github Packages
View remove_gh_package.sh
#!/bin/bash
# Really crappy script that works to delete private packages stored on Github Packages
# Intended to simplify deleting packages that are counting against your limit
# By Troy Fontaine (github.com/troyfontaine)
# First displays the private packages name then the version finally the ID needed to delete it
# Then prompts you if you want to delete the packages based on the ID
GITHUB_TOKEN=$SUPERSECRETTOKEN
REPO_OWNER=$YOURGITHUBUSERNAME
@troyfontaine
troyfontaine / Docker-Compose.yml
Created Nov 29, 2019
Pihole Docker Container with IPv6 Support
View Docker-Compose.yml
version: "3"
# More info at https://github.com/pi-hole/docker-pi-hole/ and https://docs.pi-hole.net/
services:
pihole:
container_name: pihole
image: pihole/pihole:latest
ports:
- "53:53/tcp"
- "53:53/udp"
@troyfontaine
troyfontaine / README.md
Last active Dec 12, 2019
How to install OpenSSH on Windows 10 with Publickey auth
View README.md

How to Install OpenSSH on Windows 10 (any version) with Publickey Authentication working

This brief tutorial assumes you already have an SSH public key you want to use

  1. Install chocolatey via Powershell

    Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
    
  2. Close Powershell

  3. Open a new Powershell session

@troyfontaine
troyfontaine / README.md
Last active Mar 24, 2019
Ubuntu 18.04 Raspberry Pi Cloud Init Notes
View README.md

Location of cloud-config

/Volumes/cloudimg-rootfs/var/lib/cloud/seed/nocloud-net/user-data

Networking Issues

Netplan seems to not play nicely with VLANs (or so it would appear), further testing required

Port in use issues if using WireGuard on UDP 53

systemd-resolve issues, solution

@troyfontaine
troyfontaine / README.md
Created Dec 12, 2018
Dell PowerConnect 3500 Series Tips
View README.md

How To

Commands

Firmware Updating while Stacked

Copy from a tftp to a stack master

copy tftp://192.168.0.8/powerconnect_35xx-20066.ros image
@troyfontaine
troyfontaine / README.md
Created Sep 10, 2018
Raspbian Stretch VIM Fix
View README.md

Fix for blasted visual editor mode

Create the following file: /etc/vim/vimrc.local

" This file loads the default vim options at the beginning and prevents
" that they are being loaded again later. All other options that will be set,
" are added, or overwrite the default settings. Add as many options as you
" whish at the end of this file.

" Load the defaults
@troyfontaine
troyfontaine / README.md
Last active Nov 24, 2019
USG ddclient Upgrade Script
View README.md

How to use this script?

Why, that's simple! Copy this script to your USG, run chmod +x on it and then, as a user with sudo permission, execute it.

Shamelessly borrowed from Brittanic on the Ubiquiti Unifi forums

How to use it?

Simply run the following command (note, if you are at all security concious-don't run it and instead review the script, then copy it to your USG to execute).

curl https://gist.githubusercontent.com/troyfontaine/7e6f93e32621177fc9a94e823adc52b5/raw/fix_ddns.sh | sudo bash
@troyfontaine
troyfontaine / create.sh
Last active Feb 6, 2019
Cloudkey SSL Cert with Third-party cert
View create.sh
#!/bin/bash
# Create fullchain
cat ~/cert/*.ca-bundle ~/cert/*.crt >> fullchain.cer
# Generate pkcs12 cert from acme output
openssl pkcs12 -export -in ~/cert/fullchain.cer -inkey \
~/cert/mydomain.key \
-out ~/cert/unifi.p12 -name unifi -password pass:aircontrolenterprise
@troyfontaine
troyfontaine / README.md
Created Jul 1, 2018 — forked from RichardBronosky/README.md
Using cloud-init for cloudless provisioning of Raspberry Pi
View README.md

Installing cloud-init on a fresh Raspbian Lite image

This is a work in Progress!

Purpose

This mainly demonstrates my goal of preparing a Raspberry Pi to be provisioned prior to its first boot. To do this I have chosen to use the same cloud-init that is the standard for provisioning servers at Amazon EC2, Microsoft Azure, OpenStack, etc.

I found this to be quite challenging because there is little information available for using cloud-init without a cloud. So, this project also servers as a demonstration for anyone on any version of Linux who may want to install from source, and/or use without a cloud. If you fall into that later group, you probably just want to read the code. It's bash so everything I do, you could also do at the command line. (Even the for loop.)

@troyfontaine
troyfontaine / README.md
Created Mar 20, 2018
RubyGems Type Error Fix
View README.md

Based on the work by wjordan in this comment

The solution is to force the update of RubyGems to side step the issue.

gem update --force --system 2.6.11

Then the error does not occur.

You can’t perform that action at this time.