cmd developing software

Create a custom React Native module that exports Constants (with Swift)

In this post, we will create a simple React Native module using Swift. The module will return information about the current device and expose it to JavaScript. First, we create our Swift class, RNDevice.swift. This class will is responsible for returning information that describes the current device. This information is obtain using the UIDevice class. Next, we create the bridge to React Native and externalize the RNDevice class (above), so...

Create a React Native custom module (with Swift)

Here is a quick and dirty example of how one can expose a custom module to React Native using Swift. Product-Bridging-Header.h – Bridge header file MySwiftThingy.m – Register Swift code with the React Native Bridge MySwiftThingy.swift – Custom Swift component Call it from JavaScript:

Create a self signed certificate with OpenSSL

To create a self signed cert with OpenSSL, execute the following: openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -days 100 In some cases its useful to remove the passphrase from the key. This way you will not be prompt for the passphrase every time it starts. Removing the passphrase is easy, simply run this following command: openssl rsa -in key.pem -out newkey.pem && mv newkey.pem key.pem

Jupyter Notebook Server with pyspark over SSL

In this post, we will describe how to configure a publicly accessible Jupyter Notebook Server over SSL. The Jupyter notebook is, by default, accessible only via localhost. In some cases, it is useful to expose it publicly. Here is how to do it simply… Configure a password for public Notebook server Open python REPL $python >>>from IPython.lib import passwd >>>passwd() >>>Enter password >>>Verify password ‘sha1:408a945027ad:fec843e6f020d6c172a16b5ad89989e3c3175d99’ Create a self signed cert openssl req -x509 -nodes -days...

Apache Zeppelin with SSL

Apache Zeppelin is an awesome web based notebook that allows for interactive data analytics. It is architected to be language agnostic and (as of today) supports Scala (with Apache Spark), SparkSQL, Markdown and Shell. In this post, we will describe how to configure a  Zeppelin notebook Server with SSL Here is how to do it simply… First Install Zeppelin Install Zeppelin git clone mvn clean package -Pspark-1.4 -Dhadoop.version=2.2.0 -Phadoop-2.2 -DskipTests Note that, eventually,...