Skip to content

Instantly share code, notes, and snippets.

View hxtree's full-sized avatar

Matthew Heroux hxtree

View GitHub Profile
@hxtree
hxtree / bouncing-boxes.html
Created February 9, 2024 15:37
getBoundingClientRect
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Bouncing Boxes</title>
<style>
.box {
width: 50px;
height: 50px;
@hxtree
hxtree / README.md
Last active February 10, 2023 04:16
Install Firefox Ubuntu

Installing Firefox on Ubuntu Snap prevents use of some KeePassXC intergration. To use tools like KeePassXC download the latest and create a desktop icon.

Notable Extensions: KeePassXC DarkReader

@hxtree
hxtree / three-rules-of-three.md
Created December 12, 2022 18:04
Three Rules of Three

"Three Rules of Three":

  1. It is three times as difficult to build reusable components as single use components, and
  2. A reusable component should be tried out in three different applications before it will be sufficiently general to accept into a reuse library.
  3. Two instances of similar code do not require refactoring, but when similar code is used three times, it should be extracted into a new procedure.

References:

@hxtree
hxtree / gist:219f61cc1f3db40b120e15cf6658d704
Created December 12, 2022 00:03
Install Docker and Docker Compose Ubuntu 2022
# install docker via apt source
sudo apt update
sudo apt install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt update
apt-cache policy docker-ce
sudo systemctl status docker
sudo usermod -aG docker ${USER}
@hxtree
hxtree / README.md
Last active October 31, 2022 19:00
SED replace recursively in all files named
find . -type f -name 'package.json' -exec sed -i "s/before/after/" {} +
@hxtree
hxtree / dev-browser-extensions.md
Created July 25, 2022 19:39
Dev Browser Extensions
@hxtree
hxtree / windows-terminal-install-without-windows-store.md
Last active July 19, 2022 01:31
Windows Terminal Install w/o Windows Store

How to install Windows Terminal Without Windows Store

Some AD policies may prohibit use and installation of the Windows Store. This is troublesome for installing the Windows Terminal, which is helpful for using multi command prompt tabs.

  1. Download Winget CLI Check for the latest applicable release of Winget CLI https://github.com/microsoft/winget-cli

Open a Powershell terminal in Admin Mode.

Invoke-WebRequest -Uri "https://github.com/microsoft/winget-cli/releases/download/v1.2.10271/Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle" -OutFile "winget.msixbundle"
@hxtree
hxtree / aws-vpn-tap-issue.md
Created April 21, 2022 15:34
AWS VPN TAP issue

On Windows 10 an error was encounted where the AWS VPN Client did not install TAP adaptor on some PC with COMODO installed.

Download and install:

swupdate.openvpn.net/community/releases/tap-windows-9.21.2.exe

(More TAP Windows releases are located at http://build.openvpn.net/downloads/releases/)

Download and install AWS VPN Client

@hxtree
hxtree / patterns.md
Last active July 19, 2022 00:38
Misc design patterns
@hxtree
hxtree / git-add-executable
Created April 13, 2022 00:26
Git add file as executable
git add .
git update-index --chmod=+x <your file>
git commit -m 'Added execute permissions'
git push main