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 / 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]
@ganobrega
ganobrega / store-block.md
Created September 9, 2021 21:27 — forked from lucis/store-block.md
Store Block Summary

Conhecendo uma app VTEX IO

Introdução

Antes de começar, é necessário relembrar alguns conceitos importantes para uma maior compreensão do fluxo lógico ao desenvolver uma app.

manifest.json

vendor

Define o nome da conta VTEX que está desenvolvendo a app. Essa conta é responsável pela manutenção e distribuição da app (pode ser instalada em outras contas ou somente na própria)

@ganobrega
ganobrega / remove-git-tags.sh
Created September 9, 2021 21:26 — forked from lucis/remove-git-tags.sh
Removing ALL git tags for a Repo
git tag -l | xargs git tag -d && git fetch && git tag -l | xargs -n 1 git push --delete origin && git tag -l | xargs git tag -d
@ganobrega
ganobrega / vtex.10s.sh
Created September 9, 2021 21:26 — forked from lucis/vtex.10s.sh
VTEX information to BitBar
#!/bin/bash
TOOLBELT_CFG_FILE="$HOME/.config/configstore/vtex.json"
parse_vtex_json() {
cat "$TOOLBELT_CFG_FILE" | grep $1 | sed -n "s/^.*\"$1\": \"\(.*\)\".*$/\1/p"
}
get_vtex_account() {
parse_vtex_json "account"
}
ACCOUNT=`parse_vtex_json "account"`
WORKSPACE=`parse_vtex_json "workspace"`
@ganobrega
ganobrega / zshrc.sh
Created September 9, 2021 21:25 — forked from lucis/zshrc.sh
Some of my zshrc alias
alias nvim='print -Pn "\e]0;${PWD##*/}-vim\a";nvim'
alias vl='vtex link'
alias vls='vtex ls'
alias vs='vtex switch'
alias vua='vtex unlink --all'
alias vwr='vtex workspace reset'
oni()
{
/Applications/Onivim2.app/Contents/MacOS/Oni2_editor $1 &
@ganobrega
ganobrega / vtex.json
Created July 22, 2021 18:36
VTEX Toolbelt Config
{
"env": "prod",
"account": "$VTEX_ACCOUNT",
"workspace": "master",
"login": "$VTEX_AUTH_LOGIN",
"token": "$VTEX_AUTH_TOKEN"
}
@ganobrega
ganobrega / gist:1a6367e120ca0faa7aa4f469a6779c0a
Created January 7, 2021 17:09
Canais do Youtube de Tecnologia
- Balta.io
- CodAffection
- Codedamn
- EspecializaTi
- Jose Carlos Macoratti
- Michelli Brito
- The Net Ninja
- Vinicius Thiengo
- Traversy Media
- Mango
@ganobrega
ganobrega / dump-vtex-emails.js
Created November 3, 2020 15:47
Get VTEX Template E-mails
const axios = require('axios');
const LIST_ENDPOINT = `https://loja.myvtex.com/api/template-render/pvt/templates/getlist`;
const TEMPLATE_ENDPOINT = `https://loja.myvtex.com/api/template-render/pvt/templates/`;
const JSON_ENDPOINT = `https://loja.myvtex.com/api/template-render/pvt/templates/json`;
const LIST = [];
const AUTH_COOKIE =
'VtexIdclientAutCookie=$$$$$$$$;';