Skip to content

Instantly share code, notes, and snippets.

View jthomas's full-sized avatar
💻
serverless all the things.

James Thomas jthomas

💻
serverless all the things.
View GitHub Profile
@jthomas
jthomas / README.md
Created April 12, 2016 06:59
OpenWhisk JavaScript Client Library

openwhisk-client-js

JavaScript client library for the OpenWhisk platform. Provides a wrapper around the OpenWhisk APIs.

installation

$ npm install openwhisk // replace with package name....
@jthomas
jthomas / hello_name_1.0.0.yaml
Created May 3, 2016 08:16
Public APIs for OpenWhisk Actions using API Connect.
swagger: '2.0'
info:
version: 1.0.0
title: hello_name
x-ibm-name: hello_name
host: $(catalog.host)
basePath: /
paths:
/hello_name:
get:
<output id="output_2449884">
<prompt selectionType="RANDOM">
<item>Is there anything else I can help you with?</item>
</prompt>
<getUserInput>
<input>
<grammar>
<item>Yes</item>
</grammar>
</input>
@jthomas
jthomas / README.md
Last active May 28, 2016 18:24
Building Cognitive Bots Talk @ Twilio Signal
@jthomas
jthomas / Dockerfile
Created July 18, 2016 08:13
Running MQTT Server on IBM Containers
FROM node:4
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
# Bundle app source
COPY . /usr/src/app
EXPOSE 1883
EXPOSE 3000
@jthomas
jthomas / command.sh
Created August 4, 2016 14:54
Time execution of running a command N times in parallel.
time parallel -n0 -j0 "cmd" ::: {1..N}
@jthomas
jthomas / main.rs
Created January 18, 2017 15:05
Sample OpenWhisk Action using Rust
extern crate rustc_serialize;
use rustc_serialize::json;
use rustc_serialize::json::Json;
use std::env;
#[derive(RustcDecodable, RustcEncodable)]
pub struct Greeting {
message: String
}
@jthomas
jthomas / cargo.toml
Created January 18, 2017 15:08
Sample Cargo dependencies for JSON processing
[package]
name = "action"
version = "0.1.0"
authors = ["Me <me@email.com>"]
[dependencies]
rustc-serialize = "0.3"
@jthomas
jthomas / Dockerfile
Created July 31, 2017 14:16
Custom Docker image for using Python ML libraries on OpenWhisk
FROM openwhisk/python3action
# lapack-dev is available in community repo.
RUN echo "http://dl-4.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories
# add package build dependencies
RUN apk add --no-cache \
g++ \
lapack-dev \
gfortran
@jthomas
jthomas / Dockerfile
Created August 1, 2017 13:30
Custom Docker Skeleton for OpenWhisk
FROM openwhisk/dockerskeleton:latest
ADD actionproxy.py /actionProxy/