Skip to content

Instantly share code, notes, and snippets.

View pcoady's full-sized avatar

Paul Coady pcoady

View GitHub Profile
@pcoady
pcoady / app.css
Last active January 21, 2022 18:09
body {
background-color:#263238;
}
.glyphicon-refresh-animate {
-animation: spin .7s infinite linear;
-webkit-animation: spin2 .7s infinite linear;
}
@-webkit-keyframes spin2 {
@pcoady
pcoady / DynamoDB.json
Created August 28, 2015 10:41
BackSpace Academy Certified Developer Associate CloudFormation LAB
{
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "DynamoDB Lab Products Database",
"Parameters": {
"ReadCapacityUnits": {
"Description": "Provisioned read throughput",
"Type": "Number",
"Default": "1",
"MinValue": "1",
"MaxValue": "10000",
@pcoady
pcoady / app.css
Last active March 18, 2020 10:52
BackSpace Academy Certified Developer Associate IAM S3 Lab
body {
background: url('supermarket.jpg') no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
.glyphicon-refresh-animate {
-animation: spin .7s infinite linear;
@pcoady
pcoady / Cognito-Node-Example.js
Created September 14, 2014 14:33
Cognito-Node-Example
var express = require('express');
var router = express.Router();
var passport = require('passport');
var FacebookStrategy = require('passport-facebook').Strategy;
var AWS = require('aws-sdk');
var colors = require('colors');
var AWS_ACCOUNT_ID = 'XXXXXXXXXXX';
@pcoady
pcoady / Cognito-Phonegap-Tutorial-IAM.txt
Created September 12, 2014 14:41
Cognito-Phonegap-Tutorial-IAM
{
"Version": "2012-10-17",
"Statement":
[
{
"Action": [
"mobileanalytics:PutEvents",
"cognito-sync:*"
],
"Effect": "Allow",
@pcoady
pcoady / Self-Invoking-Anonymous-Function.js
Last active August 29, 2015 14:06
Self-invoking anonymous function
(function($){
})(jQuery);
@pcoady
pcoady / Cognito-Phonegap-Tutorial-config.xml
Created September 12, 2014 09:50
Cognito-Phonegap-Tutorial-config.xml
<?xml version="1.0" encoding="UTF-8"?>
<!-- config.xml reference: https://build.phonegap.com/docs/config-xml -->
<widget xmlns = "http://www.w3.org/ns/widgets"
xmlns:gap = "http://phonegap.com/ns/1.0"
id = "technology.backspace.aws.cognito.example"
version = "1.0.0">
<name>AWS Cognito Example App</name>
<!DOCTYPE html>
<html>
<head>
<title>AWS Cognito App</title>
<script type="text/javascript" charset="utf-8" src="phonegap.js"></script>
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.3/jquery.mobile-1.4.3.min.css" />
</head>
<body>
<button id="btnLogin">Login with Facebook</button>
<button id="btnLogout">Logout</button>
@pcoady
pcoady / Cognito-Phonegap-Tutorial .js
Last active August 29, 2015 14:06
Cognito-Phonegap-Tutorial
(function($){
var AWS_ACCOUNT_ID = 'XXXXXXXX';
var AWS_REGION = 'us-east-1';
var COGNITO_IDENTITY_POOL_ID = 'us-east-1:XXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXX';
var COGNITO_IDENTITY_ID, COGNITO_SYNC_TOKEN, AWS_TEMP_CREDENTIALS;
var cognitosync;
var IAM_ROLE_ARN = 'arn:aws:iam::XXXXXXXXX:role/Cognito_CognitoBrowserExampleAuth_DefaultRole';
var COGNITO_SYNC_COUNT;
var COGNITO_DATASET_NAME = 'TEST_DATASET';
var FACEBOOK_APP_ID = 'XXXXXXXXXXXXXX';
@pcoady
pcoady / Cognito-Phonegap-Tutorial-OpenFB.js
Last active August 29, 2015 14:06
Cognito-Phonegap-Tutorial-OpenFB
/**
* OpenFB is a micro-library that lets you integrate your JavaScript application with Facebook.
* OpenFB works for both BROWSER-BASED apps and CORDOVA/PHONEGAP apps.
* This library has no dependency: You don't need (and shouldn't use) the Facebook SDK with this library. Whe running in
* Cordova, you also don't need the Facebook Cordova plugin. There is also no dependency on jQuery.
* OpenFB allows you to login to Facebook and execute any Facebook Graph API request.
* @author Christophe Coenraets @ccoenraets
* @version 0.4
*/
var openFB = (function () {