Skip to content

Instantly share code, notes, and snippets.

View daveRendon's full-sized avatar
🎯
Focusing

Dave Rendon daveRendon

🎯
Focusing
View GitHub Profile
@daveRendon
daveRendon / armTemplate-appServicePlan.json
Last active July 13, 2021 22:20
armTemplate-appServicePlan.json
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"webAppName": {
"type": "string",
"defaultValue": "[concat('webApp-', uniqueString(resourceGroup().id))]",
"minLength": 2,
"metadata": {
"description": "Web app name."
endpoint = 'YOUR_ENDPOINT' #Replace with your endpoint
key = 'YOUR_KEY' #Replace with your key
import json
import requests
#An array of features based on five-day weather forecast
x = [[1,1,2022,1,0,6,0,2,0.344167,0.363625,0.805833,0.160446],
[2,1,2022,1,0,0,0,2,0.363478,0.353739,0.696087,0.248539],
[3,1,2022,1,0,1,1,1,0.196364,0.189405,0.437273,0.248309],
@daveRendon
daveRendon / create-azure-machine-learning-workspace-with-datastores.bicep
Last active October 11, 2021 23:56
create-azure-machine-learning-workspace-with-datastores
@description('Specifies name of workspace to create in Azure Machine Learning workspace.')
param workspaceName string
@description('Specifies the location for all resources.')
param location string = 'eastus'
@description('Specifies the number of datastores to be created.')
param datastoreCount int = 2
@description('The name for the storage account to created and associated with the workspace.')
@daveRendon
daveRendon / deploy-log-analytics-sentinel.bicep
Created October 14, 2021 23:21
deploy-log-analytics-sentinel
param workspaceName string = 'azinsider'
param location string = resourceGroup().location
resource workspace 'Microsoft.OperationalInsights/workspaces@2020-08-01' = {
name: workspaceName
location: location
properties: {
retentionInDays: 30
sku: {
name: 'PerGB2018'
@daveRendon
daveRendon / az-public-ips.json
Created October 14, 2021 23:30
az-public-ips
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"workspaceName": {
"type": "string",
"metadata": {
"description": "Workspace name for Log Analytics where Sentinel is setup"
}
}
@daveRendon
daveRendon / consume-bicep-module-from-private-registry.bicep
Last active October 16, 2021 20:09
consume-bicep-module-from-private-registry.bicep
//parameters
param location string = 'eastus'
param ifabrik string = 'ifabrik'
//define target
targetScope = 'subscription'
//define new resoruce group
resource ifabrikRg 'Microsoft.Resources/resourceGroups@2021-04-01' = {
name: '${ifabrik}Rg'
@daveRendon
daveRendon / github-enterprise-server.bicep
Created October 19, 2021 01:35
github-enterprise-server.bicep
@description('Unique prefix for your Storage Account and VM name. Must be all lower case letters or numbers. No spaces or special characters.')
param accountPrefix string
@description('Username for the VM. This value is ignored.')
param adminUsername string
@description('VM Size. Select an ES v3 Series VM with at least 32 GB of RAM. Default value: Standard_E4s_v3')
param vmSize string = 'Standard_E4s_v3'
@description('Select a Premium Storage disk capacity for your source code, in GB. Default value: 512.')
@daveRendon
daveRendon / install_apache.sh
Created October 20, 2021 00:53
install_apache.sh
#!/bin/bash
dpkg --configure -a
apt-get -y update
# install Apache2
apt-get -y install apache2
apt-get -y install mysql-server
apt-get -y install php libapache2-mod-php php-mysql
# write some HTML
echo \<center\>\<h1\>My Demo App\</h1\>\<br/\>\</center\> > /var/www/html/demo.html
@daveRendon
daveRendon / deploy-apache-webserver-ubuntu.bicep
Created October 20, 2021 01:46
deploy-apache-webserver-ubuntu.bicep
@description('Unique DNS Name for the Storage Account where the Virtual Machine\'s disks will be placed.')
param newStorageAccountName string
@description('User name for the Virtual Machine.')
param adminUsername string
@description('Unique DNS Name for the Public IP used to access the Virtual Machine.')
param dnsNameForPublicIP string
@allowed([
@daveRendon
daveRendon / mongodb-on-ubuntu.bicep
Created October 20, 2021 21:04
mongodb-on-ubuntu.bicep
@description('DNS Name for Public IP')
param dnsNameForPublicIP string
@description('Admin Username')
param adminUsername string
@description('Image Publisher')
param imagePublisher string = 'Canonical'
@description('Image Offer')