Skip to content

Instantly share code, notes, and snippets.

@blankg
blankg / WebViewBridge.js
Last active July 12, 2022 06:53
For RN >= 0.57 please look at https://github.com/blankg/rn-webview-bridge-sample-new/blob/master/resources/index.html. Provides a sample implementation for sending and receiving messages to and from the React-Native WebView (using postMessage/onMessage WebView API).
/**
* Created by Guy Blank on 3/9/17.
*
* This is a sample provides an API to send & receive messages to and from the React-Native WebView (using postMessage/onMessage WebView API).
* A sample project that uses the bridge is available here https://github.com/blankg/rn-webview-bridge-sample
*
* webViewBridge.send('functionToInvoke', {mydata: 'test'}, function(){console.log('success')},function(){console.log('error')});
*
* The API is designed to be similar to the Cordova exec API so migration to it should be almost seamless.
* The API also provides solution to a React-Native WebView bug in iOS which causes sending consecutive postMessage calls to override each other.
@paragonie-scott
paragonie-scott / crypto-wrong-answers.md
Last active April 21, 2024 23:48
An Open Letter to Developers Everywhere (About Cryptography)
@nikos
nikos / Dockerfile
Created June 16, 2015 10:00
MarkLogic Server 8.0-3 prepared to run with on an CentOS 6.6 Linux server, after container is started, go to http://localhost:8001/ to finish installation
FROM centos:centos6.6
MAINTAINER Niko Schmuck <niko.auto@nava.de>
# Install MarkLogic
RUN yum -y update &&\
yum groupremove 'Additional Development' 'E-mail server' 'Graphical Administration Tools' 'Perl Support' &&\
curl -O https://developer.marklogic.com/download/binaries/8.0/MarkLogic-8.0-3.x86_64.rpm &&\
yum -y install MarkLogic-8.0-3.x86_64.rpm &&\
rm MarkLogic-8.0-3.x86_64.rpm &&\
yum clean all