Skip to content

Instantly share code, notes, and snippets.

View aanndryyyy's full-sized avatar
🚀
Raising Fun

Andry Pedak aanndryyyy

🚀
Raising Fun
View GitHub Profile
@aanndryyyy
aanndryyyy / tailwind-font-weights.md
Created April 4, 2024 18:39
Tailwind Font Weights in Svelte/SvelteKit Project

Tailwind Font Weights in Svelte/SvelteKit Project

Run the following command in your SvelteKit project root

The Command Explained The command you've provided is a Bash loop that operates over a predefined list of font weight names. It performs a series of commands for each font weight name in the list. Let's break it down step by step to understand what it does:
  1. for n in thin extralight light normal medium semibold bold extrabold black; do ... done: This is a for loop in Bash. It iterates over a list of font weight names (thin, extralight, light, normal, medium, semibold, bold, extrabold, black). For each iteration, the variable $n takes on the value of the current font weight name from the list.

  2. echo "$n: " | tr -d '\n': Inside the loop, this command prints the name of the current font weight ($n), followed by a colon and a space, to the standard output. The echo command by default adds a newline at the end, but | tr -d '\n' removes

@aanndryyyy
aanndryyyy / Send-Ntfy.psm1
Created December 30, 2022 09:55
Ntfy.sh Powershell Module
$Uri = "https://ntfy.sh"
$Topic = "powershell_ntfy"
function Send-Ntfy {
param (
[Parameter(Mandatory)] [String]
# Message title.
$Title,
@aanndryyyy
aanndryyyy / webp_converter.sh
Created July 24, 2020 14:32
WebP Generator
#!/bin/bash
# Remove orphan webp images.
FILES=$(find . -type f -regextype posix-extended \
-regex "^\./(uploads)/.*\.(webp)$" \
-not -regex ".*\/(\.|scraper|temp).*")
for file in $FILES; do
#echo "Processing $file:"
if [ -f "${file%.*}.jpg" ] || [ -f "${file%.*}.png" ]; then