Skip to content

Instantly share code, notes, and snippets.

Avatar
🐢
I may be slow to respond.

Robert Brennan rbren

🐢
I may be slow to respond.
  • Fairwinds
  • Boston, Massachusetts
View GitHub Profile
View kubernetes-dump.log
This file has been truncated, but you can view the full file.
{
"kind": "NodeList",
"apiVersion": "v1",
"metadata": {
"selfLink": "/api/v1/nodes",
"resourceVersion": "9103"
},
"items": [
{
@rbren
rbren / index.html
Last active Oct 26, 2018
OneDB simple example
View index.html
<html>
<head>
<script src="https://unpkg.com/onedb-client/dist/onedb-client.min.js"></script>
<script>
var onedb = new OneDBClient({
hosts: {
primary: {location: 'https://one-db.datafire.io'},
}
});
</script>
View blockstack
Verifying my Blockstack ID is secured with the address 1KmvT1LfgXLPcRSbhFnJzXcwtAwVc7QK5S https://explorer.blockstack.org/address/1KmvT1LfgXLPcRSbhFnJzXcwtAwVc7QK5S
View contact_frontend_datafire.html
<form method="post" action="https://contact-us.prod.with-datafire.io/contact">
<label>Your e-mail</label>
<input type="text" name="from">
<label>Message</label>
<textarea name="message"></textarea>
</form>
View serverless.yml
service: serverless-contact
provider:
name: aws
runtime: nodejs6.10
functions:
contact:
handler: handler.contact
events:
View handler.js
var CONTACT_ADDRESS = 'me@company.com';
var querystring = require('querystring');
var mailer = require('nodemailer').createTransport({
service: 'Gmail',
auth: {
user: process.env.GMAIL_ADDRESS,
pass: process.env.GMAIL_PASSWORD,
}
});
View contact_backend_simple.js
let app = require('express')();
app.use(require('body-parser').urlencoded());
app.post('/contact', function(req, res) {
console.log('new message', req.body);
});
app.listen(3000);
View contact_frontend.html
<form method="post" action="http://api.company.com/contact">
<label>Your e-mail</label>
<input type="text" name="from">
<label>Subject</label>
<input type="text" name="subject">
<label>Message</label>
<textarea name="body"></textarea>
</form>
View contact_backend.js
let app = require('express')();
app.use(require('body-parser').urlencoded());
const CONTACT_ADDRESS = 'me@company.com';
var mailer = require('nodemailer').createTransport({
service: 'Gmail',
auth: {
user: process.env.GMAIL_ADDRESS,
pass: process.env.GMAIL_PASSWORD,
View mailto_complex.html
<a href="mailto:me@company.com?subject=Hello&body=We+want+to+hire+you">Contact Us</a>