Skip to content

Instantly share code, notes, and snippets.

View josethz00's full-sized avatar
🏠
Working from home

José Thomaz josethz00

🏠
Working from home
View GitHub Profile
@josethz00
josethz00 / delete_node_modules.sh
Last active January 26, 2024 18:59
delete all node_modules in the system
#!/bin/bash
echo "Searching for node_modules directories..."
# Assuming NVM is installed in the default location, update this if you have a custom NVM directory
NVM_DIR="$HOME/.nvm"
# exclude nvm
find $HOME -path $NVM_DIR -prune -o -name "node_modules" -type d -print | while read dir; do
echo "Deleting $dir..."
@josethz00
josethz00 / sr-frontend-interview-questions-answered.md
Last active November 11, 2024 15:09
Sr. Frontend Interview Questions

Senior Frontend Interview Questions

Some questions about frontend development that might be in your next job interview. The questions were formulated by @mauvieira, a super senior fullstack developer

General Frontend

  • What are the strategies we can use to optimize the performance of web applications?

    • CDNs, GraphQL (maybe) to reduce overfetching, improve backend performance, use SSR and/or SSG, lazy loading for loading assets only when it's needed, minimize and compress HTML, CSS and JS files, and optimize images by compressing and resizing them.
  • What are Web Vitals (LCP, FID, CLS)? And how are they applied in the real world?

@josethz00
josethz00 / oracle-s3-compatibility.py
Last active April 12, 2023 14:28
Upload files to Oracle Cloud Storage using AWS S3 python SDK
import boto3, dotenv, os
# Load .env file
dotenv.load_dotenv()
# Oracle Cloud Infrastructure has a compatibility API for S3, so we can use the boto3 library to connect to OCI Object Storage
# For more information on the compatibility API, see: https://docs.cloud.oracle.com/en-us/iaas/Content/Object/Tasks/s3compatibleapi.htm
# Keep in mind that for the compatibility API to work, you need to do some extra configuration in your OCI Object Storage Bucket
s3 = boto3.resource(
's3',