Skip to content

Instantly share code, notes, and snippets.

@a7madev
a7madev / Android Retrofit.md
Last active December 25, 2015 19:10
Android Retrofit
  1. Retrofit http://square.github.io/retrofit/
  2. Simple HTTP with Retrofit 2 https://realm.io/news/droidcon-jake-wharton-simple-http-retrofit-2/
  3. Consuming APIs with Retrofit https://github.com/codepath/android_guides/wiki/Consuming-APIs-with-Retrofit
  4. Retrofit - YouTube: https://www.youtube.com/watch?v=3WONuRSUHmw
  5. Retrofit 2.0: The biggest update yet on the best HTTP Client Library for Android http://inthecheesefactory.com/blog/retrofit-2.0/en
  6. Retrofit Tutorial for Android: https://www.youtube.com/watch?v=3cN6aJmwMAg
  7. CONSUMING REST API WITH RETROFIT 2.0 IN ANDROID http://www.iayon.com/consuming-rest-api-with-retrofit-2-0-in-android/
  8. Retrofit 2 — Upgrade Guide from 1.9 https://futurestud.io/blog/retrofit-2-upgrade-guide-from-1-9
  9. Retrofit — Getting Started and Create an Android Client https://futurestud.io/blog/retrofit-getting-started-and-android-client
@a7madev
a7madev / Android - JSON.java
Last active December 29, 2015 18:39
Get JSON Array from a webpage using Android Asynchronous Http Client http://loopj.com/android-async-http/
try {
RequestParams rParams = new RequestParams(); //if you have parameters to POST
rParams.put("example", "example"); //if you have parameters to POST
AsyncHttpClient client = new AsyncHttpClient();
client.get(pageURL, rParams, new JsonHttpResponseHandler() {
@Override
public void onSuccess(JSONArray jsonArray) {
super.onSuccess(jsonArray);
@a7madev
a7madev / Android-DebugAndProBuilds.gradle
Created January 2, 2016 11:13
How to have debug, beta and prod builds installed at the same time
defaultConfig {
resValue "string", "app_name", "MyApp"
}
buildTypes {
debug {
applicationIdSuffix = ".debug"
testCoverageEnabled = "true"
resValue "string", "app_name", "MyApp DEBUG"
}
@a7madev
a7madev / Edit_Windows_Hosts_File.cmd
Last active January 16, 2016 10:24
Windows - Edit Hosts File
copy %systemroot%\system32\drivers\etc\hosts "C:\Users\a7madev\Desktop"
echo >> C:\Users\a7madev\Desktop\hosts
copy "C:\Users\a7madev\Desktop\hosts" %systemroot%\system32\drivers\etc\
@a7madev
a7madev / SSH - Login without password.command
Created January 17, 2016 07:00
SSH - Login without password
brew install ssh-copy-id
ssh-copy-id root@161.202.176.248
@a7madev
a7madev / Android-Libs.md
Last active March 29, 2016 13:26
Android Libs
compile 'com.parse.bolts:bolts-android:1.+'
compile 'com.parse:parse-android:1.+'
compile 'com.squareup.okhttp3:okhttp:3.+'
<?php
// Blade if statement
@if()
@elseif()
@else
@endif
// Text Placeholder
@a7madev
a7madev / PHP-xdebug.md
Last active July 15, 2016 09:30
PHP and xdebug

PHP xdebug on OS X

PHP xdebug on Windows

XAMPP

  1. Open php.ini from XAMPP Control Panel
  2. Uncomment xdebug section
  3. Restart XAMPP Apache
  4. . Go to PHPStorm, open settings and select PHP Interpreter
  5. . Add new Interpreter, select "C:\xampp\php\php.exe" and save.
@a7madev
a7madev / AndroidManifest.xml
Last active August 13, 2016 11:05
Android - Request Multiple Permissions
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
@a7madev
a7madev / circle.yml
Created September 6, 2016 11:21 — forked from donnfelker/circle.yml
Updated circle.yml file
#
# Build configuration for Circle CI
#
# See this thread for speeding up and caching directories: https://discuss.circleci.com/t/installing-android-build-tools-23-0-2/924
#
general:
artifacts:
- /home/ubuntu/AndroidCI/app/build/outputs/apk/