I hereby claim:
- I am AustinCorridor on github.
- I am samuelrhea (https://keybase.io/samuelrhea) on keybase.
- I have a public key whose fingerprint is 333C 0EBD 2B26 47A1 191F F91C C4E1 5B23 1FD7 169D
To claim this, I am signing this object:
function forwardLabeledEmails() { | |
const labels = ["label1", "label2", "label3"]; // Multiple labels | |
const workerEndpoint = ""; | |
const authToken = ""; | |
const recipientEmail = ""; // Replace with your email address | |
// Get the date 24 hours ago | |
const now = new Date(); | |
const twentyFourHoursAgo = new Date(now.getTime() - 24 * 60 * 60 * 1000); |
function forwardLabeledEmails() { | |
const labelName = ""; | |
const workerEndpoint = ""; | |
const authToken = ""; | |
const recipientEmail = ""; // Replace with your email address | |
// Get the date 24 hours ago | |
const now = new Date(); | |
const twentyFourHoursAgo = new Date(now.getTime() - 24 * 60 * 60 * 1000); |
import requests | |
import json | |
import os | |
from datetime import datetime | |
class CloudflareExporter: | |
def __init__(self, auth_token=None, api_key=None, email=None): | |
""" | |
Initialize with either an API Token or API Key + Email combination | |
:param auth_token: Cloudflare API Token |
- name: update policy | |
run: | | |
curl ${{ env.PUT_POL }} ${{ env.CURL_AUTH }} ${{ env.CURL_CONTENT }} ${{ env.CURL_DATA_UPOL }} | |
env: | |
PUT_POL: '-X PUT "https://api.cloudflare.com/client/v4/zones/${{ env.ZONE_TAG }}/access/apps/${{ env.APP_UID }}/policies/${{ env.POL_UID }}"' | |
CURL_DATA_UPOL: --data '{"precedence":1,"decision":"allow","name":"Allow team","include":[{"email":{"email":"[email protected]"}},{"email":{"email":"[email protected]"}}]}' | |
if: env.APP_STATE == '11010' |
- name: create app | |
run: | | |
echo ::set-env name=APP_STATE::$(curl ${{ env.POST_APP }} ${{ env.CURL_AUTH }} ${{ env.CURL_CONTENT }} ${{ env.CURL_DATA_APP }} | jq -r '.errors[].code') | |
env: | |
POST_APP: '-X POST "https://api.cloudflare.com/client/v4/zones/${{ env.ZONE_TAG }}/access/apps"' | |
CURL_DATA_APP: --data '{"name":"Test Deploy","domain":"${{ env.ZONE_NAME }}","session_duration":"24h"}' |
- name: create dns | |
run: | | |
curl ${{ env.POST }} ${{ env.CURL_AUTH }} ${{ env.CURL_CONTENT }} ${{ env.CURL_DATA }} | |
env: | |
POST: '-X POST "https://api.cloudflare.com/client/v4/zones/${{ env.ZONE_TAG }}/dns_records"' | |
CURL_DATA: --data '{"type":"A","name":"${{ env.ZONE_NAME }}","content":"1.1.1.1","ttl":120,"priority":10,"proxied":true}' |
name: Deploy Cloudflare | |
on: | |
push: | |
branches: | |
- main | |
env: | |
HUGO_VERSION: 0.71.0 | |
ZONE_NAME: dev-test.rhea.group |
#!/bin/bash | |
trap "exit" INT TERM ERR | |
trap "kill 0" EXIT | |
# These lines make sure that the Hugo server and the Argo Tunnel processes are killed when you ctrl+c the terminal window. | |
cd /Users/samrhea/blog-samrhea | |
# This changes the directory to where my blog lives. Replace this with your own by running `pwd` in your blog directory and adding the output here. |
I hereby claim:
To claim this, I am signing this object:
baseURL = "https://blog.samrhea.com/" | |
languageCode = "en-us" | |
title = "Sam Rhea's blog" | |
theme = "hugo-cactus-theme" | |
[params] | |
name = "Sam Rhea" | |
description = "Sam Rhea's blog" | |
bio = "A Texan in Portugal. " | |
# Enter optionally your twitter account |