Skip to content

Instantly share code, notes, and snippets.

@hachesilva
hachesilva / mac-change-notch-whitespace.md
Created June 27, 2024 00:27
Built-in workaround for applications hiding under the MacBook Pro notch

Source: https://flaky.build/built-in-workaround-for-applications-hiding-under-the-macbook-pro-notch

# Change the whitespace settings value, value from 0 to 6
defaults -currentHost write -globalDomain NSStatusItemSelectionPadding -int 6
defaults -currentHost write -globalDomain NSStatusItemSpacing -int 6

# Revert to the original values
defaults -currentHost delete -globalDomain NSStatusItemSelectionPadding
defaults -currentHost delete -globalDomain NSStatusItemSpacing
@hachesilva
hachesilva / frontend-dev-handbook-2024.md
Last active June 15, 2024 04:38
The Front End Developer/Engineer Handbook 2024
@hachesilva
hachesilva / emailregex.js
Created November 22, 2023 14:47
Email regex validation - https://emailregex.com
const emailregex = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/
@hachesilva
hachesilva / .htaccess
Created September 16, 2023 01:31
Automatically serve files with UTF-8 encoding on Apache server
# Source: https://nicolasbouliane.com/blog/force-apache-serve-utf-8-default-htaccess
# Serve all text files as unicode
AddDefaultCharset utf-8
# Set encoding on individual file types
AddCharset utf-8 .html .css .js .php
@hachesilva
hachesilva / typescale.scss
Created June 21, 2023 21:43
Typography scales, sass version
// Source: https://typescale.com/
// Typography scales
$minor_second: 1.067;
$major_second: 1.125;
$minor_third: 1.200;
$major_third: 1.250;
$perfect_fourth: 1.333;
$augmented_fourth: 1.414;
$perfect_fifth: 1.500;
@hachesilva
hachesilva / settings.jsonc
Created June 12, 2023 19:00 — forked from hyperupcall/settings.jsonc
VSCode config to disable popular extensions' annoyances (telemetry, notifications, welcome pages, etc.)
// I'm tired of extensions that automatically:
// - show welcome pages / walkthroughs
// - show release notes
// - send telemetry
// - recommend things
//
// This disables all of that stuff.
// If you have more config, leave a comment so I can add it!!
{

Automating Daily Reports, because fuck it, really...

Each day at our company, developers are required to document their activities, painstakingly jotting down their daily work and future plans. A monotonous chore that I just really dislike.

So now, there's a scribe for that :

auto-dr-

Code

@hachesilva
hachesilva / system-colors.css
Created March 24, 2023 14:54
Dark-light color schemes using System default colors
/*
Source: https://blog.jim-nielsen.com/2021/css-system-colors/
*/
/* Set global color scheme without setting a background */
:root {
color-scheme: light dark;
}
/* Use system colors for dropdowns */
@hachesilva
hachesilva / update-alternatives.sh
Created March 3, 2023 21:52
Select python version using update-alternatives
sudo update-alternatives --config python3
@hachesilva
hachesilva / endv-bbox.txt
Last active February 8, 2022 04:23
End bbox notes
Start the project using a target domain (com, uk, es) and a backend env (staging):
TARGET=com BACKEND_DOMAIN=staging yarn start
/big/boss -> admin panel for developers
big/boss/cms/usage -> List of pages and their URLs where objects are in use
(gnome icon) -> components demo
https://partner-hernan-s-birchbox.myshopify.com/admin/online_store/preferences?tutorial=unlock
https://courses.wesbos.com/account/access/60464648b730de59f5ddaa4b
https://medium.com/@danwebb/better-shopify-theme-development-with-parcel-js-704f17f367fc