Skip to content

Instantly share code, notes, and snippets.

View ozcanzaferayan's full-sized avatar
⚛️
Overreacting

Özcan Zafer AYAN ozcanzaferayan

⚛️
Overreacting
View GitHub Profile
const fontSizeState = atom({
key: 'fontSizeState',
default: 14,
});
@ozcanzaferayan
ozcanzaferayan / README.MD
Created May 4, 2020 20:06
VsCode'da yazılan bir kodu Wordpress sitesine highlight edilmiş bir şekilde aktarmak için bu script'i kullanıyorum
  1. Vscode'a yazılan kodlar kopyalanır.
  2. MS Word açılarak yapıştırılır.
  3. MS Word'de Kaydet > Farklı Kaydet > Gözat'a tıklanır.
  4. Dosyanın kaydedileceği konuma gidilir. Kayıt türü kısmında "Web Sayfası, Filtre Uygulanmış (htm, html)" seçilir
  5. Çıkarn uyarı ekranında Evet'e tıklanıp kaydedilir.
  6. html dosyası Chrome'da açılır. Developer menu açılarak console sekmesine gelinir
  7. Wordpress_highlight_dom_duzeltici.js içerisindeki kodlar kopyalanıp, console'a yapıştırılır ve Enter'a basılarak çalıştırılır.
  8. Kodların çalışması sonucu HTML string üretilir. Bu string ifade wordpress sitesinde html kısmına yapıştırılır.
  9. Preview yaptığınızda HTML Kodu görüntülenir.
{"contents":{"launch":{"version":"0.2.0","configurations":[{"type":"node","request":"launch","name":"Launch via NPM","runtimeExecutable":"npm","runtimeArgs":["run-script","debug"],"port":9229},{"type":"node","request":"attach","name":"Attach to Remote","address":"localhost","port":9229,"localRoot":"${workspaceFolder}","remoteRoot":"${workspaceFolder}/backend/dist/index.js"},{"type":"node","request":"launch","name":"Launch Program","program":"${workspaceFolder}/backend/src/config/socket.io.ts","outFiles":["${workspaceFolder}/**/*.js"]}]}},"overrides":[],"keys":["launch.version","launch.configurations"]}
@ozcanzaferayan
ozcanzaferayan / App.tsx
Last active May 2, 2020 23:22
Rotate animation for weird piechart
/* eslint-disable react-native/no-inline-styles */
import React from 'react';
import {
SafeAreaView,
StyleSheet,
StatusBar,
Animated,
Easing,
} from 'react-native';
import Svg, {Circle} from 'react-native-svg';
@ozcanzaferayan
ozcanzaferayan / App.tsx
Last active May 2, 2020 22:51
Weird piechart with React Native SVG
/* eslint-disable react-native/no-inline-styles */
import React from 'react';
import {SafeAreaView, StyleSheet, StatusBar} from 'react-native';
import Svg, {Circle} from 'react-native-svg';
const App = () => {
const viewBoxWidth = 42;
const viewBoxHeight = viewBoxWidth;
const viewBox = `0 0 ${viewBoxWidth} ${viewBoxHeight}`;
const centerX = viewBoxWidth / 2;
@ozcanzaferayan
ozcanzaferayan / App.tsx
Created April 27, 2020 00:14
React Native WebRTC remoteStream example finished
import React, {useState} from 'react';
import {SafeAreaView, StyleSheet, View, Button} from 'react-native';
import {
RTCView,
mediaDevices,
MediaStream,
MediaStreamConstraints,
RTCPeerConnection,
MediaStreamTrack,
@ozcanzaferayan
ozcanzaferayan / App.tsx
Last active January 24, 2025 15:37
React Native WebRTC remoteStream example
import React, {useState} from 'react';
import {SafeAreaView, StyleSheet, View, Button} from 'react-native';
import {
RTCView,
mediaDevices,
MediaStream,
MediaStreamConstraints,
RTCPeerConnection,
} from 'react-native-webrtc';
@ozcanzaferayan
ozcanzaferayan / App.tsx
Last active October 25, 2022 16:18
React Native WebRTC localStream example
import React, {useState} from 'react';
import {SafeAreaView, StyleSheet, View, Button} from 'react-native';
import {
RTCView,
mediaDevices,
MediaStream,
MediaStreamConstraints,
} from 'react-native-webrtc';
@ozcanzaferayan
ozcanzaferayan / App.tsx
Created April 8, 2020 22:07
Sample WebSocket usage for React Native App with Typescript
import React, {useState, useEffect} from 'react';
import {
StyleSheet,
SafeAreaView,
FlatList,
View,
Text,
KeyboardAvoidingView,
TextInput,
TouchableOpacity,
@ozcanzaferayan
ozcanzaferayan / App.tsx
Created March 31, 2020 00:56
react-native-shimmer-placeholder with API example
/* eslint-disable prettier/prettier */
import React, {useEffect, useState} from 'react';
import {
SafeAreaView,
StyleSheet,
Text,
StatusBar,
View,
Image,
FlatList,