Skip to content

Instantly share code, notes, and snippets.

View troyfontaine's full-sized avatar

Troy Fontaine troyfontaine

View GitHub Profile
@troyfontaine
troyfontaine / excerpt.conf
Created November 22, 2017 06:03
HAProxy Security Headers (1.6+)
# Sampling of security headers
http-response set-header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"
http-response set-header X-Frame-Options SAMEORIGIN
http-response set-header X-XSS-Protection "1; mode=block"
http-response set-header Referrer-Policy no-referrer-when-downgrade
@troyfontaine
troyfontaine / README.md
Created September 10, 2018 05:52
Raspbian Stretch VIM Fix

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 October 5, 2018 19:21
ACMESharp Cloudflare Script Steps Outline

How to Manually Generate a Certificate using ACMESharp and CloudFlare DNS Integration

Install ACMESharp as per here.

Follow the installation steps from the getting started guide before using the instructions below.

Install Cloudflare Module

Run the following command to install the module:

Install-Module ACMESharp.Providers.CloudFlare
@troyfontaine
troyfontaine / README.md
Created December 12, 2018 06:31
Dell PowerConnect 3500 Series Tips

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
Last active March 24, 2019 19:43
Ubuntu 18.04 Raspberry Pi Cloud Init Notes

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
Last active December 31, 2019 17:24
CFSSL Links to hang onto
@troyfontaine
troyfontaine / certfix.sh
Created January 5, 2020 06:14
Hackish Certbot HAProxy Script
#!/bin/bash
# This is intended to work with https://github.com/greenhost/certbot-haproxy
DOMAIN="my.supercool.domain" # Replace this with your actual domain that certbot will be using
# Force renewal of certificate
certbot renew --force-renewal
# Sleep for authorization to complete
@troyfontaine
troyfontaine / README.md
Created February 23, 2020 23:44
How to stop Windows 10 Continuous Prompts to Associate a Viewer for PDF files

How to stop Windows 10 Continuous Prompts to associate a Viewer for PDF Files

If Windows 10 keeps prompting you to associate an application to view PDF files when you double click to open them, try deleting the following registry keys and rebooting. This worked for me.

  1. Open regedit as an administrator
  2. Navigate to Computer\HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.pdf and delete the .pdf key
  3. Navigate to Computer\HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\FileAssociations\ProgIds and delete the REG_DWORD called _.pdf
  4. Reboot

This reset the default to Microsoft Edge and then allowed me to change the default to Adobe Reader.

@troyfontaine
troyfontaine / README.md
Last active March 7, 2020 18:32
Intel Graphics 5th Gen Windows 10 Driver Disabled Fix

Intel Graphics 5th Gen Windows 10 Driver Disabled Fix

Windows 10 will disable the Intel(R) HD Graphics 5500 or similar GPU drivers if Hypervisor Code Integrity (HVCI) is enabled. HVCI appears to be enabled as part of Hyper-V. This affects laptops from all vendors as far as I can tell.

To disable HVCI,the registry entries outlined by Microsoft do not appear to work.

Microsoft does however provide a PowerShell script which does work.

  1. Download the script from the link above
  2. Extract the script
@troyfontaine
troyfontaine / rbenv.sh
Last active May 11, 2020 17:22
Pipeline Script to install rbenv, rbenv gemset and ruby-build
#!/bin/bash
# Bash script to check if rbenv is installed along with a few necessities and if they don't exist
# to install them
TEST_RUBY_VERSION="2.6.3"
install_rbenv() {
echo "--- :construction: Installing Rbenv"
# Clone rbenv from Github
git clone https://github.com/rbenv/rbenv.git "$HOME/.rbenv" > /dev/null 2>&1