Skip to content

Instantly share code, notes, and snippets.

Daniel Khan danielkhan

Block or report user

Report or block danielkhan

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View speakers-index.pug
extends ../layout/index
block content
#speakerDetail.container
.row
.col-sm-8
article.speakerslist
.container
.row
.col-sm-8
View speakers-index.pug
extends ../layout/index
block content
#speakerList.container
.row
.col-sm-8
article.speakerslist
.container
.row
.col-sm-8
h3.speakerslist-title Art in Full Bloom
View header.pug
header
.jumbotron.hidden-xs
// jumbotron
nav.navbar.navbar-inverse
.container
.navbar-header
button.navbar-toggle.collapsed(type='button', data-toggle='collapse', data-target='#navbar-collapse', aria-expanded='false')
span.sr-only Toggle navigation
span.icon-bar
span.icon-bar
View ZipKinExpress.js
const {
Tracer,
BatchRecorder,
ExplicitContext,
jsonEncoder: { JSON_V2 }
} = require('zipkin');
const zipkinMiddleware = require('zipkin-instrumentation-express').expressMiddleware;
const wrapRequest = require('zipkin-instrumentation-request');
const request = require('request');
View postproblemdetail.js
module.exports.postProblemDetail = async (body, callback) => {
console.log(body);
if (body.type === "validate") {
return callback(null, success(say("Would you like to notify the person on call?", 'Notify Daniel')));
}
if (body.type === "custom") {
return callback(null, success(say(`Notified Daniel`)));
}
View serverless.sample.yml
# The name of the service
service: dynatrace-lambda-sample
provider:
name: aws
# The node version to use
runtime: nodejs8.10
functions:
hello:
View gist:18f201cc9c8a10ebd6e1db3e2f7d7bfb
const axios = require('axios');
module.exports.handler = async (event, context, callback) => {
// Asynchronous HTTP GET
// In real projects, you want to add some error handling here.
const res = axios.get('https://api.weather.gov/points/39.7456,-97.0892');
const response = {
statusCode: 200,
View sample-serverless.yml
# The name of the service
service: dynatrace-lambda-sample
provider:
name: aws
# The node version to use
runtime: nodejs8.10
functions:
hello:
View lambda-sample-index.js
const axios = require('axios');
module.exports.handler = async (event, context, callback) => {
// Asynchronous HTTP GET
// In real projects, you want to add some error handling here.
const res = await axios.get('https://api.weather.gov/points/39.7456,-97.0892');
const response = {
statusCode: 200,
View lambdaIndex.js
console.log('Loading function');
const doc = require('dynamodb-doc');
const dynamo = new doc.DynamoDB();
/**
* Demonstrates a simple HTTP endpoint using API Gateway. You have full
* access to the request and response payload, including headers and
You can’t perform that action at this time.