Skip to content

Instantly share code, notes, and snippets.

Parashuram N axemclion

Block or report user

Report or block axemclion

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
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 /
Created Sep 5, 2019
Fix Yoga conflict when using Flipper with React Native (for rn <0.62)
sed -i '.bak' s/\'yoga\'/\'Yoga\'/ node_modules/react-native/ReactCommon/yoga/yoga.podspec
sed -i '.bak' s/\#\{version\}\.React/1\.14\.3/ node_modules/react-native/ReactCommon/yoga/yoga.podspec
sed -i '.bak' s/\#.Pinning/spec.pod_target_xcconfig=\{\'DEFINES_MODULE\'=\>\'YES\'\\}\#/ node_modules/react-native/ReactCommon/yoga/yoga.podspec
sed -i '.bak' s/\"yoga\",.\"\#\{version\}\.React\"/\"Yoga\"/ node_modules/react-native/React/React-Core.podspec
sed -i '.bak' s/\'yoga\'/\'Yoga\'/ ios/Podfile
axemclion /
Created Aug 12, 2019
Adding Flipper to ReactNative
// Call this in MainApplication.onCreate(), just after Soloader line.
private static void initialize(Context context) {
if (BuildConfig.DEBUG) {
try {
We use reflection here to pick up the class that initializes Flipper,
since Flipper library is not available in release mode
Class<?> aClass = Class.forName("com.facebook.flipper.ReactNativeFlipper");
aClass.getMethod("initializeFlipper", Context.class).invoke(null, context);
axemclion / JSIObject.cpp
Last active Jan 15, 2019
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 /
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 Sep 15, 2019
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 /
Created Nov 11, 2018
React Native Android Startup - logging
public void onCreate() {
///////// Add lines below this to capture times of the large sections
final String TAG = "RN_STARTUP"; // If you already have a TAG for the app, use that instead.
final TimingLogger timingLogger = new TimingLogger("AXE", "REACT_NATIVE_STARTUP");
ReactMarker.addListener(new ReactMarker.MarkerListener() {
axemclion / showpassword.user.js
Created Jan 6, 2018
Greasemonkey script to show password on doubleclick
View showpassword.user.js
// ==UserScript==
// @name Show Password
// @version 1
// @grant none
// ==/UserScript==
function handleDblClick(e){
var pwd =;
var type = pwd.getAttribute('type');
pwd.setAttribute('type', type === 'password' ? 'text': 'password');
axemclion / feedly.user.js
Last active May 9, 2019
Feedly Open in New Background Tab
View feedly.user.js
// ==UserScript==
// @name Feedly - Open entry in background (Modified)
// @description Adds 'h' as a hotkey to open selected entry in background tab
// @namespace
// @author axemclion
// @include*
// @include*
// @include http://**
// @include https://**
// @grant GM.openInTab
axemclion / app.jsx
Last active Jan 16, 2019
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) {
You can’t perform that action at this time.