This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from flask import Flask, request, jsonify | |
from random import randint | |
from sendgrid import Mail, SendGridClient | |
app = Flask(__name__) | |
app.debug = True | |
tweets = [] | |
#put code here |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<head> | |
<link href="css/bootstrap.css" rel="stylesheet"> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript" id="jquery"></script> | |
</head> | |
<html> | |
<title>localchat</title> | |
<body> | |
<h1>Sorry, we don't have much stuff yet!</h1> | |
<!--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var sendgrid = require('tisendgrid')('SENDGRID-USERNAME', 'SENDGRID-PASSOWORD'); | |
sendgrid.send({ | |
to: 'john@email.com', | |
from: 'doe@email.com', | |
subject: 'Hello!', | |
text: 'Hello again!' | |
}, function (e) { | |
if (e) { | |
console.log(e); // Email wasn't sent | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
application: your-app-name | |
version: 1 | |
runtime: go | |
api_version: go1 | |
handlers: | |
- url: /.* | |
script: _go_app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<body ng-controller="TestCtrl"> | |
<script src="bower_components/angular/angular.min.js"></script> | |
<script src="src/sendgrid.js"></script> | |
<script> | |
var app = angular.module('app', ['sendgrid']); | |
app.config(['sendgrid', function(sendgridProvider) { | |
console.log('here'); | |
}]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<! DOCTYPE html> | |
<!--[if it IE 7]> <html class='no-js It-ie9> <![endif]--> | |
<html class='no-js' lang='en-us'> | |
<head> | |
<meta charset='utf-8'> | |
<meta http-equiv='' content='IE=edge'> | |
<meta name='description' content='Postcard'> | |
<meta name='viewport' content='width=device-width, initial-scale=1'> | |
<style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function calculateDistance(lat1, lon1, lat2, lon2) { | |
var R = 6371; // km | |
var dLat = (lat2 - lat1).toRad(); | |
var dLon = (lon2 - lon1).toRad(); | |
var a = Math.sin(dLat / 2) * Math.sin(dLat / 2) + | |
Math.cos(lat1.toRad()) * Math.cos(lat2.toRad()) * | |
Math.sin(dLon / 2) * Math.sin(dLon / 2); | |
var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a)); | |
var d = R * c; | |
return d; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function (angular) { | |
'use strict'; | |
var sendgrid = angular.module('sendgrid', ['cordovaHTTP']); | |
sendrid.provider('sendgrid', ['cordovaHTTP', function SendGridProvider('cordovaHTTP') { | |
/* | |
SMTPAPI Library | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# This is the default config file. It allows all users to do anything, | |
# so don't use it on production systems. | |
# | |
# Look here for more config file examples: | |
# https://github.com/rlidwka/sinopia/tree/master/conf | |
# | |
listen: 0.0.0.0:4873 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<RoutingRules> | |
<RoutingRule> | |
<Condition> | |
<HttpErrorCodeReturnedEquals>404</HttpErrorCodeReturnedEquals> | |
</Condition> | |
<Redirect> | |
<HostName>app.domain.com</HostName> | |
<ReplaceKeyPrefixWith>#!/</ReplaceKeyPrefixWith> | |
</Redirect> | |
</RoutingRule> |
OlderNewer