Skip to content

Instantly share code, notes, and snippets.

View amalbuquerque's full-sized avatar

André Albuquerque amalbuquerque

View GitHub Profile
@amalbuquerque
amalbuquerque / cognito-developer-authenticated-client-example.py
Created July 18, 2020 22:51 — forked from dkarchmer/cognito-developer-authenticated-client-example.py
django-boto3-cognito: AWS' Cognito Developer Authenticated Identities Authflow using Django/Python/Boto3 (For building stand-alone clients)
__author__ = 'dkarchmer'
'''
This script emulates a stand-alone Python based client. It relies on Boto3 to access AWS, but
requires your Django server to have an API for your user to access Cognito based credentials
Because of Cognito, the client (this script) will only get temporary AWS credentials associated
to your user and only your user, and based on whatever you configure your AIM Policy to be.
Most Cognito examples demonstrate how to use Cognito for Mobile Apps, so this scripts demonstrate
how to create a stand-alone Python script but operating similarly to these apps.
@amalbuquerque
amalbuquerque / cognito-developer-authenticated-client-example.py
Created July 18, 2020 22:51 — forked from dkarchmer/cognito-developer-authenticated-client-example.py
django-boto3-cognito: AWS' Cognito Developer Authenticated Identities Authflow using Django/Python/Boto3 (For building stand-alone clients)
__author__ = 'dkarchmer'
'''
This script emulates a stand-alone Python based client. It relies on Boto3 to access AWS, but
requires your Django server to have an API for your user to access Cognito based credentials
Because of Cognito, the client (this script) will only get temporary AWS credentials associated
to your user and only your user, and based on whatever you configure your AIM Policy to be.
Most Cognito examples demonstrate how to use Cognito for Mobile Apps, so this scripts demonstrate
how to create a stand-alone Python script but operating similarly to these apps.
<!DOCTYPE html>
<html ng-app="hello">
<head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.15/angular.min.js"></script>
<script type="text/ng-template" id="nonHttpTemplateUrl">
<p class="hello__content">hello, world</p>
</script>
</head>
/*
* pedal controller for Ctrl, Space and Shift
*/
#include <Bounce.h>
// 10 = debounce time in ms
int debounceTimeMs = 10;
int ledPin = 11;
int spacePedalPin = 3;