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 RedditPoller | |
{ | |
[FunctionName("TimerTriggerCSharp")] | |
public static void Run([TimerTrigger("0 */1 * * * *")]TimerInfo myTimer, TraceWriter log) | |
{ | |
string url = "https://www.reddit.com/r/azure/new/.json"; | |
List<Child> children = new List<Child>(); | |
WebClient client = new WebClient(); |
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 { HttpRequest, HttpHandler, HttpEvent, HttpInterceptor } from '@angular/common/http'; | |
import { Injectable } from '@angular/core'; | |
import { Observable } from 'rxjs/Observable'; | |
@Injectable() | |
export class JWTInterceptor implements HttpInterceptor { | |
intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> { | |
if (req.method === 'DELETE' || req.method === 'POST' || req.method === 'PUT') { | |
let currentUser = JSON.parse(localStorage.getItem('currentUser')); |
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 Submit | |
{ | |
[FunctionName("Submit")] | |
public static async Task<IActionResult> Run( | |
[HttpTrigger(AuthorizationLevel.Function, "get", "post", Route = null)] HttpRequest req, | |
ILogger log) | |
{ | |
// Getting Form Data items from Request | |
var from = req.Form["fromEmail"].ToString(); | |
var fromName = req.Form["fromName"].ToString(); |
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
System.Diagnostics.Process process = new System.Diagnostics.Process(); | |
string WorkingDirectoryInfo = @"D:\home\site\wwwroot\"; | |
string ExeLocation = @"D:\home\site\wwwroot\gitWork.cmd"; | |
Process proc = new Process(); | |
ProcessStartInfo info = new ProcessStartInfo(); | |
try | |
{ | |
info.WorkingDirectory = WorkingDirectoryInfo; | |
info.FileName = ExeLocation; |
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
using Octokit; | |
using System; | |
using System.Threading.Tasks; | |
using System.Diagnostics; | |
namespace UpdateGitHub | |
{ | |
class Program | |
{ |
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
@using Microsoft.AspNetCore.Authentication | |
@model TrafficViewModel | |
<div class="demo-section k-content wide"> | |
@(Html.Kendo().Chart(Model.CloneSummary.Clones) | |
.Name("chart") | |
.Title("Internet Users in United States") | |
.Legend(legend => legend.Visible(false)) | |
.Series(series => { |
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
var credential = new AzureCliCredential(); | |
ArmClient armClient = new ArmClient(credential); | |
var subscriptions = armClient.GetSubscriptions(); | |
var sub = subscriptions.Where(a => a.Data.SubscriptionGuid == mySubId).FirstOrDefault(); | |
var creds = new AzureIdentityFluentCredentialAdapter(sub.Data.TenantId, AzureEnvironment.AzureGlobalCloud); | |
// fails here | |
var websites = await Azure.Authenticate(creds) | |
.WithSubscription(sub.Data.DisplayName) | |
.WebApps.ListByResourceGroupAsync(rgName); |
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
using Microsoft.AspNetCore.Builder; | |
using Microsoft.AspNetCore.Hosting; | |
using Microsoft.AspNetCore.Http; | |
using Microsoft.AspNetCore.Http.Features; | |
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Text; | |
using System.Threading.Tasks; |
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
STACK_VERSION=8.2.0-8ea0c40f | |
ELASTIC_PASSWORD=changeme | |
KIBANA_PASSWORD=changeme | |
ES_PORT=9200 | |
CLUSTER_NAME=es-cluster | |
LICENSE=basic | |
MEM_LIMIT=1073741824 | |
KIBANA_PORT=5601 | |
ENTERPRISE_SEARCH_PORT=3002 | |
ENCRYPTION_KEYS=secret |
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
@page "/Account/Manage" | |
@using System.ComponentModel.DataAnnotations | |
@using Microsoft.AspNetCore.Identity | |
@using Scheduler.Data | |
@inject UserManager<ApplicationUser> UserManager | |
@inject SignInManager<ApplicationUser> SignInManager | |
@inject IdentityUserAccessor UserAccessor | |
@inject IdentityRedirectManager RedirectManager |
OlderNewer