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 / App.tsx
Created March 31, 2020 00:23
react-native-shimmer-placeholder example
/* eslint-disable prettier/prettier */
import React, {useEffect, useState} from 'react';
import {
SafeAreaView,
StyleSheet,
Text,
StatusBar,
View,
Image,
FlatList,
@ozcanzaferayan
ozcanzaferayan / App.tsx
Last active March 17, 2020 22:37
React Native ile Coronavirus verileri web sitesinden HTML olarak nasıl çekilir ve JSON haline getirilir?
import React, { useEffect, useState } from 'react';
import {
SafeAreaView,
Text,
} from 'react-native';
import * as cheerio from 'cheerio-without-node-native';
interface MainNumbers {
coronavirusCases?: string;
deaths?: string;
@ozcanzaferayan
ozcanzaferayan / App.tsx
Last active March 17, 2020 20:25
React Native image clipping with SVG
/**
* @format
*/
import {AppRegistry} from 'react-native';
import {name as appName} from './app.json';
import React from 'react';
import {SafeAreaView, ScrollView, StatusBar, View} from 'react-native';
import Svg, {Image, Defs, ClipPath, Path, G} from 'react-native-svg';
@ozcanzaferayan
ozcanzaferayan / index.js
Last active March 17, 2020 22:50
Covid19 cheerio Example
// USAGE:
// mkdir coronavirusAPI && cd coronavirusAPI
// yarn init -y
// wget https://www.worldometers.info/coronavirus/
// mv index.html sample.html
// node index.js
var fs = require('fs');
const cheerio = require('cheerio');
const content = fs.readFileSync('sample.html', 'utf8');
import * as React from 'react';
import { AppRegistry, SafeAreaView, View, Text, TouchableOpacity, Button } from 'react-native';
import { name as appName } from './app.json';
import {Svg, Rect, Path } from 'react-native-svg';
import tailwind from 'tailwind-rn';
const App = () => {
return (
<SafeAreaView>
<View style={{margin: 5}}>
@ozcanzaferayan
ozcanzaferayan / App.tsx
Last active March 10, 2020 14:27
Bar chart for React Native and React Native Web
import React from "react";
import { StatusBar, SafeAreaView, ScrollView, View, Platform } from "react-native";
import colors from "../../res/styles/colors";
import AppBar from "../../components/AppBar";
import spacing from "../../res/styles/spacing";
import { HeaderLarge } from "../../home/shortages/HeaderLarge";
import BarChart, { BarData } from "./BarChart";
import DonutChart from "./DonutChart";
@ozcanzaferayan
ozcanzaferayan / _screenshot.png
Last active March 7, 2020 01:01
d3.js barchart'ta çubuk üzerine ilgili adet bilgisinin eklenmesi.
_screenshot.png
@ozcanzaferayan
ozcanzaferayan / _screenshot.png
Last active March 7, 2020 00:59
d3.js x ve y eksenlerinin eklenmesi. Bir önceki gist için: https://gist.github.com/ozcanzaferayan/6258c416e8ef6787b8fec07dbb0a1a71
_screenshot.png
@ozcanzaferayan
ozcanzaferayan / _screenshot.png
Last active March 6, 2020 22:49
d3.js ile barchart yapımı
_screenshot.png
@ozcanzaferayan
ozcanzaferayan / App.tsx
Last active March 6, 2020 11:28
React Native Dialog Modal Component and Usage
import React, { useState } from "react";
import { ViewStyle, Button } from "react-native";
import Modal from "../components/Modal";
export const App: React.FC = () => {
const [isShowing, setShowing] = useState(false);
const [text, onChangeText] = useState("");
return (