This file contains hidden or 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
import android.util.Log; | |
import java.security.SecureRandom; | |
import java.security.cert.CertificateException; | |
import java.security.cert.X509Certificate; | |
import javax.net.ssl.HostnameVerifier; | |
import javax.net.ssl.HttpsURLConnection; | |
import javax.net.ssl.SSLContext; | |
import javax.net.ssl.SSLSession; |
This file contains hidden or 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
import android.app.Activity; | |
import android.content.pm.PackageManager; | |
import android.support.v4.app.ActivityCompat; | |
import android.support.v4.content.ContextCompat; | |
import android.util.Log; | |
import java.util.ArrayList; | |
import java.util.LinkedHashMap; | |
import java.util.List; | |
import java.util.Map; |
This file contains hidden or 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
import android.util.Log; | |
/** | |
* Default logger delegate implementation which logs in LogCat with {@link Log}. | |
* Log tag is set to <b>Logger</b> for all the logs. | |
* @author gotev (Aleksandar Gotev) | |
*/ | |
public class DefaultLoggerDelegate implements Logger.LoggerDelegate { | |
private static final String TAG = "Logger"; |
This file contains hidden or 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
#!/bin/bash | |
if [ "x$1" == "x" ] | |
then | |
echo "Usage: ./website-performance.sh <website_to_check>" | |
exit 1 | |
fi | |
TEMPFILE=$(mktemp) | |
cat <<EOF > $TEMPFILE |
This file contains hidden or 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
#!/bin/bash -e | |
# Utility script to install latest VirtualBox Guest Additions for CentOS 6/7 | |
# @author Alex Gotev | |
# | |
if [[ $EUID -ne 0 ]]; then | |
echo "This script must be run as root" 1>&2 | |
exit 1 | |
fi |
This file contains hidden or 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
#!/bin/bash -e | |
if [[ $EUID -ne 0 ]]; then | |
echo "This script has to be executed as root" 1>&2 | |
exit 1 | |
fi | |
echo "Installing NTP client..." | |
rm -rf /var/lib/apt/lists/* | |
apt-get -y clean | |
apt-get -y autoclean |
This file contains hidden or 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
#!/bin/bash | |
# Idea taken from example: https://codepoets.co.uk/2014/debian-http_proxy-setting/ | |
if [[ $EUID -ne 0 ]]; then | |
echo "This script has to be executed as root" 1>&2 | |
exit 1 | |
fi | |
if [ $# -ne 2 ]; then | |
echo "Usage: ./enable-proxy.sh PROXY_IP PROXY_PORT" |
This file contains hidden or 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
#!/bin/bash | |
tcpdump -i $1 -nn port 67 or port 68 |
This file contains hidden or 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
#!/bin/bash | |
DOWNLOAD_STRING="$1" | |
OUT="${DOWNLOAD_STRING/www.dropbox.com/dl.dropboxusercontent.com}" | |
OUT="${OUT/?dl=0/}" | |
echo $OUT |
OlderNewer