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
@lucis
lucis / remove-git-tags.sh
Created April 3, 2020 17:42
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
@lucis
lucis / vtex.10s.sh
Last active September 9, 2021 21:26
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"`
@lucis
lucis / vtex.10s.sh
Created April 6, 2020 12:32
VTEX BitBar plugin (with color support)
#!/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"`
@lucis
lucis / zshrc.sh
Created May 27, 2020 18:20
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 &
@martinsam16
martinsam16 / docker-wsl2.md
Last active July 19, 2025 18:16
How to install wsl2 ubuntu + docker + docker-compose

Activate wsl2

dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
wsl --set-default-version 2

Install and Configure Ubuntu

@igorvolnyi
igorvolnyi / flatdir.py
Last active September 25, 2021 13:51
Move or copy files from subdirectories into current directory and remove empty subdirectories (in case of moving)
#! /usr/bin/python
'''
Move or copy files from subdirectories of specified directories into them or into current directory
and optionally remove the empty subdirectories (in case of moving).
TODO: add exception handling.
'''
import sys