Saturday, July 11, 2015

Git Tutorials

1. Read Git ebook
2. Install Git GUI clients. (I use SourceTree)
3. Have fun with Git

Note: SourceTree makes you live easier and you don't have to remember git commands.

Create a Repo:
https://help.github.com/articles/create-a-repo/

Must use tool: SourceTree
SourceTree tutorial

Do a Commit: push your code to github

1.  From GitHub create new repo. It will give you a url: www.github.XYZ.MyNewRepo.git
2. Go to the directory you want to push to git; $cd mydirX
$git init
$git add README.md
$git commit -m "first commit"
$git remote add origin https://github.com/AndreSand/gamma-android-app.git
$git push -u origin master

Now go to your new repo and you will see your code in there.

How to Marge Code:

.5 create new folder SOU
1.  Clone team Repo: /SOU$git clone https://github.com/Org/MyApp.git
2.  (Github web) Create fork: https://github.com/xxxx/MyApp.git
3.  $git remote -v 
4.  change pull origin to myFork url $git remote set-url --push origin https://github.com/xx/MyApp.git
5.  open app in AndroidStudio.
6.  make changes, 
a. $git add . (add your files to the git repo)
b. $git commit -m "First commit"

c. $git push origin
7.  make "Pull" request from GitHub fork (website my fork)

8.  merge (website)

Useful Commands:

Remove your uncommitted changes:
$git reset --hard to remove your uncommitted changes
$git pull

Show origin:
$git remote show origin
$git remote -v

Remove origin:
$git remote set-url origin git://new.url.here
OR
$git remote remove origin
$git remote rm origin

Change Fetch URL:
git remote set-url origin https://github.com/USERNAME/OTHERREPOSITORY.git

Remove commits:

$git reset --hard origin/master

 Git log and show code commits:
$git log branch (will return a list of the commits)

$git show #commit_Number#


GIT branch: switching between branches:

Current branch: $git branch

$git fetch
$git checkout test (branch name test)

To fetch a branch, you simply need to:
$git fetch origin
This will fetch all of the remote branches for you. You can see the branches available for checkout with:
 $git branch -v -a
With the remote branches in hand, you now need to check out the branch you are interested in, giving you a local working copy:
$git checkout -b test origin/test

Git Log info

Command to print the commit Comment.
$git log --oneline -3
Prints commit# and commit comment


