Skip to content

Instantly share code, notes, and snippets.

Gene Wood gene1wood

Block or report user

Report or block gene1wood

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
gene1wood / SEP315.pdf
Last active Jun 13, 2019
SEP315 Slide Deck
View SEP315.pdf
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
gene1wood /
Created Jun 6, 2019
Summary of the forks of the J2M "Convert from JIRA text formatting to GitHub Flavored MarkDown and back again" project
gene1wood /
Created May 16, 2019
Python dict object which persists its contents to disk with every change, either in JSON or YAML
import collections, json
class PersistedJSONDict(collections.MutableMapping):
def __init__(self, filename, *args, **kwargs):
self.filename = filename = dict()
self.update(dict(*args, **kwargs))
def __setitem__(self, key, value):[key] = value
gene1wood /
Created May 8, 2019
All supported AWS Elastic Load Balancer (ELB)
aws elb describe-load-balancer-policies --query "PolicyDescriptions[?PolicyName=='ELBSample-ELBDefaultCipherPolicy'].PolicyAttributeDescriptions[*].AttributeName[]"
View gist:f0f827cd72dde3ec7a83abd16ef51d97
from authlib.flask.client import OAuth
if os.getenv("NO_AUTH", "False") == "False":
AUTH0_CLIENT_ID = env.get(constants.AUTH0_CLIENT_ID)
AUTH0_DOMAIN = env.get(constants.AUTH0_DOMAIN)
AUTH0_BASE_URL = "https://" + AUTH0_DOMAIN
AUTH0_AUDIENCE = env.get(constants.AUTH0_AUDIENCE)
if AUTH0_AUDIENCE is "":
gene1wood / Makefile
Last active Apr 8, 2019
make example Makefile showing the order that targets are resolved
View Makefile
foraker: elbert rainier
@echo "foraker"
@echo "elbert"
rainier: blanca
@echo "rainier"
gene1wood /
Last active Jan 31, 2019
How to get BitWarden to differentiate between consumer retail logins, AWS root logins and AWS IAM user logins

Here's how to get BitWarden to treat these three different types of Amazon logins as separate

  • consumer retail business login
  • AWS root user login (AWS logins that use an email address)
  • AWS IAM user login (AWS logins that use a username) consumer retail

  • Set URI 1 to Exact with a value of


How to un-commit the last un-pushed git commit and move those changes to the index

git reset HEAD~1 --soft

or in SmartGit : Shift-Cntrl-K or Local... Undo Last Commit

How to ammend to a previous commit which is not the most recent

  • Stash any uncomitted changes : Cntrl-S... Stash All
  • In SmartGit find the commit you want to ammend to and right click... Modify/Split...
gene1wood /
Last active Jan 16, 2019
Trying to get sleep / suspend to work in Ubuntu 18.04 on my Dell New XPS 15 9570

Here are some steps I tried which didn't end up working related to nouveau

  1. Install the Nvidia drivers if they're not already
    • sudo ubuntu-drivers autoinstall
  2. Disable the nvidia-fallback service to prevent it from loading nouveau
    • sudo systemctl disable nvidia-fallback.service
  3. Edit /etc/default/grub and added the following line to block nouveau
    • GRUB_CMDLINE_LINUX="nouveau.blacklist=1"
  4. Update grub with the change you just made
    • sudo update-grub
gene1wood / cloudformation-force-failure-if-mapping-still-set-to-default.yml
Created Jan 11, 2019
AWS CloudFormation template that checks if a mapping value is still set to the default/example value, and if so, forces stack creation to fail
View cloudformation-force-failure-if-mapping-still-set-to-default.yml
AWSTemplateFormatVersion: 2010-09-09
Description: Example ensuring mapping isn't set to it's default
# Make sure to set AnExampleVariable before launching this stack
AnExampleVariable: arn:aws:iam::123456789012:root
VariablesNotSet: !Equals [ !FindInMap [ Variables, AnExampleKey, AnExampleVariable ] , 'arn:aws:iam::123456789012:root' ]
You can’t perform that action at this time.