Skip to content

Instantly share code, notes, and snippets.

@a7madev
a7madev / WordPress - Rewrite Root Rules.php
Last active August 29, 2015 14:24
WordPress - Rewrite Root Rules
/**
**================================================================================================================**
* Rewrite Root Rules
**================================================================================================================**
**================================================================================================================**
**/
add_action('generate_rewrite_rules', 'roots_add_rewrites');
function roots_add_rewrites($content) {
$theme_name = next(explode('/themes/', get_stylesheet_directory()));
global $wp_rewrite;
@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 / 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-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 [email protected]
<?php
// Blade if statement
@if()
@elseif()
@else
@endif
// Text Placeholder
@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.+'
@a7madev
a7madev / Laravel-All.md
Last active July 3, 2017 06:03
Laravel

Laravel All

Make Migration

php artisan make:migration create_teacher_subjects_table