Skip to content

Instantly share code, notes, and snippets.


Gene Wood gene1wood

View GitHub Profile
gene1wood /
Created Sep 8, 2020
How to configre ngrok and flask to redirect to https
gene1wood / example-aws-api-gateway-lambda-proxy-mode-event.json
Created Jul 30, 2020
Example Lambda event from API Gateway in Proxy mode
View example-aws-api-gateway-lambda-proxy-mode-event.json
"resource": "/{proxy+}",
"path": "/post",
"httpMethod": "POST",
"headers": {
"accept": "*/*",
"Authorization": "Bearer REDACTED",
"content-type": "application/x-www-form-urlencoded",
"Host": "",
"User-Agent": "curl/7.58.0",
gene1wood /
Last active Jul 30, 2020
A 2015 script to apply the old cipersuite settings to AWS ELBs
#!/usr/bin/env python
# Apply recommendation from
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at
# Contributors:
# Gene Wood [:gene]
gene1wood /
Created Jul 20, 2020
Small script to get users from CIS
export person_api_client_id=xxx
export person_api_client_secret=xxx
if [ -z "$person_api_bearer_token" ]; then
echo "Fetching bearer token"
export person_api_bearer_token=$(curl --silent --request POST --url --header "Content-Type: application/json" --data "{\"client_id\":\"${person_api_client_id}\",\"client_secret\":\"${person_api_client_secret}\",\"audience\":\"\",\"grant_type\":\"client_credentials\"}" | jq -r '.access_token')
function url_quote {
echo $1 | python3 -c "import urllib.parse; print(urllib.parse.quote(input()))"
function get_auth0_user {
gene1wood / disable-native-login.php
Last active Jul 4, 2020
Disable Wordpress native username password login when using Google Apps Login
View disable-native-login.php
* Plugin Name: Disable Native Login
* Plugin URI:
* Description: Disable the native username password login in wordpress
* Version: 1.0.0
* Author: Gene Wood
* Author URI:
* License: GPL2
gene1wood / syslog.txt
Created Jun 26, 2020
Syslog on Ubuntu 18.04 when activating Soundcore Life P2 headset
View syslog.txt
Jun 26 11:34:54 judy /usr/lib/gdm3/gdm-x-session[32177]: (--) modeset(G0): HDMI max TMDS frequency 300000KHz
Jun 26 11:34:55 judy dbus-daemon[32393]: [session uid=1000 pid=32393] Activating via systemd: service name='org.bluez.obex' unit='dbus-org.bluez.obex.service' requested by ':1.79' (uid=1000 pid=1277 comm="gnome-control-center bluetooth " label="unconfined")
Jun 26 11:34:55 judy systemd[32111]: Starting Bluetooth OBEX service...
Jun 26 11:34:55 judy obexd[1289]: OBEX daemon 5.48
Jun 26 11:34:55 judy dbus-daemon[32393]: [session uid=1000 pid=32393] Successfully activated service 'org.bluez.obex'
Jun 26 11:34:55 judy systemd[32111]: Started Bluetooth OBEX service.
Jun 26 11:35:03 judy bluetoothd[1462]: a2dp-source profile connect failed for E8:07:BF:A6:3D:26: Device or resource busy
Jun 26 11:35:04 judy kernel: [62680.010423] input: E8:07:BF:A6:3D:26 as /devices/virtual/input/input91
Jun 26 11:35:04 judy /usr/lib/gdm3/gdm-x-session[32177]: (II) config/udev: Adding input device E8:07:BF:A6:3D:26 (/dev/inpu
gene1wood /
Last active Jun 2, 2020
Realteak AC'97 Audio Codecs Software Vista/Win7 (32/64 bits) Driver only (ZIP file)
gene1wood / watch-for-new-media.bash
Created May 10, 2020
Script to create inotifywait on directories to trigger Subsonic media scanning
View watch-for-new-media.bash
dirs="/path/to/first/dir /path/to/second/dir /path/to/third/dir"
# act="cat"
/bin/inotifywait --monitor --recursive --quiet --format '%w' --event create,moved_to $dirs | while read f
$act "$f"
gene1wood /
Created May 10, 2020
Script to trigger a Subsonic media rescan with locking
#!/bin/env python
import sys
import requests
import os
import os.path
import time
import logging
import subprocess
import json
You can’t perform that action at this time.