Skip to content

Instantly share code, notes, and snippets.


Gene Wood gene1wood

View GitHub Profile
gene1wood /
Last active Sep 21, 2021
Python relative imports in AWS Lambda fail with `attempted relative import with no known parent package`

Python relative imports in AWS Lambda fail with attempted relative import with no known parent package

The Problem

In AWS Lambda if I attempt an explicit relative import like this

gene1wood /
Last active Sep 18, 2021
Simple ngrok + flask app to show a JSON payload. Intended as a GitHub webhook web endpoint for testing.

Simple ngrok + flask app to show a JSON payload. Intended as a GitHub webhook web endpoint for testing.

gene1wood /
Created Sep 17, 2021
Here's a thread I've started with the Mozilla GitHub owners to try to agree on a standard for how maintainers assert their role

With the recent Travis CI security issue, it's again become necessary for Mozilla security folks to need to be able to contact maintainers of our GitHub repos (in this case to coordinate rotation of leaked credentials). I wanted to see if we (GitHub owners) could come up with a standard (either an existing one or make one) for how people can assert and communicate their role as a maintainer of a given GitHub repo. I don't know if an email thread is the best channel, but I thought I'd start this and we could switch to a zoom call if folks want. Here are some potential solutions that have come to mind

This standard ( ) is so repo maintainers can assert how to report security vulnerabilities.

  • It's public so maintainers might be reluctant to put email addresses in there
gene1wood /
Last active Sep 12, 2021
Duplicacy GitHub issues disabled earlier this year

It looks like GitHub issues were disabled on the Duplicacy GitHub repo sometime between April and July this year (2021). I noticed this while checking back on a bug to see if I still needed to continue to use a workaround or if it had been fixed.

I searched through the repo README, on the website and here in the forums but don't see any mention of the disabling of issues, or where one is meant to report or track bugs now.

Gilbert, if the intent is to prevent opening new issues (I'm guessing here, but as a maintainer of open source software I'm familiar with the challenges of getting low quality issues), would it be possible to, instead of disabling GitHub issues, re-enable GitHub issues and instead create a [6 month interac

gene1wood / batch-delete-gmail-emails.js
Last active Sep 11, 2021
A Google Apps Script script to bulk delete large amounts of email in Gmail while avoiding the error #793 which Gmail encounters normally
View batch-delete-gmail-emails.js
This script, when used with Google Apps Scripts will delete 400 emails and
can be triggered to run every few minutes without user interaction enabling you
to bulk delete email in Gmail without getting the #793 error from Gmail.
Google returns a maximum of 500 threads. This limits to 400 threads in case 500
threads is causing timeouts
Configure the search query in the code below to match the type of emails
you want to delete
gene1wood /
Last active Sep 9, 2021
My process for creating a new python package
├── my_module_name
│   └──
├── LICENSE.txt
├── README.rst
├── requirements.txt
  • Create a Python package name which is ideally all lower case with no dashes but may contain dashes (but not underscores)
gene1wood /
Last active Sep 7, 2021
Parse an AWS ARN (Amazon Resource Name) into it's constituent elements
def parse_arn(arn):
elements = arn.split(':')
result = {'arn': elements[0],
'partition': elements[1],
'service': elements[2],
'region': elements[3],
'account': elements[4]
if len(elements) == 7:
gene1wood / launch.jnlp
Created Feb 6, 2015
How to modify the SuperMicro IPMI Remote Console java applet to use a port other than 443
View launch.jnlp
<jnlp spec="1.0+" codebase="https://localhost:8443/">
<title>ATEN Java iKVM Viewer</title>
<description>Java Web Start Application</description>
gene1wood /
Last active Aug 31, 2021
Explanation of the relationship between python logging root logger and other loggers

Explanation of the relationship between python logging root logger and other loggers