Skip to content

Instantly share code, notes, and snippets.

View kyo504's full-sized avatar
😷
Hope everyone stay safe from COVID-19

Daniel Jung kyo504

😷
Hope everyone stay safe from COVID-19
  • @home
  • Seoul, South Korea
View GitHub Profile
@kyo504
kyo504 / .eslintrc
Last active May 29, 2018 15:34
Prettier + ESLint for React Native
{
"extends": [
"plugin:flowtype/recommended",
"plugin:react/recommended",
"plugin:import/errors",
"plugin:import/warnings",
"prettier",
"prettier/flowtype",
"prettier/react"
],
@kyo504
kyo504 / index.ios.js
Created April 12, 2017 16:38
Store base64 image with AsyncStorage
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
View,
ImageStore,
Image,
ImageEditor,
AsyncStorage,
Button,
@kyo504
kyo504 / SwipeableListViewSample.js
Created April 5, 2017 10:07
SwipeableListView Sample
import React, { Component } from 'react';
import {
Image,
Text,
View,
StyleSheet,
TouchableHighlight,
StatusBar,
ListView,
} from 'react-native';
@kyo504
kyo504 / pr.md
Created March 28, 2017 01:51 — forked from piscisaureus/pr.md
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@kyo504
kyo504 / RNAudioPlayer.h
Created March 16, 2017 09:58
iOS native module
#import <React/RCTBridgeModule.h>
@import AVFoundation;
@interface RNAudioPlayer : NSObject <RCTBridgeModule>
@property (strong, nonatomic) AVPlayerItem *playerItem;
@property (strong, nonatomic) AVPlayer *player;
@end
@kyo504
kyo504 / AndroidManifest.xml
Last active July 17, 2020 13:20
Android native module
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.eegoma.RNAudioPlayer">
<uses-permission android:name="android.permission.INTERNET" />
<application
android:allowBackup="true">
</application>
</manifest>
@kyo504
kyo504 / CustomToastModule.java
Last active November 10, 2020 05:52
[React Naitve] Native module for android
package com.your.package.name;
import android.widget.Toast;
import android.app.Activity;
import com.facebook.react.bridge.NativeModule;
import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.bridge.ReactContext;
import com.facebook.react.bridge.ReactContextBaseJavaModule;
import com.facebook.react.bridge.ReactMethod;