Skip to content

Instantly share code, notes, and snippets.

View sadeghbarati's full-sized avatar
🤨

Sadegh Barati sadeghbarati

🤨
  • Iran, Mashhad
  • 13:44 (UTC +03:30)
View GitHub Profile
@yyx990803
yyx990803 / 3.4.md
Last active December 29, 2023 16:42
[DRAFT] Vue 3.4 aggregated changelog

[DRAFT] 3.4.0 Aggregated Changelog

This is the aggregated changelog for 3.4 that includes changes landed in all alpha and beta pre-releases. For changelog of individual pre-releases, please check here.

Features

@jsonbytes
jsonbytes / gist:d4a8b59a7de68507dab42a9544564f26
Created December 4, 2023 13:37
General purpose API Client
import axios, {
AxiosError,
AxiosInstance,
AxiosRequestConfig,
AxiosResponse,
InternalAxiosRequestConfig,
} from "axios";
import { API_BASE_URI } from "../config/apiConfig";
import { ErrorResponse, FetchResponse } from "@sapience/common";
@webfansplz
webfansplz / Introducing Vue DevTools (Vite Plugin).md
Last active January 1, 2024 12:32
Introducing Vue DevTools (Vite Plugin)

Introduction:

In recent years, there has been an increasing focus on improving the developer experience (DX). Tools and frameworks have been striving to enhance it. I believe everyone already knows Vite, a tool that has gained significant popularity in the frontend build tooling in recent years. It's fast, but that's not its only advantage.Vite's ecosystem has seen rapid growth due to its user-friendly and highly extensible plugin design mechanism.This allows developers to quickly integrate Vite into their tools and frameworks. Anthony Fu opensourced the Nuxt DevTools on Vue Amsterdam 2023,a new tool to help you understand your Nuxt app and improve the developer experience even further. It deeply moved and inspired me, why can't Vue have a similarly cool tool? We all know that there is an official Vue Devtools browser extension, but can we create a Vue Devtools that is bound to Vite an

import { useCalendar } from '@h6s/calendar';
import { useMachine } from '@xstate/react';
import { Button as AriaButton } from 'ariakit/button';
import clsx from 'clsx';
import { isSunday, isSameDay, addMonths, isFuture, isPast, setDate } from 'date-fns';
import format from 'date-fns/format';
import isWithinInterval from 'date-fns/isWithinInterval';
import { FC, useCallback, useMemo } from 'react';
import Select from '@components/forms/components/Select';
@marcoarment
marcoarment / S3.php
Last active June 25, 2023 19:41
A simple PHP class to perform basic operations against Amazon S3 and compatible services.
<?php
/*
A simple PHP class to perform basic operations against Amazon S3 and compatible
services. Requires modern PHP (7+, probably) with curl, dom, and iconv modules.
Copyright 2022 Marco Arment. Released under the MIT license:
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
@inxilpro
inxilpro / README.md
Created July 22, 2022 21:01
Fully namespaced Tailwind config for widget or embeddable component

Sometimes you need to publish a CSS file for 3rd-party consumption (i.e. default styles for an embeddable JS widget). This set up lets you continue to use Tailwind, but scope all your styles to a specific selector.

Simply replace .internachi with your own widget namespace, set up Tailwind as you please, and run generate.sh to build a custom version of your Tailwind styles that won't interfere with other CSS rules (including the Tailwind reset).

@EllyLoel
EllyLoel / reset.css
Last active April 13, 2024 18:14
CSS Reset
/*
Made by Elly Loel - https://ellyloel.com/
With inspiration from:
- Josh W Comeau - https://courses.joshwcomeau.com/css-for-js/treasure-trove/010-global-styles/
- Andy Bell - https://piccalil.li/blog/a-modern-css-reset/
- Adam Argyle - https://unpkg.com/open-props@1.3.16/normalize.min.css / https://codepen.io/argyleink/pen/KKvRORE
Notes:
- `:where()` is used to lower specificity for easy overriding.
*/
@idiotWu
idiotWu / use-signal.js
Last active December 31, 2022 05:56
useSignal() Hook
const initialState = {
activated: false,
resolve: () => {},
};
function useSignal() {
const [state, setState] = useState(initialState);
function init() {
return new Promise((resolve) => {
@antfu
antfu / doc-table.md
Last active October 14, 2023 20:09
Doc Table in Markdown

Example

Name

Description