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
#!/bin/bash | |
# | |
# Docker OR OPENVPN rules | |
# | |
#Reset rules | |
iptables -F | |
iptables -X | |
iptables -t nat -F |
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
# See : https://github.com/williamdes/sql-backup |
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
/** | |
* Get fingerprint from a certificate in android.content.pm.Signature | |
* @return String fingerprint that contains the SHA-256 digest | |
*/ | |
private static String getFingerprint(android.content.pm.Signature ce){ | |
String certificate = ""; | |
InputStream input = new ByteArrayInputStream(ce.toByteArray()); | |
CertificateFactory cf = null; | |
try { |
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
//FROM | |
//https://stackoverflow.com/a/34571089/5155484 | |
typedef unsigned char uchar; | |
static const std::string b = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";//= | |
static std::string base64_encode(const std::string &in) { | |
std::string out; | |
int val=0, valb=-6; | |
for (uchar c : in) { |
NewerOlder