Skip to content

Instantly share code, notes, and snippets.

@acidjazz
acidjazz / tw-skeleton.css
Last active October 28, 2022 10:05
tailwind skeleton css
.skeleton {
--text-opacity: 0;
background-image: linear-gradient(100deg, #edf2f7 0%, #f4f7fa 20%, #edf2f7 40%);
background-position: 50%;
background-size: 200%;
animation: skeleton 1.25s infinite linear;
}
.skeleton-teal {
background-image: linear-gradient(100deg, #b4c5f8 0%, #cad8f9 20%, #b4c5f8 40%);
@deepak-cotocus
deepak-cotocus / cross-env-Permission-denied.md
Last active February 29, 2024 07:40
cross-env: Permission denied

Error:

sh: 1: cross-env: Permission denied Ubuntu

Introduction:

This is because of permission issues with global installation of packages, which npm is being denied access. I got this error in ubuntu machine while running a command npm run prod

Error:

@julianxhokaxhiu
julianxhokaxhiu / pagespeed_optimize_images.sh
Last active April 15, 2024 22:49
Recursively optimize all PNG and JPG files wherever they are from the script position and inner ( based on OPTING, PNGCRUSH, ADVANCECOMP and JPEGOPTIM )
#!/bin/bash
# Improved as per feedback from @pascal - https://gist.github.com/julianxhokaxhiu/c0a8e813eabf9d6d9873#gistcomment-3086462
find . -type f -iname "*.png" -exec optipng -nb -nc {} \;
find . -type f -iname "*.png" -exec advpng -z4 {} \;
find . -type f -iname "*.png" -exec pngcrush -rem gAMA -rem alla -rem cHRM -rem iCCP -rem sRGB -rem time -ow {} \;
find . -type f \( -iname "*.jpg" -o -iname "*.jpeg" \) -exec jpegoptim -f --strip-all {} \;