Skip to content

Instantly share code, notes, and snippets.

@0xjac
0xjac / private_fork.md
Last active May 25, 2024 01:13
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare git@github.com:usi-systems/easytrace.git

@regisdiogo
regisdiogo / Startup.cs
Last active June 13, 2022 11:17
ASP.NET Core - Json serializer settings Enum as string and ignore null values
public class Startup
{
public IServiceProvider ConfigureServices(IServiceCollection services)
{
services.AddMvc().AddJsonOptions(options =>
{
options.SerializerSettings.Converters.Add(new Newtonsoft.Json.Converters.StringEnumConverter());
options.SerializerSettings.NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore;
});
}
@huanlin
huanlin / ASP.NET URL and Path.txt
Last active February 18, 2019 02:22
ASP.NET URL and Path related methods.
Related Properties
- HttpRuntime.AppDomainAppVirtualPath
- Request.ApplicationPath
Methods for getting physical file path:
- System.Web.HttpContext.Current.Server.MapPath()
Methods for generating content URL:
@jbrinkman
jbrinkman / HttpModuleBase
Created June 27, 2013 21:50
This is a simple base implementation for HTTPModules to inherit from. It exposes the application start and module initialization methods.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace DotNetNuke.Components
{
public abstract class HttpModuleBase : IHttpModule
{
#region Static privates