Skip to content

Instantly share code, notes, and snippets.

View jaydestro's full-sized avatar

Jay Gordon jaydestro

View GitHub Profile
Welcome back to another episode of AzureFunBytes. Every week we dive into different Azure Fundamentals in an easy to understand Twitch show.
This week, all the way from Scotland, @TechieLass will help me solve three problems on twitch!
How do we start a new Win VM?
How do we prep this VM for prod?
How do we handle cost management?
Sarah and I will discuss her tenure in technology with me and even answer some questions.
Demo – get the code here
https://cda.ms/1gR
Sign up for 12 months free Azure
https://cda.ms/1dc
@jaydestro
jaydestro / gist:d0cbfb891a8a1381c8e84dd132904f33
Created April 30, 2020 15:20
AKS Docs - Microsoft Azure
Kubernetes Learning Path v2.0
- https://azure.microsoft.com/en-us/resources/kubernetes-learning-path/?WT.mc_id=code-github-jagord
Administer containers in Azure - https://docs.microsoft.com/en-us/learn/paths/administer-containers-in-azure/?WT.mc_id=code-github-jagord
Supported Kubernetes versions in Azure Kubernetes Service (AKS) - https://docs.microsoft.com/en-us/azure/aks/supported-kubernetes-versions?WT.mc_id=code-github-jagord
Azure Kubernetes Service (AKS)
- https://docs.microsoft.com/en-us/azure/aks/?WT.mc_id=code-github-jagord
require 'mongo' # requires mongoid to be installed
Mongo::Logger.logger.level = ::Logger::FATAL # provides logging output for fails
client = Mongo::Client.new( 'mongodb+srv://admin:xxxxxxx@prod-db-dylzy.mongodb.net/hackathon?retryWrites=true' )
#client.collections.each { |coll| puts coll.name } # does a loop on listing each collection in database and then prints them to standard out
cursor = client[:products].find
cursor.each do |doc|
require 'mongo' # requires mongoid to be installed
Mongo::Logger.logger.level = ::Logger::FATAL # provides logging output for fails
client = Mongo::Client.new([ '127.0.0.1:27017' ], :database => 'hackathon') # establishes database connection to localhost, database name hackathon
cursor = client[:products].find
cursor.each do |doc|
puts doc
end
@jaydestro
jaydestro / ruby and mongodb
Created June 12, 2018 18:02
ruby and mongodb
require 'mongo' # requires mongoid to be installed
Mongo::Logger.logger.level = ::Logger::FATAL # provides logging output for fails
client = Mongo::Client.new([ '127.0.0.1:27017' ], :database => 'hackathon') # establishes database connection to localhost, database name hackathon
client.collections.each { |coll| puts coll.name } # does a loop on listing each collection in database and then prints them to standard out
client.close # closes database connection
@jaydestro
jaydestro / minikubedelete
Created May 31, 2018 20:04 — forked from sharepointoscar/minikubedelete
Minikube - Delete all pods from default namespace
# delete all pods
kubectl delete --all pods --namespace=default
# deete all deployments
kubectl delete --all deployments --namespace=default
# delete all services
kubectl delete --all services --namespace=default
@jaydestro
jaydestro / app.yaml
Created May 22, 2018 17:22
app.yaml
# Copyright 2017, Google, Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@jaydestro
jaydestro / Dockerfile
Created September 6, 2017 16:58
Dockerfile
FROM node:boron
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
COPY . /usr/src/app
EXPOSE 3000
CMD ["npm", "start"]
FROM node:boron
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
COPY . /usr/src/app
EXPOSE 3000
CMD ["npm", "start"]