To get more info about the commit you can do $git show (Commit#)
$git show <commit#>


Reference:

http://zackperdue.com/tutorials/super-useful-need-to-know-git-commands
http://www.gitguys.com/topics/temporarily-stashing-your-work
http://stackoverflow.com/questions/16330404/how-to-remove-remote-origin-from-git-repo
https://help.github.com/articles/changing-a-remote-s-url/
http://stackoverflow.com/questions/1783405/checkout-remote-git-branch 

Wednesday, June 3, 2015

Create Table of Contents using MS word

1. Highlight section you want the link to take you. In this case highlight Test.


2. Go to Insert -> Bookmark-> Create new Bookmark  (Test_one)

3. Now create the Hyperlink in your Table Of Contents page: Test
Go to Insert -> Bookmark-> Create new Hyperlink, enter #Test_one

 

Done. Now when you click on Test below it will take you to the Test paragraph in your document.






Reference:
https://www.youtube.com/watch?v=qg0azAaJaRI

Thursday, May 28, 2015

Android Development**

Work in Progress....
Android Arsenal:
http://android-arsenal.com/

Android Developers Blog:
http://android-developers.blogspot.com/
http://developer.android.com/develop/index.html

Google i/o 2015:
https://events.google.com/io2015/

Google design Guidelines:
http://www.google.com/design/articles/design-from-ios-to-android/

icons:
https://www.google.com/design/icons/

Backend for Android:
https://www.parse.com/
https://www.firebase.com/

Android Security:
https://www.airpair.com/android/posts/adding-tampering-detection-to-your-android-app
https://manifestsecurity.com/android-application-security-part-21/


Android Dev Sumit:
FYI Android Dev Summit Videos are on youtube.
Day two https://www.youtube.com/watch?v=JtdqDvgWGNA

Code samples from the conference:

CodePath Resources:
RecyclerView:
Android UI:

Security Tools:
2. Drozer- 
 Android UI testing w/ espresso:

testing:

Monday, May 11, 2015

Android and Gradle

Gradle: is a build system for Android apps.

First install gradlehttps://gradle.org/downloads/

Info:
Below image shows three directories
1. Vanilla
2. Strawberry
3. Main

Vanilla and Strawberry are the apk build flavors, this both dirctories by default will use the settings from Main folders(java/... ; res/...; AndroidManifest.xml), if we declare this folders inside Vanilla or Strawberry it will override the setting from Main.
Ex:
Change icon for Vanilla apk. You can modified the app icon by adding res directory to the project.


Commands:
run: $chmod +x gradlew

info: $./gradlew -P
Generate APKs: $./gradlew assemble
Generate Taks: $./gradlew tasks 
Install apk build genreated by tasks: $./gradlew installVanillaDebug 

build- generates .apk file, need to configure: $./gradlew build

clean- deletes the generated .apk file: $./gradlew clean

version: $./gradlew -v

Enable the Gradle Daemon:
Via properties file - add org.gradle.daemon=true to GRADLE_USER_HOME»/gradle.properties
Reference:

Thursday, April 9, 2015

Good Resources/Tutorials

Good Readings:
IBM http://securityintelligence.com/mobile-insecurity/#.VSbwmXDF-Xw

Good tutorials:
https://geekytheory.com
http://hackr.io/


Security:
http://builditsecure.ly/
https://androidsecuritywiki.com/
Good Android tutorial:
http://www.learncomputer.com/android-interview-questions/

tools:
http://www.android4devs.com/2014/07/5-tools-every-android-developer-must.html

Gradle:
http://www.techotopia.com/index.php/An_Overview_of_Gradle_in_Android_Studio
https://www.youtube.com/watch?v=g56O_HeefBE
https://gradle.org/getting-started-android/#build-operator
https://gradle.org/docs/current/userguide/tutorial_using_tasks.html


Material Design:
http://www.androidhive.info/2015/04/android-getting-started-with-material-design/

-proguard:
http://developer.android.com/tools/help/proguard.html

-lifecycle:
http://programmerguru.com/android-tutorial/activity-life-cycle/

-sharedata:
http://programmerguru.com/android-tutorial/how-to-send-simple-data-to-other-apps/

-facebook:
https://code.facebook.com/projects/android/
https://newsroom.fb.com/news/2015/04/introducing-hello/
https://www.hackerrank.com

-Interview questions:
http://www.toptal.com/android/interview-questions
http://www.itechaleart.com/2015/02/android-interview-qa.html
good:
http://www.androidinterview.com/android-fragment-tutorial-example/
file:///Users/andres/Downloads/Android%20Interview%20Questions.pdf


Scala:
http://www.scala-lang.org/docu/files/ScalaByExample.pdf

Java:
Big O-
http://bigocheatsheet.com/
http://www.corejavainterviewquestions.com/idiots-guide-big-o/

Java Interview q's:
http://www.programmingsimplified.com/java/source-code/java-program-find-factorial
http://www.newthinktank.com/category/web-design/java-video-tutorial/
https://www.youtube.com/watch?v=M6lYob8STMI
http://www.tutorialspoint.com/java/java_basic_operators.html
http://java2novice.com/java-interview-programs/fibonacci-series/


People Skills:
https://www.linkedin.com/pulse/7-skills-extraordinarily-likable-people-jeff-haden


Work/Family Balance:

Phone Screens:
https://sites.google.com/site/steveyegge2/five-essential-phone-screen-questions


Common Interview questions:
https://www.themuse.com/advice/interview-translation-what-4-common-questions-really-mean

https://www.facebook.com/notes/facebook-engineering/get-that-job-at-facebook/10150964382448920





Wednesday, April 8, 2015

List of useful Linux commands (Work in progress)

Email me if you know other useful/cool commands :)

Command: tree
Displays file structure of directory
Install:
$brew update (first install brew how to Install)
$brew install tree
$tree



Command: >
Saves output of command to a file
$cat device.config > device.txt


Other commands:
ls
cd

vi
:wq
:q!


More commands coming soon :)

Work in Progress...

Wednesday, April 1, 2015

How to recognize USB in VirtualBox. (to use $adb devices)

Today I had an issue using Ubunutu14 with my VirtualBox image, it was not able to recognize when I plugin my android device. When I type $adb devices it didnt appear.

Steps to resolve:
1. You need to install gnome-system-tools
$sudo apt-get install gnome-system-tools

2. Dash home and type: users, select Users and Groups -> Advanced settings


3.  Select: Use VirtualBox virtualization solution

4. Reboot 

5. Now go to your VM and it will recognize the USB and you are able. 
$adb devices , and your device will appear. 




Reference:
http://askubuntu.com/questions/140081/virtualbox-doesnt-recognize-usb