Skip to content

Instantly share code, notes, and snippets.

View edmondburnett's full-sized avatar

Edmond Burnett edmondburnett

View GitHub Profile
@edmondburnett
edmondburnett / gist:40e7db34416fdc734846
Last active April 17, 2019 16:21
Push-to-Deploy, Python edition - git post-receive hook script
#!/usr/bin/env python
# post-receive hook for git-based deployments
import sys
import os
from subprocess import call
# configuration
deploy_to_path = '/path/to/deploy/directory/'
deploy_branch = 'master'

Transparent Git Encryption

This document has been modified from its [original format][m1], which was written by Ning Shang (geek@cerias.net). It has been updated and reformatted into a [Markdown][m2] document by [Woody Gilk][m3] and [republished][m4].

Description

When working with a remote git repository which is hosted on a third-party storage server, data confidentiality sometimes becomes

@edmondburnett
edmondburnett / custom_rewrite.py
Last active January 10, 2017 11:07
squid custom rewriter script
#!/usr/bin/python
import sys
import re
port_regex = re.compile(r':8082')
def rewrite_url(line):
""" If the input URL contains a port number, strip it out """
url_list = line.split(' ')
@edmondburnett
edmondburnett / gist:38ed3451de659dc43fa3f24befc0073b
Last active July 12, 2023 14:23
Axios Interceptor to delay and retry original request for certain status code (polling)
import axios from 'axios';
const instance = axios.create({
baseURL: 'http://localhost:5000'
});
const sleepRequest = (milliseconds, originalRequest) => {
return new Promise((resolve, reject) => {
setTimeout(() => resolve(instance(originalRequest)), milliseconds);
});
@edmondburnett
edmondburnett / kx2_wsjtx.md
Last active May 31, 2021 02:17
KX2 FT8 WSJT-X Settings

Elecraft KX2 digital modes/FT8 setup

WSJT-X Radio tab

  • Rig: Elecraft KX2
  • Serial Port: /dev/tty.usbserial-A600UJBG (or similar)
  • Baud rate: 38400
  • Data bits: Eight
  • Stop bits: Two
@edmondburnett
edmondburnett / 7300_wsjtx.md
Last active April 29, 2024 05:56
Icom IC-7300 WSJT-X FT8 Settings

IC-7300 digital modes/FT8 setup

WSJT-X Radio tab

  • Serial Port: /dev/cu.SLAB_USBtoUART
  • Baud Rate: 115200
  • Data Bits: Eight
  • Stop Bits: Two
  • Handshake: None
@edmondburnett
edmondburnett / buddipole_notes.md
Last active February 17, 2020 22:24
Mini-Buddipole notes, custom tunings

Notes on using and tuning a Buddipole in nontypical deployments

Custom attic tunings

  • 14.074 20m FT8:

    • Black coil: 5 whip sections out, Blue tap 15
    • Red coil: 4 1/3 whips out, Green tap 10
  • 7.212 40m SSB (narrow, still requires tuner):

  • Black coil: 5 whips, no tap

@edmondburnett
edmondburnett / run.sh
Last active April 11, 2021 06:41
Auto-update internal library dependecies for microservices in a Python monorepo, w/Poetry.
#!/usr/bin/env bash
# Check for file changes in internal libraries local to a monorepo, increment
# the lib's minor version number, and auto-update them before running the
# current project/service's dev app/server. Assumes usage of poetry's
# pyproject.toml and a repository structure similar to that described in this
# Opendoor article: https://medium.com/opendoor-labs/our-python-monorepo-d34028f2b6fa
REPONAME=myproject
LIBSPATH=~/dev/$REPONAME/lib
@edmondburnett
edmondburnett / gist:8694c18c8fdc38fd81ea23a4fae74a14
Last active October 8, 2023 04:04
robots.txt for blocking known AI bots/crawlers
User-agent: ChatGPT-User
Disallow: /
User-agent: CCBot
Disallow: /
User-agent: GPTBot
Disallow: /
User-agent: Google-Extended