Skip to content

Instantly share code, notes, and snippets.

View shawnbot's full-sized avatar
🎹

Shawn Allen shawnbot

🎹
View GitHub Profile

The production AWS environment has SES setup for api.sf.gov. The staging server will have permission for api.dev.sf.gov can be setup manually (or grab Mikela)

From the platform_base playbook we will need to add this permission to the instance_profile IAM role: https://docs.aws.amazon.com/ses/latest/dg/control-user-access.html#iam-and-ses-examples-access-specific-ses-api-version

It looks like the current iam_instance_profile is pointing at an s3_write_profile https://github.com/SFDigitalServices/ansible-platform/blob/main/platform_deploy.yaml#L39

Which is created here https://github.com/SFDigitalServices/ansible-platform/blob/main/roles/s3_public/tasks/main.yaml#L36

<!DOCTYPE html>
<html><head>
<link href="https://fonts.googleapis.com" rel="preconnect"/>
<link crossorigin="" href="https://fonts.gstatic.com" rel="preconnect"/>
<link href="https://fonts.googleapis.com/css2?family=Rubik:wght@300;400;600&amp;display=swap" rel="stylesheet"/>
<meta content="width=device-width" name="viewport"/>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
<meta content="light dark" name="color-scheme"/>
<meta content="light dark" name="supported-color-schemes"/>
from airtable import Airtable
class AirtableMeta:
"""
The AirtableMeta class provides access to the Airtable base schema API:
https://airtable.com/developers/web/api/get-base-schema
It's totally a hack: The base schema API ("/v0/meta/bases/{baseId}/tables")
doesn't live under the Airtable class's base_url ("/v0/{baseId}"), so we
@shawnbot
shawnbot / ghost-inspector-ips.sh
Created November 10, 2021 22:01
Ghost Inspector IPs
#/bin/bash
curl -s "https://api.ghostinspector.com/v1/test-runner-ip-addresses" \
| jq -r '.data|values|.[]|.ips|.[]' \
| sort
➕ Commits 15,865
🔀 Pull requests 1,452
🚩 Issues 917
📦 Contributed to 17

You should rename the master branch to main in git, and on GitHub. Here's how!

1. Create your new main branch

...with one click on github.com/:owner/:repo:

image

2. Update the default branch to main in your repo's branch settings

@shawnbot
shawnbot / README.md
Last active July 20, 2024 19:18
50 US states as JSON

How this was made

  1. Visit the list of U.S. state abbreviations on Wikipedia.

  2. Sort the table by "status of region" to group the states together

  3. Select the cells of all of the states (from "Alabama" to "Wyo.") and press ⌘C to copy

  4. Cut the TSV in your clipboard to two columns (name and two-letter code)

    pbpaste | cut -d$'\t' -f1,4 | pbcopy
@shawnbot
shawnbot / stylelint.config.js
Created October 3, 2019 22:40
lint only some variable types
const variables = require('stylelint-config-primer/plugins/variables')
const {DEFAULT_RULES} = variables
const variableRules = {}
for (const rule of Object.keys(DEFAULT_RULES)) {
variableRules[rule] = false
}
module.exports = {
plugins: [variables],
<sticky-element class="top-0" stuck-class="top-0 bg-white" stuck-style="height: 64px">
<h1 class="h1" stuck-class="h2">
I stick to the top
</h1>
</sticky-element>
@keyframes glow {
0% { color: yellow; }
100% { color: red; }
}
@keyframes grow {
from { transform: scale(0.1); }
to { transform: scale(1); }
}