Skip to content

Instantly share code, notes, and snippets.

View ndc's full-sized avatar

Endy Tjahjono ndc

  • Jakarta, Indonesia
View GitHub Profile
@ndc
ndc / App.vue
Created January 5, 2020 14:18
double exclamation mark
<template>
<div id="app">
<router-view />
</div>
</template>
<style>
</style>
<script>
@ndc
ndc / ContainerServiceProvider.cs
Created September 5, 2018 07:46
Setting up dependency injection in ASP.NET WebForms (example using SimpleInjector)
using System;
using System.Collections.Generic;
using System.Linq;
namespace MyWebformApp
{
public class ContainerServiceProvider : IServiceProvider, System.Web.Hosting.IRegisteredObject
{
public ContainerServiceProvider(IServiceProvider next, Func<Type, object> resolverFunc)
{
@ndc
ndc / HFDashboardAuthFilter.cs
Created September 1, 2018 12:30
Hangfire dashboard authorization filter using basic authentication and relying on browser support to allow user to input username and password.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Hangfire.Annotations;
using Hangfire.Dashboard;
using Microsoft.AspNetCore.Http;
namespace MyApp.ScheduledTask
{