Skip to content

Instantly share code, notes, and snippets.

View u2mejc's full-sized avatar

Justin Clark u2mejc

View GitHub Profile
@u2mejc
u2mejc / ntlmdecoder.py
Created February 28, 2023 22:25 — forked from aseering/ntlmdecoder.py
NTLM auth-string decoder
#!/usr/bin/env python
## Decodes NTLM "Authenticate" HTTP-Header blobs.
## Reads the raw blob from stdin; prints out the contained metadata.
## Supports (auto-detects) Type 1, Type 2, and Type 3 messages.
## Based on the excellent protocol description from:
## <http://davenport.sourceforge.net/ntlm.html>
## with additional detail subsequently added from the official protocol spec:
## <http://msdn.microsoft.com/en-us/library/cc236621.aspx>
##
@u2mejc
u2mejc / chromium-spacing.md
Created February 25, 2022 17:24
Fix Chromium White Space Bug

Issue

  • When running Kubuntu with Chromium installed via snap, I noticed that text
    white spacing was very wide.
  • This will cause website to render wrong, clipping text off page, moving other DOM objects, and generally being hard to read.

Observations:

  • Chrominum fonts settings show it's set to "Custom" fonts
  • TrueType fonts (Times New Roman, etc) appear to be missing
@u2mejc
u2mejc / overland_checklist.txt
Created August 1, 2018 19:10
This is a personal list of things I'll usually be carrying when overlanding
This is my permanent list of things to carry during complete isolation on
trails like the Rubicon. Places like Pismo and OHV parks; I usually pack
lighter since it's easier to get to the road and onto a tow truck, compared to
when I'm in isolation.
I've relied on the bare essentials in the past but it's obvious that I need to
carry more now that I'm driving further off road. So to that extent I'm buying
more tools so I don't have to keep moving mine back and forth from my garage.
### Tools for toolbox / bag ###
@u2mejc
u2mejc / Live Resize EBS back LVM Volume.sh
Last active June 22, 2018 23:04
How to resize Ubuntu 16.04LTS EBS backed LVM volume live, in two commands!
# Check the usually suspects before you resize
df -h # Show file systems and their current space
lsblk # show block devices and file systems (do this again after resizing the EBS volume)
sudo pvscan # show physical drives
sudo lvscan # show logical volumes
# Now after you have resized the EBS volumes (you can do this in the console or CLI), the two magic commands:
sudo pvresize </dev/DEVICE> # Resize physical volume(s)
sudo lvextend -r -l +100%FREE <LogicalVolume[Path]>
@u2mejc
u2mejc / dokku-tags.md
Last active January 13, 2017 23:17
Tagging Docker images and deploying with Dokku

Deploying Tags in Dokku

Dokku is an tiny open source PAAS. Pulling and tagging existing images isn't a directly supported feature inside Dokku, so you must use Docker to first pull a tag the image.

  • Use Docker to login to Docker Hub if the repo isn't public
$ sudo docker -u <dockerhub_username>

Note: -p is only used when passing the password in line

  • Pull the image from Docker Hub
OpsWorks stack RGB color value reference, with closest possible english names that I could think of.
For use in CLI or other non GUI tools like Terraform.
Cosmic Purple : rgb(135, 61, 98)
Purple: rgb(111, 86, 163)
Blue: rgb(45, 114, 184)
Teal: rgb(38, 146, 168)
Green: rgb(57, 131, 94)
Olive Drab: rgb(100, 131, 57)
Mustard yellow (golden): rgb(184, 133, 46)
/* Terraform template to reproduce OpsWorks Stack bug
Reproduce:
- copy this file to empty dir and cd into dir
$ terrafrom -version
Terraform v0.6.14
$ terrafrom apply
/* Terraform template to reproduce OpsWorks Stack bug
Reproduce:
- copy this file to empty dir and cd into dir
$ terrafrom -version
Terraform v0.6.14
$ terrafrom apply
@u2mejc
u2mejc / 03_papertrail_hostname.config
Created October 8, 2015 18:15
Running Papertrail in Elastic Beanstalk with multiple instances (hosts)
# Add an Environment Property of PAPERTRAIL_HOSTNAME and set the value to nextkillerapp-$HOSTNAME
container_commands:
pt_hostname:
command: "eval export PAPERTRAIL_HOSTNAME=$PAPERTRAIL_HOSTNAME && sed -i \"s/.*hostname:.*/hostname: $PAPERTRAIL_HOSTNAME/\" /etc/log_files.yml"
test: test -e /etc/log_files.yml
ignoreErrors: false