Skip to content

Instantly share code, notes, and snippets.

@raelsei
raelsei / regex4css.css
Created August 24, 2022 23:55
regexinator
//regex select all classnames from css file remove duplicates and sort alphabetically and parse kebab case to PascalCase and remove spaces
const classes = r
.match(/\.([a-zA-Z0-9-_]+)/g)
.map((c) => c.replace(/\./g, ""))
.filter((c, i, a) => a.indexOf(c) === i)
.sort()
.map((c) =>
c.replace(/-/g, " ").replace(/\b\w/g, (l) => l.toUpperCase())
)
.map((i) => {
@raelsei
raelsei / fi.css
Last active August 24, 2022 23:58
.dcube:before {
content: "\e901";
}
.d-cube-scan:before {
content: "\e902";
}
.d-rotate:before {
content: "\e903";
}
git fetch --all
git checkout env/preprod
git pull
git checkout -b feature-cherrypick-branch
git cherry-pick 59881b6e361c612e8063c59a37414a642f0901d1
git push origin feature-cherrypick-branch
create merge branch to env/preprod

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@raelsei
raelsei / .p10k.zsh
Last active April 12, 2022 21:45
setup
# Generated by Powerlevel10k configuration wizard on 2021-10-25 at 22:57 +03.
# Based on romkatv/powerlevel10k/config/p10k-pure.zsh, checksum 13301.
# Wizard options: awesome-fontconfig + powerline + python, small icons, pure, snazzy,
# 1 line, compact, instant_prompt=verbose.
# Type `p10k configure` to generate another config.
#
# Config file for Powerlevel10k with the style of Pure (https://github.com/sindresorhus/pure).
#
# Differences from Pure:
#
@raelsei
raelsei / ButtonTail.tsx
Created April 3, 2022 02:22
Tailwind Button Example
import { FC } from "react";
import cn from "utils/classnames";
interface ButtonProps {
children: React.ReactNode;
onClick?: React.MouseEventHandler;
iconLeft?: string;
iconRight?: string;
href?: string;
size?: string;
@raelsei
raelsei / arr.js
Last active September 24, 2021 21:34
arr.js
const tools = [
{
title: 'coolors.co',
description: 'Generate or browse beautiful color combinations for your designs.',
poster: 'coolors.jpg',
url: 'https://coolors.co/',
categories: [
'frontend',
'ui'
]
@raelsei
raelsei / easy-fetch.js
Created July 14, 2021 21:13
easy-fetch
export default async function $fetch({ url, method, body, headers }) {
if (!url) return;
try {
const response = await fetch(url, {
method: method,
body: JSON.stringify(body),
headers: headers,
});
const data = await response.json();
{
"employees": [
{
"id": "NDM4MTk5NDA3Ng==",
"fullName": "Sıla Hamzaoğlu",
"address": "579 Körmükçü Forges",
"phone": "+90-639-811-3-430",
"email": "Akdemir66@hotmail.com",
"avatar": "https://cdn.fakercloud.com/avatars/ahmetalpbalkan_128.jpg",
"jobTitle": "Forward Web Engineer"