Skip to content

Instantly share code, notes, and snippets.


Parashuram N axemclion

View GitHub Profile
axemclion / JSIObject.cpp
Last active Sep 28, 2021
React Native JSI Example
View JSIObject.cpp
// This sample is a Work in Progress for JSI , and specific functions may change.
#pragma once
#include <string>
#include <unordered_map>
#include <jsi/jsi.h>
// This SameplJSIObject needs to inheric from HostObject, and this is the object that will be exposed to JS.
axemclion / screenscraper.user.js
Created Jul 26, 2009
Screen Scraper Template
View screenscraper.user.js
// ==UserScript==
// @name ScreenScraperTemplate
// @namespace
// @include*
// ==/UserScript==
* This function is responsible for submitting the data
* @param {Object} parsedData
* @param {Object} record
axemclion / MessageQueueSpy.js
Last active Jun 28, 2021
Message Queue - Replay React Native Message Queue
View MessageQueueSpy.js
import MessageQueue from 'react-native/Libraries/BatchedBridge/MessageQueue.js';
const WHITELIST = ['UIManager'];
const NOOP = () => { };
let queue = [];
let now = 0;
export default {
start() {
MessageQueue.spy(msg => {
axemclion /
Created Dec 2, 2018
An adapter to use React Native's Native Modules in Flutter
package com.example.helloflutterplugin;
import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.modules.toast.ToastModule;
import com.nparashuram.reactnative.ReactNativeModuleAdapter;
import io.flutter.plugin.common.MethodCall;
import io.flutter.plugin.common.MethodChannel;
import io.flutter.plugin.common.MethodChannel.MethodCallHandler;
import io.flutter.plugin.common.MethodChannel.Result;
import io.flutter.plugin.common.PluginRegistry.Registrar;
axemclion /
Last active Mar 16, 2021
Using Chrome Traces to Automate Rendering Performance

Using Chrome Traces to Automate Rendering Performance

Ten years ago, increasing the performance of a website usually meant tweaking the server side code to spit out responses faster. Web Performance engineering has come a long way since then. We have discovered patterns and practices that make the (perceived) performance of websites faster for users just by changing the way the front end code is structured, or tweaking the order of elements on a HTML page. Majority of the experiments and knowledge has been around delivering content to the user as fast as possible.

Today, web sites have grown to become complex applications that offer the same fidelity as applications installed on computers. Thus, consumers have also started to compare the user experience of native apps to the web applications. Providing a rich and fluid experience as users navigate web applications has started to play a major role in the success of the web.

Most modern browsers have excellent tools that help measure the runtime performa

axemclion / app.jsx
Last active Sep 5, 2020
CodePush + Push Notifications for A/B Testing
View app.jsx
import Push from 'mobile-center-push';
import CodePush from 'react-native-code-push';
import { AppState } from 'react-native';
export default class MyApp extends Component {
// Component Logic ...
pushNotificationReceived: function (pushNotification) {
axemclion / index.js
Last active Mar 13, 2020
DBMonster Perf Comparisons
View index.js
var urls = {
react: '',
ember: '',
underscore: '',
ractive: '',
paperclip: ''
var browserPerf = require('browser-perf');
var FILE = 'data.json';
axemclion /
Last active Jan 16, 2020
React Native Android - Systrace from ReactMarkers
package com.nparashuram;
import android.os.Process;
import android.text.TextUtils;
import android.util.Log;
import android.view.View;
import android.view.ViewTreeObserver;
import com.facebook.react.ReactInstanceManager;
import com.facebook.react.ReactNativeHost;
import com.facebook.react.bridge.ReactContext;
axemclion / adding_flipper.diff
Last active Sep 29, 2019
Adding Flipper to an existing React Native project
View adding_flipper.diff
diff --git a/android/app/build.gradle b/android/app/build.gradle
index 6560b78..eade6f6 100644
--- a/android/app/build.gradle
+++ b/android/app/build.gradle
@@ -176,12 +176,21 @@ android {
+ packagingOptions {
+ pickFirst '**/'
axemclion / chrome-selenium-timeline.js
Created Sep 19, 2015
Getting Chrome timeline from Selenium Log
View chrome-selenium-timeline.js
var wd = require('wd');
// This is for Chromedriver directly.
// If you are using Selenium, use http://localhost:4444/wd/hub
var browser = wd.promiseRemote('http://localhost:9515');
var URL = ''; // Change this to a custom URL
var config = {
"browserName": "chrome",
"chromeOptions": {