Skip to content

Instantly share code, notes, and snippets.

View eyupucmaz's full-sized avatar
🧭
🧑‍💻 Exploring

Eyup Ucmaz eyupucmaz

🧭
🧑‍💻 Exploring
View GitHub Profile
@eyupucmaz
eyupucmaz / eslint.config.mjs
Created April 28, 2025 13:13
Eslint Config File
// Run this command to generate base config and vs code settings:
// pnpm dlx @antfu/eslint-config@latest
import antfu from "@antfu/eslint-config";
export default antfu({
type: "app",
typescript: true,
formatters: true,
stylistic: {
@eyupucmaz
eyupucmaz / claude_3.5_sonnet_artifacts.xml
Created June 24, 2024 15:57 — forked from dedlim/claude_3.5_sonnet_artifacts.xml
Claude 3.5 Sonnet, Full Artifacts System Prompt
<artifacts_info>
The assistant can create and reference artifacts during conversations. Artifacts are for substantial, self-contained content that users might modify or reuse, displayed in a separate UI window for clarity.
# Good artifacts are...
- Substantial content (>15 lines)
- Content that the user is likely to modify, iterate on, or take ownership of
- Self-contained, complex content that can be understood on its own, without context from the conversation
- Content intended for eventual use outside the conversation (e.g., reports, emails, presentations)
- Content likely to be referenced or reused multiple times
@eyupucmaz
eyupucmaz / crypto-blog-coin.js
Last active January 23, 2022 16:10
Coin Component
import styles from "./Coin.module.css"; // using module css for styling
import { AiFillCaretDown, AiFillCaretUp } from "react-icons/ai"; // icons for show increase and decrease
import { useContext } from "react"; // hook for getting state of currency
import { CoinContext } from "../../Context/CoinContext"; // context
// Components take a data prop which is an object of each coin data
const Coin = ({ data }) => {
// getting currency state with context hook
const { currency } = useContext(CoinContext);
@eyupucmaz
eyupucmaz / crypto-blog-header.js
Last active January 23, 2022 15:38
Header Component
import { useContext } from "react";
import { CoinContext } from "../../Context/CoinContext";
import styles from "./Header.module.css";
import { VscGithubAlt } from "react-icons/vsc";
const Header = () => {
// I'm using useContext hook to get states and setstates functions
// searchInput is a state of search bar and it sets with setSearchInput
// I've also changing currency of data options so in this reason i should
// keep in a state which currency showing.
var posts = [
{
title: 'How to find murderer?',
author: 'Sherlock Holmes',
tags: ["advice", "learn", "howto","baker"],
category: "Learning"
},
{
title: 'How to find murderer?',
author: 'Sherlock Holmes',
<form>
<fieldset>
<legend>Human:</legend>
<label for="fname">First name:</label>
<input type="text" id="fname" name="fname"><br><br>
<label for="lname">Last name:</label>
<input type="text" id="lname" name="lname"><br><br>
<label for="emai">Email:</label>
<input type="email" id="email" name="email"><br><br>
<label for="birthday">Birthday:</label>
<address>
Written by <a href="mailto:[email protected]">Sherlock Holmes</a>.<br>
Visit us at:<br>
sherlock.com<br>
Baker St. 221b, London<br>
United Kingdom
</address>
<select name="cars" id="cars">
<optgroup label="Swedish Cars">
<option value="volvo">Volvo</option>
<option value="saab">Saab</option>
</optgroup>
<optgroup label="German Cars">
<option value="mercedes">Mercedes</option>
<option value="audi">Audi</option>
</optgroup>
</select>
// www.eyupucmaz.site
// Adafuit kütüphanesi kullanılmıştır.
#include "DHT.h"
#define DHTPIN 2 // Digital pin connected to the DHT sensor
// Feather HUZZAH ESP8266 note: use pins 3, 4, 5, 12, 13 or 14 --
// Pin 15 can work but DHT must be disconnected during program upload.
// Uncomment whatever type you're using!
//#define DHTTYPE DHT11 // DHT 11
@eyupucmaz
eyupucmaz / LightHome.ino
Last active September 25, 2017 14:02
LightHome
//Gerekli Kütüphane tanımlaması
#include <SoftwareSerial.h>
//Kullanacağımız Seri Haberleşme Pinlerini Tanımlıyoruz.
SoftwareSerial mySerial(10, 11); // RX, TX
//Röle Kontrolü yapacağımız pinler tanımlanıyor
const int relay1 = 13;
const int relay2 = 12;
//Setup fonksiyonu Arduino ilk açıldığında sadece bir kere çalışacak olan kodlarımız
void setup()
{