Skip to content

Instantly share code, notes, and snippets.

View horse315's full-sized avatar
🍑

Aleksey Bogomolov horse315

🍑
View GitHub Profile
@Fuzion24
Fuzion24 / AndroidManifest.xml
Created May 6, 2012 16:53
Code that will install and remove apks from an Android device without user interaction
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.packagemanager.poc"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="8" />
<uses-permission android:name="android.permission.INSTALL_PACKAGES" />
<uses-permission android:name="android.permission.DELETE_PACKAGES" />
@aradalvand
aradalvand / QueryableExtensions.cs
Last active July 31, 2023 19:42
Solves the Hot Chocolate + EF Core + DTO overfetching problem for related entities
namespace Translator;
public static class QueryableExtensions
{
public static IQueryable<T> AsTranslatable<T>(this IQueryable<T> source)
{
if (source is TranslatableQuery<T> query)
return query;
return new TranslatableQueryProvider(source.Provider).CreateQuery<T>(source.Expression);