I hereby claim:
- I am ajorg on github.
- I am ajorg (https://keybase.io/ajorg) on keybase.
- I have a public key whose fingerprint is 797E 1821 C777 2E76 F6E3 FBBB 1EFE 5EA5 89A4 BC1A
To claim this, I am signing this object:
# Author: Andrew Jorgensen | |
# SPDX-License-Identifier: MIT-0 | |
"""Download all files from your reMarkable as PDFs | |
Uses the local web interface (via USB Ethernet). | |
""" | |
from json import dumps, load | |
from os import makedirs | |
from os.path import exists, join | |
from sys import stdout |
# Author: Andrew Jorgensen | |
# SPDX-License-Identifier: MIT-0 | |
import os | |
from glob import glob | |
from json import dumps, load | |
from os.path import exists, getmtime, getsize, join, split | |
from subprocess import run | |
HEADER_5 = b"reMarkable .lines file, version=5" | |
HEADER_6 = b"reMarkable .lines file, version=6" |
# Copyright Andrew Jorgensen | |
# SPDX-License-Identifier: MIT | |
"""Copies data from a URL sources to S3 objects""" | |
import hashlib | |
import json | |
import os | |
from base64 import b64encode | |
from decimal import Decimal | |
from urllib.parse import urlparse | |
from urllib.request import Request, urlopen |
# Copyright Andrew Jorgensen | |
# SPDX-License-Identifier: MIT | |
import json | |
from os import environ | |
import boto3 | |
MAP = json.loads(environ.get("MAP", '{"index.html":"/"}')) | |
CLIENT = boto3.client("s3") |
# Copyright Andrew Jorgensen | |
# SPDX-License-Identifier: MIT | |
"""Receive SNS events in Lambda and POST to a JSON Webhook. | |
Environment variables required: | |
* URL - The Webhook URL to POST to (including any required keys) | |
* TEMPLATE (default: {}) - The JSON data template to POST to the Webhook | |
* MESSAGE_KEY (default: text) - Key to set to the SNS Message | |
* TOPIC_KEY (optional) - Key to set to the Topic name from the SNS event | |
""" |
#!/bin/bash -e | |
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | |
# SPDX-License-Identifier: MIT-0 | |
fqdn="$(hostname -f)" | |
address="$(/sbin/ip addr show dev eth1 | awk -F'( +|/)' '/inet / {print $3}')" | |
if [[ "${address}" == "$(dig +short "${fqdn}")" && "${fqdn}." == "$(dig +short -x "${address}")" ]] | |
then | |
exit 0 | |
fi | |
TTL=21600 # 6 hours |
1 ` | |
1 [ | |
1 } | |
1 # | |
1 í | |
2 ] | |
2 { | |
4 = | |
4 , | |
4 * |
# Copyright (c) Andrew Jorgensen. All rights reserved. | |
# SPDX-License-Identifier: MIT-0 | |
# Requires jq and assumes AWS CLI --output json | |
DISTRIBUTION_ID="<YOUR DISTRIBUTION ID>" | |
DISTRIBUTION_CONFIG="$( | |
aws cloudfront get-distribution-config \ | |
--id "${DISTRIBUTION_ID}" \ | |
| jq -c .)" |
I hereby claim:
To claim this, I am signing this object:
1 & | |
1 ¤ | |
1 © | |
1 ¶ | |
1 Ñ | |
1 ñ | |
1 ú | |
2 / | |
2 _ | |
2 ¨ |