Skip to content

Instantly share code, notes, and snippets.

View akamud's full-sized avatar
👳‍♂️

Mahmoud Ali akamud

👳‍♂️
View GitHub Profile
@smitpatel
smitpatel / MultiLevelIncludeQueries.cs
Last active October 15, 2021 17:39
This app shows how to do split queries for multiple levels of collection include in EF Core 3.0
using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.EntityFrameworkCore;
namespace EFSampleApp
{
public class Program
{
public static void Main(string[] args)
namespace GlobalHotKey
{
public class GlobalKeyboardHookEventArgs : HandledEventArgs
{
public GlobalKeyboardHook.KeyboardState KeyboardState { get; private set; }
public GlobalKeyboardHook.LowLevelKeyboardInputEvent KeyboardData { get; private set; }
public GlobalKeyboardHookEventArgs(
GlobalKeyboardHook.LowLevelKeyboardInputEvent keyboardData,
GlobalKeyboardHook.KeyboardState keyboardState)
@heytherewill
heytherewill / RxMappings.csv
Created March 3, 2019 20:03
Rx.NET mappings
Rx.NET name Reactive Extensions name
Observable.Return Observable.just
Select map
SelectMany flatMap
Where filter
Aggregate reduce
Debounce throttle
Synchronize serialize
using System;
using Serilog.Core;
using Serilog.Events;
// .Enrich.With(new OperationIdEnricher())
class OperationIdEnricher : ILogEventEnricher
{
public void Enrich(LogEvent logEvent, ILogEventPropertyFactory propertyFactory)
{
if (logEvent.Properties.TryGetValue("RequestId", out var requestId))
@prestia
prestia / installing_MTGA_on_macOS_with_Retina_support.md
Last active October 13, 2023 23:22
Instructions on how to install Magic the Gathering Arena on macOS with Retina support.

Installing MTGA on macOS using Wine, and making it look pretty!

The following instructions are heavily inspired by /u/uhohohdear. I modified uhohohdear's instructions and then added support for Retina/HiDPI displays and instructions about how to update MTGA.

IMPORTANT UPDATE: This will no longer work if you upgrade to macOS Catalina, as Wine and Wineskin are 32-bit. I'll update this Gist with 64-bit versions when they become available.

We're back in business!

It appears that the workarounds no longer work. A few people with Macs using Nvidia graphics cards are having success, but Macs with Intel and AMD GPUs crash regularly. At this time, the best way to play Arena on Mac is via Boot Camp or GeForce Now.

@CharlieScarver
CharlieScarver / AdventureTime.csv
Last active June 2, 2024 17:25 — forked from austinpray/AdventureTime.csv
List of important adventure time episodes
Season Episode Title Reason
1 5 The Enchiridion A good intro to the series, plus introduces the important Enchiridion
1 2 Trouble in Lumpy Space* Introduces LSP (episode out of order)
1 3 Prisoners of Love Introduces Ice King and his obsession (episode out of order)
1 7 Ricardio the Heart Guy Finn and PB development, Sets a returning plot
1 8 Business Time* First mention of Ooo being post-apocalyptic
1 9 My Two Favorite People Intros the Jake and Lady Rainicorn plotline
1 10 Memories of Boom Boom Mountain A look at how Finn was adopted into Jake's Family
1 12 Evicted! Intros Marceline
@nickbutcher
nickbutcher / IconView.kt
Last active July 30, 2023 22:05
A prototype implementation of a shadow effect inspired by the Google Play Games app (https://play.google.com/store/apps/details?id=com.google.android.play.games).
/*
* Copyright 2017 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the
* License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@manishpathak99
manishpathak99 / xcode-downloader.rb
Created October 30, 2017 09:10 — forked from iandundas/xcode-downloader.rb
Script for reliably downloading binaries (e.g. Xcode) from Apple's CDN
#!/usr/bin/env ruby
print "What is the URL of your Apple Downloads resource?\nURL:"
url = gets.strip
print "What is the ADCDownloadAuth cookie token:\nADCDownloadAuth: "
token = gets.strip
command = "aria2c --header \"Host: adcdownload.apple.com\" --header \"Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\" --header \"Upgrade-Insecure-Requests: 1\" --header \"Cookie: ADCDownloadAuth=#{token}\" --header \"User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 10_1 like Mac OS X) AppleWebKit/602.2.14 (KHTML, like Gecko) Version/10.0 Mobile/14B72 Safari/602.1\" --header \"Accept-Language: en-us\" -x 16 -s 16 #{url} -d ~/Downloads"
@heytherewill
heytherewill / Observable.cs
Last active September 2, 2020 11:59
Use the common method names in Rx.Net instead of using the LINQ ones.
using System.Collections.Generic;
using System.Reactive.Concurrency;
using System.Reactive.Linq;
using System.Threading;
using System.Threading.Tasks;
namespace System.Reactive.ApiMappings
{
public static class ObservableEx
{
@jchandra74
jchandra74 / PowerShell Customization.md
Last active June 3, 2024 21:32
PowerShell, Cmder / ConEmu, Posh-Git, Oh-My-Posh, Powerline Customization

Pimping Up Your PowerShell & Cmder with Posh-Git, Oh-My-Posh, & Powerline Fonts

Backstory (TLDR)

I work as a full-stack developer at work. We are a Windows & Azure shop, so we are using Windows as our development platform, hence this customization.

For my console needs, I am using Cmder which is based on ConEmu with PowerShell as my shell of choice.

Yes, yes, I know nowadays you can use the Linux subsystem on Windows 10 which allow you to run Ubuntu on Windows. If you are looking for customization of the Ubuntu bash shell, check out this article by Scott Hanselman.