- Tip: Write "Make a plan to " and what you intend to ask, and click "Ask" instead of "Code". It will most of the time generate a better prompt than you would by yourself.
- List all unused stuff (dependencies, files), and create tasks to remove each one.
- Run
npm i
and create a task to fix each warning. - Run
npx npm-check
in each package and create a task to fix each warning. - List all the flows in the app, then imagine how they could be 100% more intuitive, and create tasks to implement each.
- List all the most critical paths that are untested right now, and create a task to create the tests for each.
- List all
npm
packages this project could benefit from. For each of them, create an implementation task. - List all
Vite
plugins this project could benefit from. For each of them, create an implementation task. - This is an old project. Try to run it, then create a task for all the things that need fixing.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Snippet to auto-check the checkboxes of Github notifications about Pull Request that have been merged | |
Paste this in your console | |
*/ | |
Array.from(document.querySelectorAll('li.notifications-list-item')) | |
.filter(li => li.querySelector('.octicon-git-merge.color-fg-done')) | |
.forEach(li => li.querySelector('label > input[type=checkbox]:not(:checked)').click()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as React from "react"; | |
declare global { | |
namespace JSX { | |
interface IntrinsicElements { | |
"amp-3d-gltf": React.DetailedHTMLProps< | |
{ | |
alpha?: "false" | "true"; | |
antialiasing?: "false" | "true"; | |
autorotate?: "false" | "true"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {jsx} from "slate-hyperscript"; | |
import {JSDOM} from "jsdom"; | |
const DOMParser = new JSDOM().window.DOMParser | |
const htmlToAST = (html: string) => { | |
const parsed = new DOMParser().parseFromString(html, 'text/html') | |
return deserialize(parsed.body) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// yarn add posthtml-parser | |
import parser from 'posthtml-parser' | |
// Paste your HTML component here | |
const html = ` | |
<Box | |
fontSize="12px" | |
lineHeight="16px" | |
textAlign="right" | |
/> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ffmpeg -i input.mov -vf mpdecimate,setpts=N/FRAME_RATE/TB output.mov |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { ReactElement, ReactNode, useState } from 'react' | |
export interface IFlagContext { | |
userEmail: string | null | |
sendEmail: boolean | |
changeUserEmail: (email: string) => void | |
} | |
const FlagContext = React.createContext<IFlagContext | null>(null) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require('dotenv').load(); | |
const db = require('../lib/db'); | |
const fetchFacebookLikes = require('../lib/fetch-facebook-likes'); | |
const facebook = { | |
updateLikes: async () => { | |
console.log('Fetching Facebook likes'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require('dotenv').load(); | |
const db = require('../lib/db'); | |
const md5 = require('../lib/md5'); | |
const fetchAmazonSearchResults = require('../lib/fetch-amazon-search-results'); | |
const amazon = { | |
updateSearchResults: async query => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const scrapeIt = require('scrape-it'); | |
const fetchAmazonSearchResults = async query => { | |
const {data} = await scrapeIt(process.env.AMAZON_SEARCH_URL + query, { | |
results: { | |
listItem: '.s-result-item', | |
data: { | |
image: { | |
selector: '.s-image', |
NewerOlder