Skip to content

Instantly share code, notes, and snippets.

@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

How to setup a practically free CDN

I've been using [Backblaze][bbz] for a while now as my online backup service. I have used a few others in the past. None were particularly satisfactory until Backblaze came along.

It was - still is - keenly priced at a flat $5 (£4) per month for unlimited backup (I've currently got just under half a terabyte backed-up). It has a fast, reliable client. The company itself is [transparent about their operations][trans] and [generous with their knowledge sharing][blog]. To me, this says they understand their customers well. I've never had reliability problems and everything about the outfit exudes a sense of simple, quick, solid quality. The service has even saved the day on a couple of occasions where I've lost files.

Safe to say, I'm a happy customer. If you're not already using Backblaze, [I highly recommend you do][recommend].

Taking on the big boys with B2

@hachesilva
hachesilva / gmail-most-frequent-senders.sh
Last active April 30, 2024 14:22
Find the most frequent senders in your Gmail account
# Source: https://ryanfb.github.io/etc/2019/08/26/finding_the_most_frequent_senders_in_your_gmail_account.html
# Download a copy of your gmail account from https://takeout.google.com/
grep '^From:' ~/Downloads/YOUR_TAKEOUT_FILE.mbox | cut -d'<' -f2 | tr -d '>' | sort | uniq -c | sort -rn > gmail-frequent-senders.txt
<?php
/**
* Add the code below to your theme's functions.php file
* to add a confirm password field on the register form under My Accounts.
*/
function woocommerce_registration_errors_validation($reg_errors, $sanitized_user_login, $user_email) {
global $woocommerce;
extract( $_POST );
if ( strcmp( $password, $password2 ) !== 0 ) {
@hachesilva
hachesilva / cheatsheet.md
Last active October 15, 2021 04:18
Cheat sheets for my apps
@hachesilva
hachesilva / send-accented-a-on-altgr-a.ahk
Created June 23, 2021 03:44
AutoHotkey Script to Send accented a when pressing AltGr+A or Left-Ctrl+Right-Alt+A
; Send accented a when pressing AltGr+A or Left-Ctrl+Right-Alt+A
; This fixes Windows 10 issue preventing to type accented a on keyboard layouts
; that doesn't use DeadKeys
<^>!a::Send {Asc 160}
@hachesilva
hachesilva / _spacing.scss
Created January 7, 2021 21:14 — forked from XanderLuciano/_spacing.scss
This is a simple sass (rather scss) recreation of a bootstrap like spacing utility which allows you to quickly and easily set margin and padding sizes through classes like `mx-3`, `p-2`, and `pt-5`. You can define spacing values in $spacing and add or remove shorthand properties with the $prefixes variable. This uses `!important` to override any…
@mixin simpleSpace {
// margin and padding values
$spacings: (
0,
.25rem,
.5rem,
1rem,
1.5rem,
2rem,
@hachesilva
hachesilva / notifyme.sh
Created January 6, 2021 22:09
Notifyme me when a terminal command is done
# Source: https://news.ycombinator.com/item?id=25381535
# Usage: $ LONG-COMMAND; notifyme
function notifyme() {
MSG=${1:-'Terminal is done'}
TITLE=${2:-"Done!"}
osascript -e "display notification \"${MSG}\" with title \"${TITLE}\""
}
# Source: https://gist.github.com/juanique/4092969#gistcomment-3078760
function git_add_ssh_key () {
read -p "Enter github email : " email
echo "Using email $email"
if [ ! -f ~/.ssh/id_rsa ]; then
ssh-keygen -t rsa -b 4096 -C "$email"
ssh-add ~/.ssh/id_rsa
fi
pub=`cat ~/.ssh/id_rsa.pub`
read -p "Enter github username: " githubuser
@hachesilva
hachesilva / wsl-install-redis.sh
Created December 26, 2020 18:43
Install redis on WSL / ubuntu
# Source: https://anggo.ro/note/installing-redis-in-ubuntu-wsl/
# Update and upgrade Ubuntu
sudo apt update && apt upgrade
# Install Redis
sudo apt install redis-server
# Update redis.conf file
sudo nano /etc/redis/redis.conf