Skip to content

Instantly share code, notes, and snippets.

Avatar

Ben Hall BenHall

View GitHub Profile
View install-wget.ps1
Param(
[parameter(Mandatory = $true)] $ManagementIP,
[ValidateSet("l2bridge", "overlay",IgnoreCase = $true)] [parameter(Mandatory = $false)] $NetworkMode="l2bridge",
[parameter(Mandatory = $false)] $ClusterCIDR="10.244.0.0/16",
[parameter(Mandatory = $false)] $KubeDnsServiceIP="10.96.0.10",
[parameter(Mandatory = $false)] $ServiceCIDR="10.96.0.0/12",
[parameter(Mandatory = $false)] $InterfaceName="Ethernet",
[parameter(Mandatory = $false)] $LogDir = "C:\k",
[parameter(Mandatory = $false)] $KubeletFeatureGates = ""
)
View vscode-keybindings.json
// Place your key bindings in this file to overwrite the defaults
[
{
"key": "cmd+r",
"command": "workbench.action.replaceInFiles"
},
{
"key": "shift+cmd+h",
"command": "-workbench.action.replaceInFiles"
},
@BenHall
BenHall / readme.md
Last active Dec 1, 2017
Example Readme.md
View readme.md

Title

Goals

Install

Usage

View iis.yaml
apiVersion: v1
kind: Pod
metadata:
labels:
name: iis
name: iis
namespace: default
spec:
containers:
- image: microsoft/iis
@BenHall
BenHall / fix.sh
Created Jun 9, 2017
downgrade boot2docker
View fix.sh
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
View frontend.go
// 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
@BenHall
BenHall / Dockerfile
Created Apr 11, 2017
tensorflow-serving Dockerfile
View Dockerfile
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 && \
@BenHall
BenHall / ConnectionStrings.config
Created Jan 19, 2017
Deploy NerdDinner.com 2.0 as Windows Containers
View ConnectionStrings.config
<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=&quot;Data Source=nerddinnerdb,1433;User Id=sa;Password=p@sSw0rd1sl0ngY0;MultipleActiveResultSets=True&quot;" providerName="System.Data.EntityClient" />
<add name="ELMAH.SQLite" connectionString="Data Source=|DataDirectory|errors.s3db"/>
</connectionStrings>
@BenHall
BenHall / jwt.js
Created Jan 4, 2017
Json Web Tokens Example
View jwt.js
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 {
View docker-compose.yml
web: # Container Name
build: . # Build
links: # Links
- elasticsearch
ports: # Ports
- 3000
environment: # Environment
VIRTUAL_HOST: ’www.katacoda.com'
NODE_ENV: 'production’
You can’t perform that action at this time.