Skip to content

Instantly share code, notes, and snippets.

Atif Aziz atifaziz

Block or report user

Report or block atifaziz

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@simonbondo
simonbondo / convert-svn2git.ps1
Created Nov 26, 2019
Converts a collection of projects from a SVN mono-repo to separate git repos.
View convert-svn2git.ps1
# Where svn.exe can be found
$svnPath = 'C:\Data\svn'
# Where the resulting git repositories should be created
$gitRepoPath = 'C:\Data\svn\git'
# The branch that should become the default branch in the git repository
$defaultBranch = 'trunk'
$removeTempRepository = $true
# The URL to the SVN server (can be file:///)
$svnRepoUrl = 'file:///c:\Data\svn\SVNRepo'
# The relative paths of each project inside the SVN repository, where 'trunk', 'branches' and 'tags' folders can be found
@shawty
shawty / instructions.txt
Created Apr 24, 2019
Instructions on how to get the latest dotnet core 3 (as of 24th April 2019) and Blazor running on a Raspberry PI
View instructions.txt
First things first, make sure your Raspberry PI has the latest updates for Raspbian on by running
sudo apt-get -y update
sudo apt-get -y upgrade
Also make sure that your running this on a version 2 raspberry PI or higher (I tested this on a Quad Core V3 B+, and a V2 PI Zero)
This will NOT WORK on any PI model that's older, I tried it on an original V1 and to say it wasn't happy, was an understatement :-)
Right, prerequisates:
@cocowalla
cocowalla / Debouncer.cs
Last active Mar 13, 2019
Simple debounce
View Debouncer.cs
using System;
using System.Threading;
using System.Threading.Tasks;
namespace MyNamespace
{
public class Debouncer : IDisposable
{
private readonly CancellationTokenSource cts = new CancellationTokenSource();
private readonly TimeSpan waitTime;
@dadhi
dadhi / index.md
Last active Mar 11, 2019
Discriminated Union or ADT Sum-type in C#
View index.md
@dadhi
dadhi / Lens.cs
Last active Jan 21, 2019
Functional optics, e.g. Lens, in C# - to simplify access and modification for deep part of immutable value
View Lens.cs
/*
Inspired by: https://medium.com/@gcanti/introduction-to-optics-lenses-and-prisms-3230e73bfcfe
*/
using System;
using static System.Console;
public static class Program
{
public static void Main()
@dadhi
dadhi / FreeIOMonad.cs
Last active Sep 7, 2019
Example of Free IO monad in pure C# with separated re-usable monad implementation
View FreeIOMonad.cs
/*
Modified from the original https://gist.github.com/louthy/524fbe8965d3a2aae1b576cdd8e971e4
- removed dependency on [language-ext](https://github.com/louthy/language-ext)
- separated monadic boilerplate, so you may concentrate on describing the operations and interpretation of the program
- removed `IO<A>.Faulted` to simplify the examples. It can be added back in straightforward manner.
Useful links:
- [John DeGoes: Beyond Free Monads - λC Winter Retreat 2017](https://www.youtube.com/watch?v=A-lmrvsUi2Y)
- [Free and tagless compared - how not to commit to a monad too early](https://softwaremill.com/free-tagless-compared-how-not-to-commit-to-monad-too-early)
@FransBouma
FransBouma / StringBuilderCache.cs
Created Dec 4, 2017
Adjusted StringBuilderCache, which caches 4 string builders at once
View StringBuilderCache.cs
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
/*============================================================
**
** Class: StringBuilderCache
**
** Purpose: provide a cached reusable instance of stringbuilder
View CSharp Free Monad.cs
//
// See https://github.com/louthy/language-ext
//
using System;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using LanguageExt;
using static LanguageExt.Prelude;
@egmontkob
egmontkob / Hyperlinks_in_Terminal_Emulators.md
Last active Dec 2, 2019
Hyperlinks in Terminal Emulators
View Hyperlinks_in_Terminal_Emulators.md
View TaskTupleExtensions.cs
using System;
using System.Runtime.CompilerServices;
using System.Threading.Tasks;
public static class TaskTupleExtensions
{
#region (Task<T1>)
public static TaskAwaiter<T1> GetAwaiter<T1>(this ValueTuple<Task<T1>> tasks)
{
You can’t perform that action at this time.