Skip to content

Instantly share code, notes, and snippets.

View nazrdogan's full-sized avatar
🎯
Busy

Nazır Doğan nazrdogan

🎯
Busy
View GitHub Profile
@nazrdogan
nazrdogan / ribbon.js
Last active November 14, 2023 19:01
React Native Ribbon
import * as React from 'react';
import { View, StyleSheet } from 'react-native';
import Constants from 'expo-constants';
import AssetExample from './components/AssetExample';
import Svg, {
SvgProps,
Path,
Polygon,
G,
Rect,
const App = () => {
const lastContentOffset = useSharedValue(0);
const isScrolling = useSharedValue(false);
const renderItem = ({ item }) => <Item title={item.title} />;
const scrollHandler = useAnimatedScrollHandler({
onScroll: (event) => {
if (lastContentOffset.value > event.contentOffset.y) {
if (isScrolling.value) {
console.log("UP");
}
@nazrdogan
nazrdogan / podfile
Last active November 23, 2020 16:24
AppClip pod
platform :ios, '9.0'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
def add_flipper_pods!(versions = {})
versions['Flipper'] ||= '~> 0.33.1'
versions['DoubleConversion'] ||= '1.1.7'
versions['Flipper-Folly'] ||= '~> 2.1'
versions['Flipper-Glog'] ||= '0.3.6'
versions['Flipper-PeerTalk'] ||= '~> 0.0.4'
versions['Flipper-RSocket'] ||= '~> 1.0'
//
// ViewController.m
// RNClip
//
// Created by Nazir Dogan on 30.06.2020.
//
#import "ViewController.h"
#import <React/RCTBundleURLProvider.h>
#import <React/RCTRootView.h>
import { AppRegistry, View, Text, Button } from 'react-native';
import React from 'react';
const AppClip = () => (
<View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
<Text style={{ fontSize: 22 }}>
React Native App Clip
</Text>
<Button
title="Learn More"
color="#841584"
import { AppRegistry, View, Text, Button } from 'react-native';
import React from 'react';
const AppClip = () => (
<View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
<Text style={{ fontSize: 22 }}>
React Native App Clip
</Text>
<Button
title="Learn More"
color="#841584"
@nazrdogan
nazrdogan / clear-cache
Created August 27, 2019 07:38
RN clear cache
rm -rf $TMPDIR/react-* && rm -rf $TMPDIR/metro-* && rm -rf $TMPDIR/haste-* && watchman watch-del-all && npm cache clean --force && npm cache verify && rm -rf ios/build && rm -rf node_modules/ && npm i
//
// ComNextchapterOrangeModule.swift
// orange
//
// Created by Your Name
// Copyright (c) 2019 Your Company. All rights reserved.
//
import UIKit
import TitaniumKit
class MyHomeScreen extends React.Component {
static navigationOptions = {
drawerLabel: 'Home',
drawerIcon: ({ tintColor }) => (
<Image
source={require('./chats-icon.png')}
style={[styles.icon, {tintColor: tintColor}]}
/>
),
};
@nazrdogan
nazrdogan / fix_exfat_drive.md
Created February 14, 2019 19:55 — forked from scottopell/fix_exfat_drive.md
Fix corrupted exFAT disk macOS/OSX

exFAT support on macOS seems to have some bugs because my external drives with exFAT formatting will randomly get corrupted.

Disk Utility is unable to repair this at first, but the fix is this:

  1. Use diskutil list to find the right drive id.
  2. You want the id under the IDENTIFIER column, it should look like disk1s1
  3. Run sudo fsck_exfat -d <id from above>. eg sudo fsck_exfat -d disk1s3
  4. -d is debug so you'll see all your files output as they're processed.
  5. Answer YES if it gives you the prompt Main boot region needs to be updated. Yes/No?