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 class CsvFileActionResult<T> : System.Web.Mvc.ActionResult | |
| { | |
| public string FileName { get; set; } | |
| public IEnumerable<T> List { get; set; } | |
| protected virtual void Write(IEnumerable<T> list, TextWriter output) | |
| { | |
| PropertyDescriptorCollection props = TypeDescriptor.GetProperties(typeof(T)); | |
| foreach (PropertyDescriptor prop in props) |
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
| /// <summary> | |
| /// Database Initializer that will Drop/Create databases that are currently in use | |
| /// </summary> | |
| /// <typeparam name="TContext">Data Context</typeparam> | |
| public class ForceDeleteInitializer<TContext> : IDatabaseInitializer<TContext> where TContext : DbContext | |
| { | |
| private readonly IDatabaseInitializer<TContext> _initializer; | |
| public ForceDeleteInitializer() | |
| { |
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 class HandlebarHelper | |
| { | |
| public static void RegisterHelper() | |
| { | |
| RegisterArrayContainsHelper(); | |
| } | |
| /// <summary> | |
| /// {{#arrayContains List<> limit}} | |
| /// ... if condition true |
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 Newtonsoft.Json; | |
| using System; | |
| using System.Collections.Generic; | |
| using System.Configuration; | |
| using System.Diagnostics; | |
| using System.IO; | |
| using System.Linq; | |
| using System.Net; | |
| using System.Text.RegularExpressions; | |
| using System.Web; |
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
| /// <summary> | |
| /// Verify that all request to api must contain apikey | |
| /// </summary> | |
| public class APIKeyHandler : DelegatingHandler | |
| { | |
| private string APIToken = "apiKey"; | |
| protected override System.Threading.Tasks.Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, System.Threading.CancellationToken cancellationToken) | |
| { | |
| if (request.Method == HttpMethod.Options) goto success; |
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
| import { BrowserModule } from '@angular/platform-browser'; | |
| import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; | |
| import { NgModule, ErrorHandler } from '@angular/core'; | |
| import { ToastrModule, ToastContainerModule } from 'ngx-toastr'; | |
| import { AppRoutingModule } from './app.routing.module'; | |
| import { CoreModule } from './core/core.module'; | |
| import { AppComponent } from './app.component'; | |
| import { GlobalErrorHandler } from './error-handler.service'; | |
| import { AppRootLoaderComponent } from './content-loader.component'; |
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
| # Sample Logstash configuration for creating a simple | |
| # Beats -> Logstash -> Elasticsearch pipeline. | |
| input { | |
| beats { | |
| port => 5044 | |
| } | |
| } | |
| filter | |
| { |
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 stsEndpoint = pm.variables.get("STSEndpoint"); | |
| const clientCredentialBase64Encode = pm.variables.get("clientSecret64Encode"); | |
| const scopes = pm.variables.get("scopes"); | |
| let getToken = true; | |
| const tokenEndpoint = stsEndpoint + '/connect/token'; | |
| if (!pm.variables.get('token')) { | |
| console.log('Token missing'); | |
| } else { | |
| getToken = false; |
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 (window, document) { | |
| var state = { | |
| mouseUsage: false, | |
| focusClass: 'focus-class', | |
| documentBody: document.body | |
| } | |
| var controller = { |