Skip to content

Instantly share code, notes, and snippets.

View OmidID's full-sized avatar
💭
Avalonia MVP

Omid Mafakher OmidID

💭
Avalonia MVP
View GitHub Profile
@AveYo
AveYo / .. MediaCreationTool.bat ..md
Last active June 29, 2024 01:12
Universal MediaCreationTool wrapper for all MCT Windows 10 versions - MOVED TO github.com/AveYo/MediaCreationTool.bat
@OmidID
OmidID / TaskPool.cs
Last active March 7, 2024 18:15
C# Task Pool
using System.Collections.Concurrent;
/// <summary>
/// TaskPool class that help you to execute async task in pool
/// </summary>
/// <remarks>
/// https://gist.github.com/OmidID/da234a6cfbacebbd46defdb71c6cf95e
/// </remarks>
public class TaskPool(int threadsMaxCount)
{
@OmidID
OmidID / JSONHelper.java
Last active August 31, 2017 13:48
JSONHelper to manage Json value from JSONObject more easy and relax
package com.omidid.utils;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
/**
* Created by OmidID on 8/22/2017.
*/
@SuperJMN
SuperJMN / Viewbox.cs
Last active October 1, 2018 08:26
AvaloniaUI's Viewbox
using Avalonia;
using Avalonia.Controls;
using Avalonia.Media;
using static System.Math;
public class Viewbox : Decorator
{
private IControl Root => Child;
protected override Size MeasureOverride(Size constraint)
@skylord123
skylord123 / gist:892b6e30b724b81a8a48
Created November 11, 2015 05:38
Linux machine to chromcast server
Following is taken from: https://plus.google.com/111475821387295047208/posts/KDEfS6S2hyk
-------------------------
How to turn your Linux machine into a Chromecast Server
Stream YouTube, Netflix, Hulu, Etc. from your smartphone or tablet onto your server or laptop. ...without buying Chromecast hardware...
Prerequisite- Install Google Chrome on your Desktop. Install Chromecast application onto your portable device.
@foofoodog
foofoodog / Octo.cs
Last active January 22, 2022 09:25
Read only C# wrapper for OctoPrint API
/*
// OctoPrint API wrapper
// csc /target:library Octo.cs /r:System.Net.Http.dll
// linqpad
var server = "http://localhost:5000";
// print3r.Reader<print3r.Logs.Result>.Read(server).Dump();
// print3r.Reader<print3r.Connection.Result>.Read(server).Dump();
// print3r.Reader<print3r.Files.Result>.Read(server).Dump();
// print3r.Reader<print3r.Job.Result>.Read(server).Dump();
// print3r.Reader<print3r.Printer.Result>.Read(server).Dump();