Skip to content

Instantly share code, notes, and snippets.

@cianclarke
cianclarke / README.md
Created March 1, 2016 15:01
markdown-it testcase
@cianclarke
cianclarke / index.html
Last active January 30, 2016 00:09
PhoneGap Day Microservices Workshop Cheat Sheet
<h1>PhoneGap Day Microservices for Mobile Workshop - Cheat Sheet</h1>
<a href="http://mobileblog.redhat.com/apps-101-absolute-beginners-guide/">Tutorial walking through the client-side of this project</a><br>
<a href="https://www.youtube.com/watch?v=bQ8n5YKsEqM">Video tutorial of same</a><br>
<a href="https://github.com/cianclarke/barcode-client">Barcode Client project</a><br>
<a href="https://github.com/cianclarke/barcode-cloud">Barcode Node.js Microservice</a><br>
<a href="https://openshift.feedhenry.com">Open Access to an instance of RedHat Mobile Application Platform</a><br>
<h2>Cordova Client Cheat Sheet</h2>
<ul>
<li><a href="https://gist.githubusercontent.com/cianclarke/c499c5cef33c1ae603ab/raw/7fd7b2653bfc1b2c9a43163e6958639bc212ec7a/hello.js">www/hello.js</a></li>
<li><a href="https://gist.githubusercontent.com/cianclarke/c499c5cef33c1ae603ab/raw/7fd7b2653bfc1b2c9a43163e6958639bc212ec7a/config.json">www/config.json</a> (new file)</li>
@cianclarke
cianclarke / hello.js
Created January 27, 2016 22:28
semi-complete hello.js for barcode project
var soap = require('soap');
var express = require('express');
var bodyParser = require('body-parser');
var cors = require('cors');
function helloRoute() {
var hello = new express.Router();
hello.use(cors());
hello.use(bodyParser());
@cianclarke
cianclarke / README.md
Last active March 7, 2017 14:10
Barcode Cloud finished app

Barcode Lookup

This service looks up a barcode by UPC id. It connects with a SOAP service, takes a mixed SOAP and CSV response, and returns JSON back to the client, more effectively mobilising the service.

Group Hello World API

hello [/hello]

'Hello world' endpoint.

@cianclarke
cianclarke / hello.js
Created January 20, 2016 15:08
Cloud application hello.js with hardcoded product response
var express = require('express');
var bodyParser = require('body-parser');
var cors = require('cors');
function helloRoute() {
var hello = new express.Router();
hello.use(cors());
hello.use(bodyParser());
@cianclarke
cianclarke / config.json
Last active June 28, 2016 15:33
Barcode Client Finished Files
{
"plugins": [
{
"id": "com.phonegap.plugins.barcodescanner",
"version": "2.0.1",
"url" : "https://github.com/wildabeast/BarcodeScanner.git"
}
]
}
<html>
<head></head>
<body>
<h1>Weather Project</h1>
<p>Today, we're going to take an existing template - our "hello world" project, and modify it to integrate with a Weather API.</p>
<h2>Cheat Sheet: </h2>
<strong>API url: </strong>http://api.openweathermap.org/data/2.5/weather?q=London,uk&appid=2de143494c0b295cca9337e1e96b00e0<br />
<h3>Cloud App</h3>
<strong>Completed <pre style="display: inline;">lib/hello.js</pre> file:</strong> <a href="https://gist.githubusercontent.com/cianclarke/b05bc925685c568ed52c/raw/9dc3f925e1797274734e0450f6bcf6c7b3512a44/hello.js">https://gist.githubusercontent.com/cianclarke/b05bc925685c568ed52c/raw/9dc3f925e1797274734e0450f6bcf6c7b3512a44/hello.js</a><br />
<strong>Completed <pre style="display: inline;">application.js</pre> file:</strong> <a href="https://gist.githubusercontent.com/cianclarke/2d08975ffedc8f962e6b/raw/0f36e6a34aadd060ea5cf999fa5c215723413ab5/application.js">https://gist.githubusercontent.com/cianclarke/2d08975ffedc8f962e6b/raw/
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<title>Hello World</title>
<link rel="stylesheet" href="css/app.css">
</head>
document.getElementById('say_hello').onclick = function () {
document.getElementById('cloudResponse').innerHTML = "<p>Calling Cloud.....</p>";
$fh.cloud(
{
path: 'weather',
data: {
location: document.getElementById('hello_to').value
}
},
function (res) {

FeedHenry Hello World MBaaS Server

This is a blank 'hello world' FeedHenry MBaaS. Use it as a starting point for building your APIs.

Group Weather API

weather [/weather]

'Weather' endpoint.