Skip to content

Instantly share code, notes, and snippets.

View davidejones's full-sized avatar
🤷‍♂️
keep our code running while other packages are changing theirs

David Jones davidejones

🤷‍♂️
keep our code running while other packages are changing theirs
View GitHub Profile
@davidejones
davidejones / Dockerfile
Created February 24, 2025 18:03
Traefik App runner
FROM traefik:v3.3.3
COPY traefik.yml /etc/traefik/traefik.yml
COPY dynamic_conf.yml /etc/traefik/dynamic_conf.yml
EXPOSE 80
ENTRYPOINT ["/entrypoint.sh"]
CMD ["traefik"]
@davidejones
davidejones / README.md
Last active January 25, 2025 19:37
Hugo deploy config to aws cli commands

hugodeploy2cli

Uses the hugo deploy config files to generate equivalent commands for other deployers

Usage

To generate the aws cli equivalent commands use the --aws flag and provide a hugo config that contains the deployment block

hugodeploy2cli.py ./config/preview/config.yaml --aws
@davidejones
davidejones / update_s3_meta.sh
Last active October 12, 2023 11:52
Update s3 metadata for an object and preserve existing content meta
#!/bin/bash
BUCKET="my-bucket"
KEY="/foo/bar/baz.xml"
FILENAME=$(basename $KEY)
#
# {
# “ContentType”: “text/xml; charset=utf-8",
# “CacheControl”: “public, must-revalidate, proxy-revalidate, max-age=0",
@davidejones
davidejones / get_files_to_delete.py
Created April 14, 2022 17:06
find files in transifex that aren't in local checked out repo
import argparse
from pprint import pprint
import requests
import pathlib
session = requests.Session()
def get_resources(options):
@davidejones
davidejones / update_metadata.py
Last active April 13, 2022 16:27
Updates s3 metadata have an md5chksum
import argparse
import hashlib
import logging
import tempfile
import boto3
def md5(file_handle, block_size=4096):
"""
@davidejones
davidejones / keybase.md
Created August 26, 2020 08:00
keybase.md

Keybase proof

I hereby claim:

  • I am davidejones on github.
  • I am davidejones (https://keybase.io/davidejones) on keybase.
  • I have a public key ASB7TaUT5tnmGBniXy4NUfPeXwScYoJMjbXKt2GcpVNIJAo

To claim this, I am signing this object:

@davidejones
davidejones / codes.txt
Created May 17, 2020 15:03
Invisible Man's THPS4 Codes
Invisible Man
gs2v2 codes that i have made the only code i didnt make was flat and holes. just thought id post them
p.s find the (m) code ureself
Never show balance meters
FEAE3986 BCA99B83
Always show balance meters
FEAE399E BCA99B83
@davidejones
davidejones / README.md
Last active May 23, 2023 06:27 — forked from JonnyWong16/share_unshare_libraries.py
Automatically share and unshare libraries for Plex users

Requirements

Have python 3 installed somewhere

Install

Download gist zip file and extract to a directory of your choosing then open terminal / cmd prompt at that directory

For mac and linux

@davidejones
davidejones / main.go
Last active April 24, 2019 15:39
yaml go nested list
package main
import (
"fmt"
"log"
"gopkg.in/yaml.v2"
)
var data = `
@davidejones
davidejones / handler_fieldstorage.py
Created May 2, 2018 15:24
aws lambda parsing multipart form with python3
from cgi import FieldStorage
from io import BytesIO
def parse_into_field_storage(fp, ctype, clength):
fs = FieldStorage(
fp=fp,
environ={'REQUEST_METHOD': 'POST'},
headers={
'content-type': ctype,