Skip to content

Instantly share code, notes, and snippets.

View ozcanzaferayan's full-sized avatar
⚛️
Overreacting

Özcan Zafer AYAN ozcanzaferayan

⚛️
Overreacting
View GitHub Profile
@ozcanzaferayan
ozcanzaferayan / electrode-native-helloworld2.md
Created November 5, 2021 13:31 — forked from hemanth-manoharan/electrode-native-helloworld2.md
Tutorial #2: How to add the second mini app to an outer android app

Tutorial #2: How to add the second mini app to an outer android app

This post is the 2nd one in a series of posts on Electrode Native.

It assumes that one has already completed the steps in Tutorial #1 here - https://gist.github.com/hemanth-manoharan/edb363d575d5c9ab22cbc93b595b8fba

  • First, create a second mini-app and publish it to npm as we did in the previous tutorial.

Assuming that the 2nd app is named app2-miniapp

@ozcanzaferayan
ozcanzaferayan / electrode-native-helloworld3.md
Created November 5, 2021 13:21 — forked from hemanth-manoharan/electrode-native-helloworld3.md
Tutorial #3: How to perform OTA (Over-The-Air) updates using CodePush
@ozcanzaferayan
ozcanzaferayan / build.sh
Last active October 11, 2021 17:21
How to create XCFramework
xcodebuild archive \
-workspace FruitBasket2.xcworkspace \
-scheme FruitBasket3 \
-archivePath ~/Desktop/FruitBasket3-iphonesimulator.xcarchive \
-sdk iphonesimulator \
SKIP_INSTALL=NO
xcodebuild archive \
-workspace FruitBasket2.xcworkspace \
-scheme FruitBasket3 \
@ozcanzaferayan
ozcanzaferayan / pasta.jpeg
Last active December 7, 2023 18:12
Pasta
pasta.jpeg
@ozcanzaferayan
ozcanzaferayan / ExampleHostObject.cpp
Created September 6, 2021 12:50
ExampleHostObject JSI
#pragma once
#include <jsi/jsi.h>
#include <jni.h>
#include <fbjni/fbjni.h>
using namespace facebook;
class ExampleHostObject : public jsi::HostObject {
public:
#import "FrameHostObject.h"
#import <Foundation/Foundation.h>
#import <jsi/jsi.h>
// Tüm key'leri dönen metot
std::vector<jsi::PropNameID> FrameHostObject::getPropertyNames(jsi::Runtime& rt) {
std::vector<jsi::PropNameID> result;
result.push_back(jsi::PropNameID::forUtf8(rt, std::string("toString")));
result.push_back(jsi::PropNameID::forUtf8(rt, std::string("isValid")));
result.push_back(jsi::PropNameID::forUtf8(rt, std::string("width")));
#pragma once
#import <jsi/jsi.h>
#import <CoreMedia/CMSampleBuffer.h>
#import "Frame.h"
using namespace facebook;
class JSI_EXPORT FrameHostObject: public jsi::HostObject {
public:
@ozcanzaferayan
ozcanzaferayan / Mmkv.cpp
Created September 6, 2021 12:15
MMKV library install method
void install(jsi::Runtime& jsiRuntime) {
// MMKV.set(key: string, value: string | number | bool)
auto mmkvSet = jsi::Function::createFromHostFunction(jsiRuntime,
jsi::PropNameID::forAsci(jsiRuntime, "mmkvSet"),
2, // key, value
[](
jsi::Runtime& runtime,
const jsi::Value& thisValue,
const jsi::Value* arguments,
size_t count) -> jsi::Value
@ozcanzaferayan
ozcanzaferayan / build.gradle
Last active June 19, 2021 07:41
Github packages publish
apply plugin: 'maven-publish'
def libVersion = '1.0.0'
def libGroupId = 'com.zaferayan.integration'
def repoUrl = 'https://maven.pkg.github.com/ozcanzaferayan/react-native-as-an-android-lib'
def repoName = "GitHubPackages"
def repoUsername = 'ozcanzaferayan'
def repoPassword = 'GITHUB_ACCESS_TOKEN' // Buraya Github üzerinden aldığınız değeri yapıştırın
@ozcanzaferayan
ozcanzaferayan / env.json
Created May 16, 2021 12:15
Heroku environment variables
{
"npm_config_cache_lock_stale": "60000",
"npm_config_ham_it_up": "",
"npm_config_legacy_bundling": "",
"npm_config_sign_git_tag": "",
"DATABASE_URL": "postgres://lkiqysqmjmgpjt:[email protected]:5432/df212u6qn2l0a6",
"npm_package_devDependencies_jest": "^26.6.3",
"npm_config_user_agent": "npm/6.14.13 node/v14.17.0 linux x64",
"npm_config_always_auth": "",
"npm_package_jest_testEnvironment": "node",