This file contains hidden or 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 request = require('request'); | |
| var cheerio = require('cheerio'); | |
| var fs = require('fs'); | |
| var async = require('async'); | |
| var zlib = require('zlib'); | |
| var dealsUri = "https://www.microsoft.com/en-us/store/collections/redstripedeals/pc"; | |
| var baseUri = "http://microsoft.com"; | |
| var output = []; | |
| var outputFilename = "redstripedeals.json"; |
This file contains hidden or 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 WebViewExtensions | |
| { | |
| /// <summary> | |
| /// Using a DependencyProperty as the backing store for Content Uri. This binding Content Uri. | |
| /// </summary> | |
| public static readonly DependencyProperty InvokeScriptProperty = DependencyProperty.RegisterAttached( | |
| "InvokeScript", | |
| typeof(string), | |
| typeof(WebViewExtensions), |
This file contains hidden or 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
| { | |
| "languageModel": { | |
| "types": [ | |
| { | |
| "name": "CatchAllSlotType", | |
| "values": [ | |
| { | |
| "id": null, | |
| "name": { | |
| "value": "test", |
This file contains hidden or 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
| using System; | |
| using System.Net; | |
| [FunctionName("GetEnvironmentVariables")] | |
| public static void Run(TimerInfo myTimer, TraceWriter log) | |
| { | |
| log.Info($"C# Timer trigger function executed at: {DateTime.Now}"); | |
| string username = GetEnvironmentVariable("Webhook_Username"); | |
| string password = GetEnvironmentVariable("Webhook_Password"); |
This file contains hidden or 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
| {{> header.mustache}} | |
| <h1>WindowsArea.de News</h1> | |
| <ul> | |
| {{#news}} | |
| <li><a href="{{link}}" target="_blank">{{title.rendered}}</a></li> | |
| {{/news}} | |
| </ul> | |
| <h1>My Links</h1> |
This file contains hidden or 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 getData(){ | |
| context.log('get data'); | |
| var options = { | |
| url: 'https://windowsarea.de/wp-json/wp/v2/posts', | |
| method: 'GET', | |
| json: true | |
| } | |
| request(options, function (error, response, data) { |
This file contains hidden or 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 prepareTemplates(){ | |
| context.log('prepare Templates'); | |
| mu.compileText('header.mustache', context.bindings.headerTemplate, function () { | |
| mu.compileText('footer.mustache', context.bindings.footerTemplate, function () { | |
| renderSite(); | |
| }); | |
| }); | |
| } | |
This file contains hidden or 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 renderSite(){ | |
| context.log("render site"); | |
| var pageFile = ""; | |
| mu.compileText('index.mustache', context.bindings.indexTemplate, function (err, parsed) { | |
| var renderstream = mu.render(parsed, { news: mynews, links: mylinks }); | |
| renderstream.on('data', function (data) { | |
| pageFile += data; | |
| }); | |
| renderstream.on('end', function (data) { | |
| context.log("done creating index.html"); |
This file contains hidden or 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 uploadSite(page){ | |
| context.log("Upload site "); | |
| var blobService = storage.createBlobService(); | |
| // create $web container | |
| blobService.createContainerIfNotExists('$web', function(){ | |
| // upload index.html to $web container | |
| const options = { contentSettings: { contentType: 'text/html' } } | |
| blobService.createBlockBlobFromText("$web", "index.html", page, options, function (error) { |
This file contains hidden or 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
| const azure = require('azure-storage'); | |
| const tableService = azure.createTableService(); | |
| const tableName = "mytable"; | |
| module.exports = function (context, req) { | |
| context.log('Start ItemRead'); | |
| const id = req.query.id; | |
| if (id) { |
OlderNewer