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 / readjsonfromfile.html
Created July 14, 2024 03:12
Read JSON from file
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Read JSON from file</title>
</head>
<body>
@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
{