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.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 / meditation.md
Created August 19, 2022 07:42
Gündelik Meditasyon pratiği
  1. Meditasyon için ne kadar zaman harcayacağını belirle. Yazarın önerisi 2-10dk olmuş. Bundan daha fazlası bunaltıcı olabiliyor. Bu nedenle yumuşak ve nazik bir başlamak daha iyidir.
  2. Nerede meditasyon yapman gerektiğine karar ver. Genellikle sessiz bir oda en iyisi oluyor. Meditasyonu yere oturarak veya sandalyede de yapabilirsin.
  3. Ne kadar meditasyon yapacaksan bir alarm kur. Bu sayede her 15 saniyede bir saati kontrol etmek zorunda kalmazsın.
  4. Otur, burnundan derin bir nefes al ve ağzından dışarı ver. Devamında gülümse.
  5. Yavaşça nefes al ve havanın burnundan içeri girerek ağzından dışarı çıkışını gözlemle. Her nefesi tek seferde çek ve tek seferde ver. Bu şekilde 10 nefese kadar say ve tekrar başa dön.
  6. Zihnin dağıldığında dur, fikirleri kabul et, gülümse, ve tekrar nefesine geri dön. Bu adım diğer adımların en önemlisi. Zihninin dağılması kaçınılmaz bir durum ama bunun için de kendimizi cezalandirmamamız gerekiyor. Bu aslında normal bir davranış ancak zihnimize de bunu kabul ettiğimizi hatırlat
@ozcanzaferayan
ozcanzaferayan / webpack.config.js
Created July 19, 2022 11:16
React Native Web Webpack 5 config
const path = require('path');
const HTMLWebpackPlugin = require('html-webpack-plugin');
const HTMLWebpackPluginConfig = new HTMLWebpackPlugin({
template: path.resolve(__dirname, './public/index.html'),
filename: 'index.html',
inject: 'body',
});
module.exports = {
@ozcanzaferayan
ozcanzaferayan / istekler.js
Created April 14, 2022 21:02
Linkedin tüm istekleri kabul etme / Linkedin accept all invitations
var x = document.querySelectorAll('button.artdeco-button--secondary');
for (var i = 0; i < x.length; i++) {
x[i].click();
}
@ozcanzaferayan
ozcanzaferayan / App.test.tsx
Created March 6, 2022 10:02
Testing react component - auto mocking - App.test.tsx
import { fireEvent, render, screen } from "@testing-library/react";
import App from "./App";
import fetchMock from "jest-fetch-mock";
import fetch from "jest-fetch-mock";
fetchMock.enableMocks();
beforeEach(() => {
fetch.resetMocks();
});
@ozcanzaferayan
ozcanzaferayan / Repos.test.tsx
Created March 4, 2022 23:06
Testing react components - Repos.test.tsx
import { fireEvent, render, screen } from "@testing-library/react";
import Repos from "./Repos";
test("renders user's repos", async () => {
render(<Repos />);
const button = screen.getByText(/Get repos/i);
fireEvent.click(button);
const txtRepo = await screen.findByText(/boysenberry/i);
expect(txtRepo).toBeInTheDocument();