How to setup an Outline VPN Server on Ubuntu 16.04 Server
This guide will show you how to install Outline Server on an Ubuntu 16.04 Server and use Outline Manager.
Outline Manager supports Windows, macOS and Linux.
using System; | |
using System.Collections.Generic; | |
public static class Helper | |
{ | |
/// <summary> | |
/// Searches a section of the list for a given element using a binary search | |
/// algorithm. | |
/// </summary> | |
/// <param name="items">list of <see cref="TItems"/>, which must be searched within</param> |
public static class WebApiConfig | |
{ | |
public static void Register(HttpConfiguration config) | |
{ | |
config.Routes.MapHttpRoute( | |
name: "DefaultApi", | |
routeTemplate: "api/{controller}/{id}", | |
defaults: new { id = RouteParameter.Optional } | |
); |
Feel free to use this code if you are using AngularJS Framework in your application. This will help you easily create beautiful animated wizards or cover other UI scenarios that require a step-by-step interactions. Better used for single-page apps.
A Pen by Behzad Khosravifar on CodePen.
public static class IISExpress | |
{ | |
private static readonly List<string> sites = new List<string>(); | |
private static readonly List<string> paths = new List<string>(); | |
public static void StartIISExpress(string site, int port = 7329) | |
{ | |
if(!sites.Contains(site.ToLower())) | |
sites.Add(site.ToLower()); | |
else return; |
using System.Collections; | |
using System.Collections.Concurrent; | |
using System.Collections.Generic; | |
using System.Collections.Specialized; | |
using System.ComponentModel; | |
using System.Threading; | |
namespace System.Collections.Generic | |
{ | |
/// <summary> |
public static class AsyncHelper | |
{ | |
/// <summary> | |
/// Execute's an async Task method which has a void return value synchronously | |
/// </summary> | |
/// <param name="task">Task method to execute</param> | |
public static void RunSync(this Func<Task> task) | |
{ | |
var oldContext = SynchronizationContext.Current; | |
var synch = new ExclusiveSynchronizationContext(); |
public static class Extension | |
{ | |
public static IList<T> ToList<T>(this DataTable dt, bool isFirstRowColumnsHeader = false) where T : new() | |
{ | |
var results = new List<T>(); | |
if (dt != null && dt.Rows.Count > 0) | |
{ | |
var columns = dt.Columns.Cast<DataColumn>().ToList(); | |
var rows = dt.Rows.Cast<DataRow>().ToList(); |
<#@ template language="C#" debug="true" hostSpecific="true" #> | |
<#@ output extension=".cs" #> | |
<#@ Assembly Name="System.Core.dll" #> | |
<#@ assembly name="EnvDTE" #> | |
<#@ Assembly Name="System.Windows.Forms.dll" #> | |
<#@ Assembly name="System.Configuration"#> | |
<#@ import namespace="System" #> | |
<#@ import namespace="System.IO" #> | |
<#@ import namespace="System.Diagnostics" #> | |
<#@ import namespace="System.Linq" #> |
namespace Optimization.Custom | |
{ | |
using System.Collections.Generic; | |
using System.Web; | |
using System.Text; | |
using System.Web.Mvc; | |
using System.Web.Optimization; | |
using System.Web.Routing; | |
/// <summary> |