cd ~/Downloads
wget http://repo.zabbix.com/zabbix/3.2/ubuntu/pool/main/z/zabbix-release/zabbix-release_3.2-1+xenial_all.deb
dpkg -i zabbix-release_3.2-1+xenial_all.deb
apt-get update
should add /etc/apt/sources.list.d/zabbix.list
cd ~/Downloads
wget http://repo.zabbix.com/zabbix/3.2/ubuntu/pool/main/z/zabbix-release/zabbix-release_3.2-1+xenial_all.deb
dpkg -i zabbix-release_3.2-1+xenial_all.deb
apt-get update
should add /etc/apt/sources.list.d/zabbix.list
Define proxy in .gitconfig
( You can find it by run this command : git config --list --global --show-origin
)
[http]
proxy = http://username:password@proxydomain:port
sslverify = false
[https]
proxy = http://username:password@proxydomain:port
sslverify = false
Use environment variable
# see How to Install Redis Server on CentOS 7 - http://linoxide.com/storage/install-redis-server-centos-7/ | |
# --- Compiling --- | |
$ yum install gcc make tcl | |
$ REDIS_VER=3.2.3 | |
$ wget http://download.redis.io/releases/redis-$REDIS_VER.tar.gz | |
$ tar xzvf redis-$REDIS_VER.tar.gz | |
$ cd redis-$REDIS_VER | |
$ make | |
$ make test |
static void uploadFile(Context context, final String selectedFilePath) { | |
int serverResponseCode = 0; | |
HttpURLConnection connection; | |
DataOutputStream dataOutputStream; | |
String lineEnd = "\r\n"; | |
String twoHyphens = "--"; | |
String boundary = "*****"; | |
int bytesRead, bytesAvailable, bufferSize; | |
byte[] buffer; |
public static boolean isValidEmail(String target) { | |
boolean check1 = Patterns.EMAIL_ADDRESS.matcher(target).matches(); | |
Pattern pattern; | |
Matcher matcher; | |
String EMAIL_PATTERN = "^[_A-Za-z0-9-]+(\\.[_A-Za-z0-9-]+)*@[A-Za-z0-9]+(\\.[A-Za-z0-9]+)*(\\.[A-Za-z]{2,})$"; | |
pattern = Pattern.compile(EMAIL_PATTERN); | |
matcher = pattern.matcher(target); | |
boolean check2 = matcher.matches(); | |
return target.isEmpty() || check1 && check2; | |
} |
@SuppressWarnings("deprecation") | |
@SuppressLint("HardwareIds") | |
public static HashMap<String, String> GenerateDeviceInformation(Context context) { | |
HashMap<String, String> result = new HashMap<>(); | |
String pseudoId = "35" + | |
Build.BOARD.length() % 10 + | |
Build.BRAND.length() % 10 + | |
Build.CPU_ABI.length() % 10 + | |
Build.DEVICE.length() % 10 + | |
Build.DISPLAY.length() % 10 + |
public static void hideStatusbar(Activity context) { | |
if (Build.VERSION.SDK_INT < 16) { | |
context.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); | |
} else { | |
View decorView = context.getWindow().getDecorView(); | |
int uiOptions = View.SYSTEM_UI_FLAG_FULLSCREEN; | |
decorView.setSystemUiVisibility(uiOptions); | |
} | |
} |
cat SHA-2.crt Certum_Domain_Validation_CA_SHA2.crt Certum_Trusted_Network_CA.crt mine > bundle.crt
sudo update-ca-certificates
reboot
openssl s_client -connect domain:443 -CApath /etc/ssl/certs
cat SHA-2.crt Certum_Domain_Validation_CA_SHA2.crt Certum_Trusted_Network_CA.crt mine > bundle.crt
sudo update-ca-certificates
reboot
openssl s_client -connect domain:443 -CApath /etc/ssl/certs