Skip to content

Instantly share code, notes, and snippets.

Avatar

Paul Coady pcoady

View GitHub Profile
View app.css
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 Aug 28, 2015
BackSpace Academy Certified Developer Associate CloudFormation LAB
View DynamoDB.json
{
"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 Mar 18, 2020
BackSpace Academy Certified Developer Associate IAM S3 Lab
View app.css
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;
View Cognito-Node-Example.js
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 Sep 12, 2014
Cognito-Phonegap-Tutorial-IAM
View Cognito-Phonegap-Tutorial-IAM.txt
{
"Version": "2012-10-17",
"Statement":
[
{
"Action": [
"mobileanalytics:PutEvents",
"cognito-sync:*"
],
"Effect": "Allow",
@pcoady
pcoady / Self-Invoking-Anonymous-Function.js
Last active Aug 29, 2015
Self-invoking anonymous function
@pcoady
pcoady / Cognito-Phonegap-Tutorial-config.xml
Created Sep 12, 2014
Cognito-Phonegap-Tutorial-config.xml
View 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>
View Cognito-Phonegap-tutorial-index.html
<!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 Aug 29, 2015
Cognito-Phonegap-Tutorial
View Cognito-Phonegap-Tutorial .js
(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 Aug 29, 2015
Cognito-Phonegap-Tutorial-OpenFB
View Cognito-Phonegap-Tutorial-OpenFB.js
/**
* 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 () {
You can’t perform that action at this time.