Skip to content

Instantly share code, notes, and snippets.

View pmichk's full-sized avatar

Paweł Michalik pmichk

View GitHub Profile
"use strict";
const querystring = require("querystring");
const request = require('request-promise');
module.exports = async (context, callback) => {
const article = querystring.escape(context);
const uri = `https://en.wikipedia.org/w/api.php?format=json&action=query&prop=extracts&titles=${article}&redirects=true`;
let response = await request({
uri,
<p><b>Stack</b> may refer to:
</p>
<h2><span id="Science">Science</span></h2>
<ul><li>Stack (mathematics), a sheaf that takes values in categories rather than sets</li>
<li>Stack (geology), a large vertical column of rock in the sea</li>
<li>Stacking (chemistry), or pi stacking, attractive, noncovalent interactions between aromatic rings</li></ul><h2><span id="Computing">Computing</span></h2>
<ul><li>Stack (abstract data type), abstract data type and data structure based on the principle of last in first out
<ul><li>Stack (C++), a C++ standard container, simulating a stack</li></ul></li>
<li>Call stack, stack data structure that stores information about the active subroutines of a computer program</li>
"use strict";
const request = require('request-promise');
module.exports = async (context, callback) => {
const gateway = process.env.gateway || 'http://gateway.openfaas:8080/';
const clientUri = `${gateway}function/wikiclient`;
const cleanupUri = `${gateway}function/markupcleanup`;
const sentimentUri = `${gateway}function/sentimentanalysis`;
kubectl apply -f "https://cloud.weave.works/k8s/scope.yaml?k8s-version=$(kubectl version | base64 | tr -d '\n')"
kubectl port-forward -n weave "$(kubectl get -n weave pod --selector=weave-scope-component=app -o jsonpath='{.items..metadata.name}')" 4040

Keybase proof

I hereby claim:

To claim this, I am signing this object: