Skip to content

Instantly share code, notes, and snippets.

@beliy26
beliy26 / web.config
Created May 27, 2019 18:29 — forked from fredrik-lundin/web.config
web.config rewrite all requests to index.html
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="redirect all requests" stopProcessing="true">
<match url="^(.*)$" ignoreCase="false" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" pattern="" ignoreCase="false" />
</conditions>
<action type="Rewrite" url="index.html" appendQueryString="true" />
@beliy26
beliy26 / DomainUser
Created December 11, 2014 11:00
DomainUser class
public static class DomainUser
{
/// <summary>
/// Method return true if user is domain user or false if is not domain user. Method return null if program run as local user
/// </summary>
/// <param name="username"></param>
/// <param name="domainServerName"></param>
/// <returns></returns>
public static bool? IsDomainUser(string username, string domainServerName)
{
@beliy26
beliy26 / gist:c9ddbd33e5eaf94285e5
Last active March 23, 2021 20:10
Image to text
using System;
using System.Drawing;
using System.Drawing.Imaging;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
@beliy26
beliy26 / Test task
Created August 18, 2014 15:04
Test task
using System;
using System.IO;
using System.Linq;
namespace TestApplication
{
class Program
{
static void Main(string[] args)
{