Skip to content

Instantly share code, notes, and snippets.

View dnewber's full-sized avatar
🆒

Dustin Newberry dnewber

🆒
  • 4th Dimension LLC
  • Atlanta, GA, USA
View GitHub Profile
import random
import yaml
import json
import time
import requests
# Config Variables
ZYTE_KEY = "ADD API KEY HERE"
import os
import sys
import json
import logging
import click
from yaml import safe_load
from flask.cli import AppGroup
from tcpa import model, provider
@dnewber
dnewber / middlewarev2.md
Last active March 11, 2020 17:33
Middleware v2 Usage Guide

Middleware v2 Usage Guide

Middleware requests require a valid authorization token header:

Authorization: Bearer TOKEN
Content-Type: application/json
...

PointClickCare Facilities:

@dnewber
dnewber / middleware.md
Last active December 24, 2019 17:33
Middleware Usage Guide

Middleware Usage Guide

User Story 1: As a MapHabit Community Manager, I can link my PCC credentials to my MapHabit account.

To create/update a relationship between the Maphabit user and the PCC user, make the following request:
curl -X PATCH \
  "https://api-staging.middleware.maphabit.com/v1/mh/community/community123/user/123/rel/pccUser" \
  -H 'Content-Type: application/json' \

-H "Authorization: Bearer token" \

Filedrop API Usage Guide

Authorization

When making requests, provide your API key using the parameter: apikey.

CURL Example:

curl -X GET https://filedrop.hydrian.com/foo/?apikey=YOUR_APIKEY_HERE

List all Files

@dnewber
dnewber / country_tuples.py
Created November 29, 2017 20:47
Country codes (ISO 3166-1 alpha-2) and names as a list of tuples (Formatted for use with WTForms).
countries_list = [
('US', 'UNITED STATES'),
('AF', 'AFGHANISTAN'),
('AX', 'ALAND ISLANDS'),
('AL', 'ALBANIA'),
('DZ', 'ALGERIA'),
('AS', 'AMERICAN SAMOA'),
('AD', 'ANDORRA'),
('AO', 'ANGOLA'),
('AI', 'ANGUILLA'),
@dnewber
dnewber / state_tuples.py
Created November 29, 2017 16:49
US state abbreviations and names as a list of tuples (Formatted for use with WTForms).
states = [
('AK', 'Alaska'),
('AL', 'Alabama'),
('AR', 'Arkansas'),
('AS', 'American Samoa'),
('AZ', 'Arizona'),
('CA', 'California'),
('CO', 'Colorado'),
('CT', 'Connecticut'),
('DC', 'District of Columbia'),
import ctypes
import time
import shutil
import requests
def set_desktop():
SPI_SETDESKTOPWALLPAPER = 20
try: