Skip to content

Instantly share code, notes, and snippets.

:octocat:
coding...

mohamedelagamy mohamedagamy

  • Cairo
Block or report user

Report or block mohamedagamy

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View ImageLoadingBugSolver.java
//https://stackoverflow.com/questions/39374227/how-to-load-all-the-images-in-the-background-of-a-recyclerview-in-android
public class PreCachingLayoutManager extends LinearLayoutManager {
private static final int DEFAULT_EXTRA_LAYOUT_SPACE = 600;
private int extraLayoutSpace = -1;
private Context context;
public PreCachingLayoutManager(Context context) {
super(context);
this.context = context;
@mohamedagamy
mohamedagamy / installing-postman.md
Created Jan 30, 2019 — forked from invinciblycool/installing-postman.md
Installing Postman on Ubuntu/Gnome
View installing-postman.md

Since Chrome apps are now being depracated. Download postman from https://dl.pstmn.io/download/latest/linux

Installing Postman

tar -xzf Postman-linux-x64-5.3.2.tar.gz

If any version is installed before, remove it.

sudo rm -rf /opt/Postman
View AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk android:minSdkVersion="8"/>
<uses-permission android:name="android.permission.READ_CONTACTS" />
<application android:label="@string/app_name">
@mohamedagamy
mohamedagamy / OpenWithSublimeText3.bat
Created Aug 27, 2016 — forked from roundand/OpenWithSublimeText3.bat
Open folders and files with Sublime Text 3 from windows explorer context menu (tested in Windows 7)
View OpenWithSublimeText3.bat
@echo off
SET st3Path=C:\Program Files\Sublime Text 3\sublime_text.exe
rem add it for all file types
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3" /t REG_SZ /v "" /d "Open with Sublime Text 3" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3" /t REG_EXPAND_SZ /v "Icon" /d "%st3Path%,0" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3\command" /t REG_SZ /v "" /d "%st3Path% \"%%1\"" /f
rem add it for folders
@reg add "HKEY_CLASSES_ROOT\Folder\shell\Open with Sublime Text 3" /t REG_SZ /v "" /d "Open with Sublime Text 3" /f
@mohamedagamy
mohamedagamy / Method 1
Created Aug 13, 2016 — forked from udacityandroid/Method 1
Android Development for Beginners : Define a Method
View Method 1
private String createCalendarEventReminder(String eventName, String location, int minutesAway) {
String reminder = "You have an upcoming event in " + minutesAway + " minutes.";
reminder = reminder + " It is " + eventName + " held at " + location + ".";
return reminder;
}
@mohamedagamy
mohamedagamy / Option A
Created Aug 13, 2016 — forked from udacityandroid/Option A
Android Development for Beginners : Calculate the Price Method
View Option A
/**
* Calculates the price of the order based on the current quantity.
*
* @return the price
*/
private int calculate price(int quantity {
int price = quantity * 5;
return price;
}
You can’t perform that action at this time.