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
$rsgName = "xxxxx" | |
$appName = "xxxxx" | |
$slotName = "xxxxxx" | |
$destination = Get-AzureRmWebApp -ResourceGroupName $rsgName -Name $appName | |
$destinationAppSettings = $destination.SiteConfig.AppSettings | |
$destinationConnectionStrings = $destination.SiteConfig.ConnectionStrings | |
$source = Get-AzureRmWebAppSlot -ResourceGroupName $rsgName -Name $appName -Slot $slotName | |
$sourceAppSettings = $source.SiteConfig.AppSettings |
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
function stripMeta(doc) { | |
var metaProps = ["_rid", "_ts", "_self", "_etag", "_attachments"]; | |
var newDoc = {}; | |
for(var prop in doc) { | |
if (metaProps.indexOf(prop) == -1) { | |
newDoc[prop] = doc[prop]; | |
} | |
} | |
return newDoc; |
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
<# | |
.Synopsis | |
Short description | |
.DESCRIPTION | |
Long description | |
.EXAMPLE | |
Example of how to use this cmdlet | |
.EXAMPLE | |
Another example of how to use this cmdlet | |
#> |
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
namespace Naos.Foundation.Infrastructure | |
{ | |
using System; | |
using System.Collections.Generic; | |
using System.Linq.Expressions; | |
using System.Net; | |
using System.Threading.Tasks; | |
using EnsureThat; | |
using Humanizer; | |
using Microsoft.Azure.Cosmos; |
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
import os | |
from datetime import * | |
class FilesFilter(): | |
""" | |
filter to get file list in a folder, which file modification time between[start_date,end_date] | |
""" | |
@staticmethod | |
def get_files_list(path_to_folder,start_date=None,end_date=None): | |
file_list = [] |
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
{ | |
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", | |
"contentVersion": "1.0.0.0", | |
"parameters": { | |
"appServiceName": { | |
"type": "string", | |
"minLength": 1 | |
}, | |
"appServiceSkuName": { | |
"type": "string", |
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
// store our master key for documentdb | |
var mastKey = postman.getEnvironmentVariable("CosmosDBMasterKey"); | |
console.log("mastKey = " + mastKey); | |
// store our date as RFC1123 format for the request | |
var today = new Date(); | |
var UTCstring = today.toUTCString(); | |
postman.setEnvironmentVariable("RFC1123time", UTCstring); | |
// Grab the request url |
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
General | |
https://blog.codepen.io/radio/ | |
http://softwareengineeringdaily.com/ | |
http://spec.fm/ | |
https://syntax.fm/ | |
http://www.codingblocks.net/ | |
http://devhell.info/ | |
http://www.fullstackradio.com/ | |
https://www.functionalgeekery.com/ | |
http://reactive.audio/ |
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
public static class Cosmosscale | |
{ | |
[FunctionName("Cosmosscale")] | |
public static async Task<IActionResult> Run( | |
[HttpTrigger(AuthorizationLevel.Function, "get", "post", Route = null)] HttpRequest req, | |
ILogger log, | |
ExecutionContext context) | |
{ | |
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
//5) Get the RU increment from AppSettings and parse to an int | |
if (int.TryParse(config["CosmosDB_RU"], out int RUIncrement)) | |
{ | |
//5.a) create the new offer with the throughput increment added to the current throughput | |
int newThroughput = throughputCurrent + RUIncrement; | |
offer = new OfferV2(offer, newThroughput); | |
//5.b) persist the changes | |
await client.ReplaceOfferAsync(offer); | |
log.LogInformation(string.Format("New provisioned througput: {0} RU", newThroughput.ToString())); |