Skip to content

Instantly share code, notes, and snippets.

{
"basics": {
"name": "Matthew Green",
"label": "Software Engineer",
"image": "https://avatars.githubusercontent.com/u/2933673?v=4",
"email": "[email protected]",
"phone": "(713) 487-8609",
"url": "https://mattgreen.dev",
"summary": "Matthew is an experienced software developer with a strong background in building modern applications and adding new user-facing features to existing software. He has over eight years of professional experience writing in the Perl programming language and strong experience in Python and Go. With expertise in scalable containerized deployments, core internet technologies, asynchronous client-server architectures, and contemporary software development practices, he has successfully deployed and iterated on systems relied on by millions of customers for their web presence. As a technologist, Matthew is committed to staying at the forefront of technology and utilizing innovative solutions to tackle complex challenges. His consistent exploration and rese
@mattsizzle
mattsizzle / iommu-info.sh
Created October 5, 2021 21:06
IOMMU Support and Grouping Script
#!/bin/bash
shopt -s nullglob
echo -e "Checking for kernel support for IOMMU"
dmesg | grep -e DMAR -e IOMMU
dmesg | grep 'remapping'
for g in `find /sys/kernel/iommu_groups/* -maxdepth 0 -type d | sort -V`; do
echo "IOMMU Group ${g##*/}:"
@mattsizzle
mattsizzle / powerline_configuration.md
Last active February 2, 2023 11:49
Powerline Configuration (Debian 11 optionally with GIT support)

Powerline Configuration (Debian/Ubuntu/PopOS optionally with GIT support)

Powerline

Powerline is a statusline plugin for vim, and provides status lines and prompts for several other applications, including zsh, bash, fish, tmux, IPython, Awesome, i3, and Qtile.

In other words, it is a very powerful and very cool piece of software, and I use it in some capacity on all my servers. It can be installed a few ways with binaries available in most distro's main repositories and many derivatives available. I prefer the Python userspace installation method outlined below as it lends itself to portability and works better with my virtualization practices.

Notes

@mattsizzle
mattsizzle / python-bootstrap-guide.md
Last active March 6, 2020 21:39
How to Bootstrap Modern Python Application

Bootstrap Modern Python Application

Install Dependencies

The following guides will help you get Python and Pip

Install Python

This is a great overview of Pipenv and Virtual Environments

@mattsizzle
mattsizzle / PostGres Docker Quick Start
Created February 13, 2020 19:04
Quick and Easy PostGres SQL DB in Docker environment with optional DB restore file.
Quick and Easy PostGres SQL DB in Docker environment for learning or experimenting.
Grab Docker Image
# docker pull postgres
Create Docker container with PHP database management UI Adminer via Docker Compose
Create `compose.yml`
version: '3.1'
@mattsizzle
mattsizzle / nginx.conf
Created July 22, 2017 00:02
Nginx Conf w/ Proxying to a Different Resolver
user www-data;
worker_processes 4;
pid /run/nginx.pid;
events {
worker_connections 768;
# multi_accept on;
}
http {
[Unit]
Description=Sonarr Daemon
After=syslog.target network.target
[Service]
User=miner
Group=miner
Type=simple
ExecStart=/usr/bin/mono /opt/NzbDrone/NzbDrone.exe -nobrowser
TimeoutStopSec=20
@mattsizzle
mattsizzle / ko.utils.3.3.0.signatures.js
Last active August 28, 2015 16:38 — forked from hyle/ko.utils.3.3.0.signatures.js
KnockoutJS 3.3.0 utils (ko.utils) signatures
// knockout 3.3.0
ko.utils.addOrRemoveItem = function (array, value, included) { /* .. */ }
ko.utils.anyDomNodeIsAttachedToDocument = function (nodes) { /* .. */ }
ko.utils.arrayFilter = function (array, predicate) { /* .. */ }
ko.utils.arrayFirst = function (array, predicate, predicateOwner) { /* .. */ }
@mattsizzle
mattsizzle / numericObservable
Last active March 6, 2020 21:37
KnockoutJS - Custom Observables
ko.numericObservable = function(initialValue) {
var _actual = ko.observable(initialValue);
var result = ko.dependentObservable({
read: function() {
return _actual();
},
write: function(newValue) {
var parsedValue = parseFloat(newValue);
_actual(isNaN(parsedValue) ? newValue : parsedValue);
}