find . -type f -name "*.jpg" -exec identify -format '%w %i\n' "{}" \; | awk '$1 > 800 {print $2}' | xargs -I {} convert "{}" -resize 800x "{}"
This file contains 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
#!/bin/bash | |
# Path to the folder containing the .jpg photos | |
folder_path="./photos" | |
total_files=$(find "$folder_path" -type f -name "*.jpg" | wc -l) | |
current_file=0 | |
echo "Processing photos..." |
Simple one-line command argument to batch convert images.
for file in *.jpeg; do filename="${file%.*}"; convert "$file" "${filename}.jpg"; done
This script is modeled after tee
(see [man tee
][2]) and works on Linux, macOS, Cygwin, WSL/WSL2
It's like your normal copy and paste commands, but unified and able to sense when you want it to be chainable.
This project started as an answer to the StackOverflow question: [How can I copy the output of a command directly into my clipboard?][3]
This file contains 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
/** @type {import('tailwindcss').Config} */ | |
module.exports = { | |
content: [], | |
darkMode: ["class"], | |
theme: { | |
colors: { | |
transparent: "transparent", | |
current: "currentColor", | |
white: "#ffffff", | |
black: "#000000", |
This file contains 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 Image from 'next/image' | |
import { Layout, Text, Page, Code, Link, List } from '@vercel/examples-ui' | |
import { GetStaticProps } from 'next' | |
import useSWR from 'swr' | |
import { useEffect, useState } from 'react' | |
import board from '../public/board.jpg' | |
interface Product { | |
id: string |
This file contains 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
"use client" | |
import { useEffect } from "react" | |
import Link from "next/link" | |
import { | |
motion, | |
useMotionTemplate, | |
useMotionValue, | |
useScroll, | |
useTransform, |