Skip to content

Instantly share code, notes, and snippets.

View ganobrega's full-sized avatar
🍴
Cooking something

Gabriel Nobrega ganobrega

🍴
Cooking something
  • Brazil, São Paulo
View GitHub Profile
@ganobrega
ganobrega / download.sh
Created March 26, 2025 01:38
Download all repositories from a organization
#!/bin/bash
eval "$(ssh-agent -s)"
ORG_NAME="username-of-organization"
gh repo list $ORG_NAME --limit 4000 | while read -r repo _; do
gh repo clone "$repo" "$repo"
done
@ganobrega
ganobrega / Setup-WindowsDevEnvironment.ps1
Last active March 18, 2025 19:20
Setup WindowsDevEnvironment
# Definir diretório para armazenar o arquivo packages.config, logs e downloads
$basePath = "C:/temp/Setup-WindowsDevEnvironment"
$logPath = "$basePath/logs"
$downloadsPath = "$basePath/downloads"
$packagesConfigPath = "$basePath/packages.config"
$logFile = "$logPath/install_log.txt"
# Criar diretórios caso não existam
if (!(Test-Path -Path $basePath)) {
New-Item -ItemType Directory -Path $basePath
@ganobrega
ganobrega / _.md
Last active October 20, 2023 10:36
Checkout with Deno - Alpha

VTEX Checkout with Deno

No polyfill. No browserlist.

This is a alpha version that I'm not using any more...

Now I'm using ESBuild and PostCSS

  1. First create a new app using checkout-ui-settings scaffold
{
"importOrder": [
"^@kubernetes?.+$",
"^electron?.+$",
"^react?.+$",
"^antd?.+$",
"^@ant-design?.+$",
"^@reduxjs?.+$",
"^@rjsf?.+$",
"^(?![@\\.]).+$",
@ganobrega
ganobrega / parse_dotenv.bash
Created March 5, 2023 01:08 — forked from judy2k/parse_dotenv.bash
Parse a .env (dotenv) file directly using BASH
# Pass the env-vars to MYCOMMAND
eval $(egrep -v '^#' .env | xargs) MYCOMMAND
# … or ...
# Export the vars in .env into your shell:
export $(egrep -v '^#' .env | xargs)
1. `/checkout/cart/add/?sku=0000&qty=1&seller=1&sc=1&redirect=true`
@ganobrega
ganobrega / vtex-checkout-events.js
Created October 11, 2022 21:03 — forked from acjr1910/vtex-checkout-events.js
VTEX checkout events
$(window).on('orderFormUpdated.vtex', (event, orderForm) => console.log("orderFormUpdated.vtex"));
$(window).on('orderFormUpdated.vtex', (event, orderForm) => console.log("orderFormUpdated.vtex"));
$(window).on('checkoutRequestEnd.vtex', (event, orderForm) => console.log("checkoutRequestEnd.vtex"));
$(window).on('checkout.vtex.com', (event, orderForm) => console.log("checkout.vtex.com "));
$(window).on('.vtexIdUI', (event, orderForm) => console.log(".vtexIdUI"));
$(window).on('authenticatedUser.vtexid', (event, orderForm) => console.log("authenticatedUser.vtexid"));
$(window).on('started.vtexid', (event, orderForm) => console.log("started.vtexid"));
$(window).on('rendered.vtexid', (event, orderForm) => console.log("rendered.vtexid "));
$(window).on('closed.vtexid', (event, orderForm) => console.log("closed.vtexid"));
$(window).on('guestUser.vtexid', (event, orderForm) => console.log("guestUser.vtexid "));
@ganobrega
ganobrega / checkout-events.js
Created October 11, 2022 21:03 — forked from Juanpablobar/checkout-events.js
VTEX: Checkout events
$(window).on('orderFormUpdated.vtex', (event, orderForm) => console.log("orderFormUpdated.vtex"));
$(window).on('orderFormUpdated.vtex', (event, orderForm) => console.log("orderFormUpdated.vtex"));
$(window).on('checkoutRequestEnd.vtex', (event, orderForm) => console.log("checkoutRequestEnd.vtex"));
$(window).on('checkout.vtex.com', (event, orderForm) => console.log("checkout.vtex.com "));
$(window).on('.vtexIdUI', (event, orderForm) => console.log(".vtexIdUI"));
@ganobrega
ganobrega / vtex-toolbelt-set-env.sh
Created May 5, 2022 18:53
VTEX Toobelt Export Variables
#!/bin/bash
VTEX_WORKSPACE="gabriel"
echo $VTEX_WORKSPACE
➜ BBBB-components git:(master) vtex link
11:07:50.639 - info: Running yarn in react
yarn install v1.22.17
warning package.json: No license field
warning No license field
[1/4] 🔍 Resolving packages...
success Already up-to-date.
✨ Done in 0.37s.
11:07:51.216 - info: Finished running yarn
11:07:51.218 - info: Linking app [email protected]