Skip to content

Instantly share code, notes, and snippets.

View mahmoud-eslami's full-sized avatar

Mahmoud Eslami mahmoud-eslami

View GitHub Profile
@PurpleBooth
PurpleBooth / README-Template.md
Last active May 9, 2025 19:51
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@uupaa
uupaa / image.resize.in.github.flavored.markdown.md
Last active April 22, 2025 11:44
image resize in github flavored markdown.

Image source

https://gyazo.com/eb5c5741b6a9a16c692170a41a49c858.png

Try resize it!

  • ![](https://gyazo.com/eb5c5741b6a9a16c692170a41a49c858.png | width=100)
@slightfoot
slightfoot / page_turn.dart
Created September 9, 2019 21:28
Page Turn Effect - By Simon Lightfoot. Replicating this behaviour. https://www.youtube.com/watch?v=JqvtZwIJMLo
// MIT License
//
// Copyright (c) 2019 Simon Lightfoot
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
@legitYosal
legitYosal / backends.py
Created May 12, 2020 15:44
Django custom authenticate backend for login user by username or email
class EmailandUsernameAuthBackend(object):
def authenticate(self, request, username=None, password=None):
try:
user = User.objects.get(Q(username=username) | Q(email=username))
if user.check_password(password):
return user
except User.DoesNotExist:
return None
def get_user(self, user_id):
@eduardoflorence
eduardoflorence / main.dart
Last active May 7, 2025 06:21
Getx - Sample Form
import 'package:flutter/material.dart';
import 'package:get/get.dart';
void main() {
runApp(GetMaterialApp(
initialRoute: '/login',
getPages: [
GetPage(
name: '/login',
page: () => LoginPage(),
@GetVladimir
GetVladimir / Force-RGB-Color-on-M1-Mac.md
Last active May 9, 2025 13:16
Force RGB Color on M1 Mac

Force RGB Color on M1 Mac

How to Force RGB Color Output instead of YPbPr on your M1 Apple Silicon Mac for an External Monitor.

This step-by-step video tutorial will guide you through the procedure of forcing RGB color output on your M1 Mac.

Force RGB Color on M1 Mac

Here is the direct link to the video tutorial: https://www.youtube.com/watch?v=Z1EqH3fd0V4

The video also has Closed Captions (Subtitles) that you can enable, to make it easier to follow if needed.

@SamadiPour
SamadiPour / aria2_retry.sh
Created August 17, 2024 19:52
A bash script for retrying the failed tasks in Aria2
#!/bin/bash
ARIA_URL="http://127.0.0.1:6800/jsonrpc"
SECRET="secret"
# Step 1: Retrieve GIDs of failed downloads
response=$(curl -s -X POST $ARIA_URL \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
@bizz84
bizz84 / update-android-project.sh
Last active May 5, 2025 06:44
Script to update Gradle, Java and other Android project settings in a Flutter project
#!/bin/bash
# Update Gradle, Java and other Android project settings in a Flutter project
# Works with both .gradle and .gradle.kts build files
# See: https://gradle.org/releases/
# See: https://developer.android.com/build/releases/gradle-plugin#compatibility
DESIRED_GRADLE_VERSION="8.11.1"
# Build errors often show the required Java version
DESIRED_JAVA_VERSION="17"
# See: https://developer.android.com/ndk/downloads