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
| #!/bin/bash | |
| # optimize-images: Universal image optimization script | |
| # Usage: optimize-images [options] [input_path] | |
| # If no input path is provided, uses current directory | |
| # Options: | |
| # -q, --quality JPEG/WebP quality (default: 82) | |
| # -w, --width Maximum width (default: 1920, maintains aspect ratio) | |
| # -f, --format Convert to format (jpg, png, webp) | |
| # --help Show this help message |
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
| Principles of Programmer Productivity | |
| "What one programmer can do in one month, two programmers can do in two months." — Fred Brooks | |
| 🧠 Spaced-repetition: Fine-grained Loading API in Nuxt | |
| The best way to commit something to long-term memory is to periodically review it, gradually increasing the time between reviews 👨🔬 | |
| Actually remembering these tips is much more useful than just a quick distraction, so here's a tip from a couple weeks ago to jog your memory. | |
| In Nuxt we can get detailed information on how our page is loading with the useLoadingIndicator composable: |
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
| # Project Specification Document | |
| ## 1. Project Basics | |
| **Project Name:** | |
| **Client:** | |
| **Project Type:** | |
| - [ ] Website | |
| - [ ] Web Application | |
| - [ ] E-commerce | |
| - [ ] Landing Page |
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
| 1. **DOM Access Timing** | |
| Use Vue/Nuxt lifecycle hooks to ensure DOM readiness: | |
| ```vue | |
| <script setup> | |
| import { onMounted } from 'vue' | |
| import gsap from 'gsap' | |
| onMounted(() => { | |
| // DOM is ready here for GSAP animations |
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
| // "use strict"; | |
| window.addEventListener('load', () => { | |
| (function () { | |
| gsap.registerPlugin(ScrollTrigger); | |
| gsap.set('body', {autoAlpha: 1}) | |
| gsap.set('html', {overflow: 'visible'}) |
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
| gem install gist |
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
| [text* fname placeholder "First name*"][text* lname placeholder "Last name*"][email* email placeholder "Email address*"][text* tel placeholder "Telephone*"][text* city placeholder "City*"][text* postcode placeholder "Postcode*"][text company placeholder "Company"][text website placeholder "Website"][select country "Afghanistan" "Albania" "Algeria" "American Samoa" "Andorra" "Angola" "Anguilla" "Antarctica" "Antigua and Barbuda" "Argentina" "Armenia" "Aruba" "Australia" "Austria" "Azerbaijan" "Bahamas" "Bahrain" "Bangladesh" "Barbados" "Belarus" "Belgium" "Belize" "Benin" "Bermuda" "Bhutan" "Bolivia" "Bosnia and Herzegowina" "Botswana" "Bouvet Island" "Brazil" "British Indian Ocean Territory" "Brunei Darussalam" "Bulgaria" "Burkina Faso" "Burundi" "Cambodia" "Cameroon" "Canada" "Cape Verde" "Cayman Islands" "Central African Republic" "Chad" "Chile" "China" "Christmas Island" "Cocos Islands" "Colombia" "Comoros" "Congo" "the Democratic Republic of the Congo" "Cook Islands" "Costa Rica" "Cote d'Ivoire" "Croatia |
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
| Options -Indexes | |
| <Files ~ '\.(env|json|config.js|md|gitignore|gitattributes|lock)$'> | |
| Order allow,deny | |
| Deny from all | |
| </Files> | |
| <Files ~ '(composer.json)$'> | |
| Order allow,deny | |
| Deny from all | |
| </Files> | |
| RewriteEngine on |
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
| Options +FollowSymLinks | |
| RewriteEngine On | |
| RewriteBase / | |
| RewriteRule ^wp-content/uploads/(.*) https://dev.yoyo-designs.com/wp-content/uploads/$1 [R=301,NC,L] | |
| #This Apache config file was created by Duplicator Installer on 2021-05-18 00:49:17. | |
| #The original can be found in archived file with the name .htaccess__[HASH] | |
| # BEGIN WordPress | |
| # The directives (lines) between "BEGIN WordPress" and "END WordPress" are | |
| # dynamically generated, and should only be modified via WordPress filters. |
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
| convert image.jpg -sampling-factor 4:2:0 -strip -quality 85 -interlace JPEG -colorspace RGB image_converted.jpg |
NewerOlder