Skip to content

Instantly share code, notes, and snippets.

View ramtinak's full-sized avatar
😤
zzzzZZZZ

Ramtin Jokar ramtinak

😤
zzzzZZZZ
View GitHub Profile
@ramtinak
ramtinak / ConcatenatedStream.cs
Created May 21, 2021 13:22
C# ConcatenatedStream
namespace StreamHelper.Streams
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Threading.Tasks;
using System.Threading;
public class ConcatenatedStream : Stream
{
Queue<Stream> _streams; // You can use Stack as well
@ramtinak
ramtinak / ThrottledStream.cs
Created May 21, 2021 13:17
C# ThrottledStream
namespace StreamHelper.Streams
{
// Modified version of https://www.codeproject.com/Articles/18243/Bandwidth-throttling
using System;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
public class ThrottledStream : Stream
{
/// <summary>
@ramtinak
ramtinak / MimeType.json
Created May 8, 2021 01:15
A sorted list of extensions by mime types in a json file
/*
A sorted json list of extensions by mime types
1275 extensions
863 mime types
Created by Ramtin Jokar [ [email protected] ]
*/
@ramtinak
ramtinak / Emoji.json
Created February 28, 2021 16:02
A tiny Json file that contains all and categorized emojis from https://unicode.org/Public/emoji/13.1
{
"SmileysAndEmotion": [
{
"Name": "GrinningFace",
"Emoji": "😀"
},
{
"Name": "GrinningFaceWithBigEyes",
"Emoji": "😃"
},
@ramtinak
ramtinak / UndoRedo.cs
Created December 29, 2020 00:30
A tiny class for adding Undo Redo option to your projects
using System;
using System.Collections.Generic;
using System.Linq;
namespace RamtinJokar
{
public class UndoRedo<T>
{
private readonly Stack<T> UndoStack;
private readonly Stack<T> RedoStack;