This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Pod | |
metadata: | |
labels: | |
name: iis | |
name: iis | |
namespace: default | |
spec: | |
containers: | |
- image: microsoft/iis |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -LO https://get.docker.com/builds/Linux/x86_64/docker-17.05.0-ce.tgz | |
tar -xvf docker-17.05.0-ce.tgz | |
cp -r docker/* /usr/local/bin | |
/etc/init.d/docker restart | |
docker version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
web: # Container Name | |
build: . # Build | |
links: # Links | |
- elasticsearch | |
ports: # Ports | |
- 3000 | |
environment: # Environment | |
VIRTUAL_HOST: ’www.katacoda.com' | |
NODE_ENV: 'production’ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# this config needs haproxy-1.1.28 or haproxy-1.2.1 | |
global | |
log 127.0.0.1 local0 | |
log 127.0.0.1 local1 notice | |
#log loghost local0 info | |
maxconn 4096 | |
#chroot /usr/share/haproxy | |
user haproxy | |
group haproxy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright (c) 2017 Uber Technologies, Inc. | |
// | |
// Permission is hereby granted, free of charge, to any person obtaining a copy | |
// of this software and associated documentation files (the "Software"), to deal | |
// in the Software without restriction, including without limitation the rights | |
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
// copies of the Software, and to permit persons to whom the Software is | |
// furnished to do so, subject to the following conditions: | |
// | |
// The above copyright notice and this permission notice shall be included in |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM katacoda/tensorflow-serving-devel:latest | |
WORKDIR /serving | |
EXPOSE 9000 | |
CMD ["bazel-bin/tensorflow_serving/model_servers/tensorflow_model_server", "--port=9000", "--model_name=inception", "--model_base_path=inception-export"] | |
# Client Example | |
# bazel-bin/tensorflow_serving/example/inception_client --server=localhost:9000 --image=/path/to/my_cat_image.jpg | |
COPY . /serving | |
RUN cd /serving/tensorflow && \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<connectionStrings> | |
<add name="ApplicationServices" connectionString="Data Source=nerddinnerdb,1433;User Id=sa;Password=p@sSw0rd1sl0ngY0;" providerName="System.Data.SqlClient"/> | |
<add name="NerdDinnerEntities" connectionString="metadata=res://*/Models.NerdDinner.csdl|res://*/Models.NerdDinner.ssdl|res://*/Models.NerdDinner.msl;provider=System.Data.SqlClient;provider connection string="Data Source=nerddinnerdb,1433;User Id=sa;Password=p@sSw0rd1sl0ngY0;MultipleActiveResultSets=True"" providerName="System.Data.EntityClient" /> | |
<add name="ELMAH.SQLite" connectionString="Data Source=|DataDirectory|errors.s3db"/> | |
</connectionStrings> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
variables: | |
IMAGE_NAME: https://HOST2_SUBDOMAIN-80-KATACODA_HOST.environments.katacoda.com/root/front-end | |
TAG: $CI_BUILD_ID | |
stages: | |
- build | |
- push | |
- cleanup | |
build_production: | |
stage: build | |
script: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fs = require('fs'); | |
var jwt = require('jsonwebtoken'); | |
var token = jwt.sign({ foo: 'bar' }, 'blah'); | |
var decoded = jwt.verify(token, 'blah'); | |
console.log("Decodable at https://jwt.io/#debugger", token, decoded.foo); // bar | |
// invalid token - synchronous | |
try { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
exports.ensureAuthenicated = function(req, res, next) { | |
if (req.isAuthenticated()) { return next(); } | |
res.redirect('/login') | |
} |