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 class PDFGenManager extends ReactContextBaseJavaModule { | |
private static final String TAG = "PDFGenManager"; | |
private ReactApplicationContext context; | |
private File directory; | |
private String dirPath; | |
private PDFConverter convertor; | |
public PDFGenManager(@NonNull ReactApplicationContext reactContext) { | |
super(reactContext); | |
this.context = reactContext; |
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
export const isReachable = async () =>{ | |
const timeout = new Promise((resolve, reject) => { | |
setTimeout(reject, 5000, 'Request timed out'); | |
}); | |
const request = fetch('https://xxxxxx.com'); | |
try { | |
const response = await Promise | |
.race([timeout, request]); | |
return true; | |
} |
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
import time | |
import socket | |
import threading | |
import hashlib | |
import itertools | |
import sys | |
from Crypto import Random | |
from Crypto.PublicKey import RSA | |
from CryptoPlus.Cipher import IDEA |
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
export const fetchParallel = (link,header, callback) =>{ | |
const POOR = 150; | |
const MODERATE = 550; | |
const GOOD = 2000; | |
const _start = new Date().getTime(); | |
const speedTester = RNFetchBlob | |
.config({ |
OlderNewer