Skip to content

Instantly share code, notes, and snippets.

Justin Clark u2mejc

  • San Francisco
Block or report user

Report or block u2mejc

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
@u2mejc
u2mejc / overland_checklist.txt
Created Aug 1, 2018
This is a personal list of things I'll usually be carrying when overlanding
View overland_checklist.txt
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 Jun 22, 2018
How to resize Ubuntu 16.04LTS EBS backed LVM volume live, in two commands!
View Live Resize EBS back LVM Volume.sh
# 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 Jan 13, 2017
Tagging Docker images and deploying with Dokku
View dokku-tags.md

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
View OpsWorks Stack RGB Color Cheat Sheet
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)
View terraform-issue6221.tf
/* 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
View terraform-issue6077.tf
/* 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 Oct 8, 2015
Running Papertrail in Elastic Beanstalk with multiple instances (hosts)
View 03_papertrail_hostname.config
# 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
You can’t perform that action at this time.