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
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
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
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
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
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' |
NewerOlder