###Install APK file using Gradle and Command Line
1.- First thing, install Gradle SDK. Download the latets version and install it in your root.
2.- You'll need to have Android Studio installed also.
3.- Configure bash_profile file
package test.util; | |
import org.junit.Assume; | |
import org.junit.internal.AssumptionViolatedException; | |
import org.junit.rules.MethodRule; | |
import org.junit.runners.model.FrameworkMethod; | |
import org.junit.runners.model.Statement; | |
import java.lang.annotation.ElementType; | |
import java.lang.annotation.Retention; |
java -Xms128m -Xmx1024m -XX:PermSize=128m -XX:MaxPermSize=256m |
#!/bin/bash | |
adb backup -f data.ab -noapk com.package | |
dd if=data.ab bs=1 skip=24 | openssl zlib -d | tar -xvf |
############################################# | |
# Push de la rama actual | |
git push origin $rama_actual | |
############################################# | |
# Volver a un commit anterior, descartando los cambios | |
git reset --HARD $SHA1 | |
############################################# | |
# Ver y descargar Ramas remotas |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.io.OutputStream; | |
import java.io.UnsupportedEncodingException; | |
import java.math.BigInteger; | |
import java.security.InvalidKeyException; | |
import java.security.MessageDigest; | |
import java.security.NoSuchAlgorithmException; | |
import java.util.Arrays; |
###Install APK file using Gradle and Command Line
1.- First thing, install Gradle SDK. Download the latets version and install it in your root.
2.- You'll need to have Android Studio installed also.
3.- Configure bash_profile file
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>App Redirection</title> | |
</head> | |
<body> | |
<!-- iframe used for attempting to load a custom protocol --> | |
<iframe style="display:none" height="0" width="0" id="loader"></iframe> |
import javax.net.ssl.SSLSocket; | |
import javax.net.ssl.SSLSocketFactory; | |
import java.io.*; | |
/** Establish a SSL connection to a host and port, writes a byte and | |
* prints the response. See | |
* http://confluence.atlassian.com/display/JIRA/Connecting+to+SSL+services | |
*/ | |
public class SSLPoke { | |
public static void main(String[] args) { |
You can't use $0 because that gives only a relative path if the script is run with a command like ./myscript.sh. | |
The method below works well for both Linux and Mac OS X. It's a bit weird, but works. | |
#!/bin/bash | |
#========================== | |
# bash - find path to script | |
#========================== | |
abspath=$(cd ${0%/*} && echo $PWD/${0##*/}) |
You can't use $0 because that gives only a relative path if the script is run with a command like ./myscript.sh. | |
The method below works well for both Linux and Mac OS X. It's a bit weird, but works. | |
#!/bin/bash | |
#========================== | |
# bash - find path to script | |
#========================== | |
abspath=$(cd ${0%/*} && echo $PWD/${0##*/}) |