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 / README.MD
Last active May 23, 2023 13:08
React Native SVGR Usage

SVG file (./src/images/ic_youtube.svg):

<?xml version="1.0" ?>
<svg height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
  <path d="M21.582,6.186c-0.23,-0.86 -0.908,-1.538 -1.768,-1.768C18.254,4 12,4 12,4S5.746,4 4.186,4.418c-0.86,0.23 -1.538,0.908 -1.768,1.768C2,7.746 2,12 2,12s0,4.254 0.418,5.814c0.23,0.86 0.908,1.538 1.768,1.768C5.746,20 12,20 12,20s6.254,0 7.814,-0.418c0.861,-0.23 1.538,-0.908 1.768,-1.768C22,16.254 22,12 22,12S22,7.746 21.582,6.186zM10,15.464V8.536L16,12L10,15.464z" fill="#000000FF"/>
</svg>

CLI usage:

svgr ./src/images -d ./src/svg --native --icon --svg-props "width=24,height=24"
@ozcanzaferayan
ozcanzaferayan / resume.json
Last active January 31, 2023 00:00
resume.json
{
"$schema": "https://raw.githubusercontent.com/jsonresume/resume-schema/v1.0.0/schema.json",
"basics": {
"name": "Zafer AYAN",
"label": "Frontend Developer",
"image": "https://www.gravatar.com/avatar/b3cb368f71c8cca1fb0a74df0ffad2dd?s=200&r=pg&d=mm",
"email": "ozcanzaferayan@gmail.com",
"phone": "0531",
"url": "https://github.com/ozcanzaferayan",
"summary": "I'm a software engineer with over 8 years of experience designing, developing and maintaining fullstack web and mobile applications.",
@ozcanzaferayan
ozcanzaferayan / list.txt
Created January 25, 2023 23:07
json resume theme list
ace
actual
apage
autumn
caffeine
class
classy
cora
dave
elegant
@ozcanzaferayan
ozcanzaferayan / main.test.ts
Last active January 19, 2023 10:05
Gets percentage rounds in TypeScript
import { assertEquals } from "https://deno.land/std@0.173.0/testing/asserts.ts";
import { getPercentageRounds } from "./main.ts";
Deno.test(function getPercentageRoundsTest() {
assertEquals(getPercentageRounds(0), "⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪");
assertEquals(getPercentageRounds(0.04), "🔵⚪⚪⚪⚪⚪⚪⚪⚪⚪");
assertEquals(getPercentageRounds(0.1), "🔵⚪⚪⚪⚪⚪⚪⚪⚪⚪");
assertEquals(getPercentageRounds(0.5), "🔵🔵🔵🔵🔵⚪⚪⚪⚪⚪");
assertEquals(getPercentageRounds(0.6), "🔵🔵🔵🔵🔵🔵⚪⚪⚪⚪");
assertEquals(getPercentageRounds(1), "🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵");
@ozcanzaferayan
ozcanzaferayan / README.js
Last active December 21, 2022 21:57
Dreambooth Prompts
photo of zaferayan person with cybernetic enhancements and unique hair lost in the desert, scifi character portrait by greg rutkowski, esuthio, craig mullins, short beard, green eyes, 1 / 4 headshot, cinematic lighting, dystopian scifi gear, gloomy, profile picture, mechanical, half robot, implants, steampunk
A colorful closeup portrait of a zaferayan with a beard and with a shirt and dreaming psychedelic hallucinations in the vast icy landscape of antarctica, by kawase hasui, moebius and edward hopper, colorful flat surreal design, hd, 8 k, artstation
Portrait of zaferayan as ironman, 30 years old, male, gorgeous, detailed face, amazing, intricate, highly detailed, digital painting, artstation, concept art, sharp focus, illustration, art by greg rutkowski and alphonse mucha
Portrait of zaferayan as cyberpunk city person, neon background, 30 years old, male, gorgeous, detailed face, amazing, intricate, highly detailed, digital painting, artstation, concept art, sharp focus, illustration, art by greg rutkowsk
@ozcanzaferayan
ozcanzaferayan / index.js
Last active December 19, 2022 07:26
I want you to act as a Senior Frontend developer. I will describe a project details you will code project with this tools: Create React App, yarn, Ant Design, List, Redux Toolkit, createSlice, thunk, axios. You should merge files in single index.js file and nothing else. Do not write explanations. My first request is "Create Pokemon App that lis…
// I want you to act as a Senior Frontend developer. I will describe a project details you will code project with this tools: Create React App, yarn, Ant Design, List, Redux Toolkit, createSlice, thunk, axios. You should merge files in single index.js file and nothing else. Do not write explanations. My first request is "Create Pokemon App that lists pokemons with images that come from PokeAPI sprites endpoint"
import React, { useEffect } from "react";
import ReactDOM from "react-dom";
import { Provider, useDispatch, useSelector } from "react-redux";
import { createStore, applyMiddleware, combineReducers } from "redux";
import thunk from "redux-thunk";
import axios from "axios";
import { createAsyncThunk, createSlice } from "@reduxjs/toolkit";
import { List } from "antd";
@ozcanzaferayan
ozcanzaferayan / index.js
Created December 17, 2022 22:20
I want you to act as a Senior Frontend developer. I will describe a project details you will code project with this tools: Create React App, yarn, tailwindCSS, Redux Toolkit, createSlice, thunk, axios. You should only reply file contents, and nothing else. Do not write explanations. My first request is "Create Pokemon App that lists pokemons"
import React from "react";
import ReactDOM from "react-dom/client";
import {
createSlice,
configureStore,
createAsyncThunk,
} from "@reduxjs/toolkit";
import { Provider, useDispatch, useSelector } from "react-redux";
import axios from "axios";
@ozcanzaferayan
ozcanzaferayan / My.js
Last active December 16, 2022 14:23
My profile photos
https://photos.app.goo.gl/KZwjt4yrPoKtRqs38
https://github.com/aitrepreneur/REGULARIZATION-IMAGES-SD
@ozcanzaferayan
ozcanzaferayan / craco.config.js
Last active November 23, 2022 11:39
KTU workshop
/* craco.config.js */
const path = require(`path`);
module.exports = {
webpack: {
alias: {
"@components": path.resolve(__dirname, "src/components"),
"@features": path.resolve(__dirname, "src/features"),
},
},
@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';