Skip to content

Instantly share code, notes, and snippets.

View fostimus's full-sized avatar

Derek Foster fostimus

View GitHub Profile
@fostimus
fostimus / create-etch-e-sign-packet.py
Last active December 13, 2023 20:04
Create etch w signature page options
# Example: Create an e-sign packet via the Anvil API
#
# * E-sign API docs: https://www.useanvil.com/docs/api/e-signatures
# * Anvil Python client: https://github.com/anvilco/python-anvil/
# * Anvil Python docs: https://python-anvil.readthedocs.io/
#
# This script is runnable as is, all you need to do is supply your own API key
# in the ANVIL_API_KEY environment variable.
#
# ANVIL_API_KEY=<yourAPIKey> python examples/create-etch-e-sign-packet.py <your.real.email@ex.com>
@fostimus
fostimus / download-etch-packets.js
Created November 17, 2023 17:48
Downloads all zip files for completed etch packets in your Anvil org
// Fetches completed EtchPackets from your organization and outputs all download
// URLs. More information:
//
// https://www.useanvil.com/docs/api/graphql/reference/#definition-EtchPacket
// https://www.useanvil.com/docs/api/e-signatures/#downloading-documents
const fs = require("fs");
const Anvil = require("@anvilco/anvil");
const client = new Anvil({
apiKey: process.env.ANVIL_API_TOKEN,
{
"type": "html",
"data": {
"html": "<div id=\"externalbox\"><div id=\"inputdata\"><div style=\"text-align:center\"><span style=\"border-left:0.02in solid black;height:1in;display:inline-block;\"></span><span style=\"border-left :0.06in solid white;height:1in;display:inline-block;\"></span><span style=\"border-left:0.02in solid black;height:1in;display:inline-block;\"></span><span style=\"border-left:0.02in solid white;height:1in;display:inline-block;\"></span><span style=\"border-left :0.06in solid black;height:1in;display:inline-block;\"></span><span style=\"border-left:0.02in solid white;height:1in;display:inline-block;\"></span><span style=\"border-left :0.06in solid black;height:1in;display:inline-block;\"></span><span style=\"border-left:0.02in solid white;height:1in;display:inline-block;\"></span><span style=\"border-left:0.02in solid black;height:1in;display:inline-block;\"></span><span style=\"border-left:0.02in solid white;height:1in;display:inline-block;\"></span><span style=\"border-left :0.06
@fostimus
fostimus / blue-styles.css
Created June 28, 2023 17:44
Example stylesheet for use within Anvil - completely control the brand and style of your Anvil Webforms and Etch Packets.
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600;700&display=swap');
body,
.forge-flow {
font-family: 'Open Sans', sans-serif;
background-color: #fff;
}
#page-title {
margin-bottom: 30px;
@fostimus
fostimus / nvm-shell-integration-bash.txt
Last active November 4, 2021 18:34
nvm-shell-integration-bash
# nvm-shell-integration-bash
cdnvm() {
command cd "$@";
nvm_path=$(nvm_find_up .nvmrc | tr -d '\n')
# If there are no .nvmrc file, use the default nvm version
if [[ ! $nvm_path = *[^[:space:]]* ]]; then
declare default_version;
@fostimus
fostimus / nvm-shell-integration-zsh.txt
Last active November 4, 2021 18:35
nvm-shell-integration-zsh
# nvm-shell-integration-zsh
# place this after nvm initialization!
autoload -U add-zsh-hook
load-nvmrc() {
local node_version="$(nvm version)"
local nvmrc_path="$(nvm_find_nvmrc)"
if [ -n "$nvmrc_path" ]; then
local nvmrc_node_version=$(nvm version "$(cat "${nvmrc_path}")")
@fostimus
fostimus / lakers.svg
Created August 10, 2020 18:43
Lakers Gradient
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.