Let's have some command-line fun with curl, [jq][1], and the [new GitHub Search API][2].
Today we're looking for:
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; | |
import javax.net.ssl.TrustManager; | |
import javax.net.ssl.X509TrustManager; |
package jieqoo.android.KASS.test.tasks; | |
import java.util.concurrent.CountDownLatch; | |
import java.util.concurrent.TimeUnit; | |
import jieqoo.android.models.RESTListener; | |
import jieqoo.android.models.RESTResponse; | |
import jieqoo.android.tasks.FetchRESTResponseTask; | |
import jieqoo.android.util.Configuration; | |
import android.test.InstrumentationTestCase; |
Latency Comparison Numbers (~2012) | |
---------------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns 3 us | |
Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
Let's have some command-line fun with curl, [jq][1], and the [new GitHub Search API][2].
Today we're looking for:
This Gist provides some code examples of how to implement WebSocket stream handling using a Redux middleware. Please be aware that this is only provided as an example and that critical things like exception handling have not been implemented.
A more complete version has been packaged, tested, and is available on GitHub as redux-websocket. This library has also been published to npm at @giantmachines/redux-websocket
.
This module represents the foundation of the middleware and implements the ideas presented above. The exported function is used during the creation of the Redux store (see the following snippet).
{ | |
"scripts": { | |
// ... other scripts | |
"dev-build-android-staging": "ENVFILE=.env.staging react-native run-android", | |
"dev-build-android-prod": "ENVFILE=.env.prod react-native run-android", | |
"release-build-android-prod": "export ENVFILE=.env.prod && cd android && ./gradlew assembleRelease && cd ..", | |
"release-build-android-staging": "export ENVFILE=.env.staging && cd android && ./gradlew assembleRelease && cd ..", | |
"start-staging-server": "ENVFILE=.env.staging react-native start", | |
"start-prod-server": "ENVFILE=.env.prod react-native start", | |
} |