Go through this amazon link http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/install-LAMP.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
how to add a git android library project as a sub module, to a project | |
1. create an android project | |
2. add to vcs (vcs - import into version control - create git repository) | |
3. goto terminal and add sub-module - make sure the location folder name is different than the original project name | |
git submodule add https://[email protected]/YYY/ZZZ.git | |
4. goto file menu - project structure | |
5. click '+' on left top | |
6. select 'import gradle project' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
If you have created a tag called 'release01' | |
in a Git repository you would remove it from your repository | |
by doing the following: | |
$ git tag -d release01 | |
$ git push origin :refs/tags/release01 | |
to push every local tag to remote | |
git push origin --tags |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface FormUploadService { | |
@Multipart | |
@POST("<post-url-endpoint>") // the post url endpoint | |
Observable < String > postFormWithAttachments( | |
@Header(AppConstants.KEY_AUTH) String authKey, // auth key, if required | |
@PartMap Map < String, RequestBody > params); // our form data map | |
} | |
public void postForm(String authKey, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sometimes in ubuntu the wifi will not connect to the network, | |
it will continiously try to connect to a wifi network but will fail | |
continously. for this apply the following fix: | |
1. open terminal - > type in 'ifconfig' -> enter | |
it will list the available networks like this: | |
enp2s0 Link encap:Ethernet | |
lo Link encap:Local Loopback | |
wlp3s0 Link encap:Ethernet |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Use Imagemagick's batch tool, mogrify. | |
This takes most of the same arguments. | |
To scale the longest size down to 300px, we can offer -resize "300x300>". | |
For safety's sake I've also got this saving the new images into a subdirectory rather than overwriting. | |
# assuming you're in the directory of images | |
mkdir resized | |
mogrify -resize "300x300>" -path resized *.jpg | |
The ">" means that It will only resize if the image is bigger than the given size. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package facebook.page.test; | |
import android.content.Intent; | |
import android.content.pm.PackageManager; | |
import android.net.Uri; | |
import android.support.v7.app.ActionBarActivity; | |
import android.os.Bundle; | |
import android.view.Menu; | |
import android.view.MenuItem; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Error:Project :app declares a dependency from configuration 'compile' to configuration 'default' | |
which is not declared in the descriptor for project :<project-name>. | |
this happens when you have submodules in your project, | |
to fix this clone using recursive git command: | |
git clone --recursive https://github.com/developer-id/project.git | |
now go to the submodule folder and check the git repo version by: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.emil.android.util; | |
import android.content.Context; | |
import android.net.ConnectivityManager; | |
import android.net.NetworkInfo; | |
import android.telephony.TelephonyManager; | |
/** | |
* Check device's network connectivity and speed | |
* @author emil http://stackoverflow.com/users/220710/emil |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var mediaJSON = { "categories" : [ { "name" : "Movies", | |
"videos" : [ | |
{ "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org", | |
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" ], | |
"subtitle" : "By Blender Foundation", | |
"thumb" : "images/BigBuckBunny.jpg", | |
"title" : "Big Buck Bunny" | |
}, | |
{ "description" : "The first Blender Open Movie from 2006", | |
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" ], |
OlderNewer