Skip to content

Instantly share code, notes, and snippets.

View victorgabrielbs's full-sized avatar

Victor Gabriel victorgabrielbs

View GitHub Profile
oh-my-posh init pwsh --config "$env:POSH_THEMES_PATH/bubblesextra.omp.json" | Invoke-Expression
$modules = @(
"PSScriptTools",
"Terminal-Icons",
"PSReadLine",
"PSFzf",
"Microsoft.WinGet.CommandNotFound"
)
#!/usr/bin/env bash
# Script de compactação baseado em desc
# Uso: comp <formato> <arquivo1> [arquivo2] ... [diretorio1] ...
# Exemplo: comp tar.gz arquivo.txt diretorio/
if [ $# -lt 2 ]; then
echo "Uso: comp <formato> <arquivo1> [arquivo2] ... [diretorio1] ..."
echo "Formatos suportados: tar.bz2, tar.gz, bz2, gz, tar, tbz2, tbz, tgz, zip, 7z, tar.xz, tar.zst, xz, zst, lz, lzma"
exit 1
#!/usr/bin/env bash
if [ -f "$1" ] ; then
case $1 in
*.tar.bz2) tar xjf "$1" ;;
*.tar.gz) tar xzf "$1" ;;
*.bz2) bunzip2 "$1" ;;
*.rar) unrar x "$1" ;;
*.gz) gunzip "$1" ;;
*.tar) tar xf "$1" ;;
#!/usr/bin/env bash
file=$(fzf --multi --reverse) #get file from fzf
if [[ $file ]]; then
for prog in $file; do
$EDITOR "$prog"; done;
else
echo "cancelled fzf"
fi
{
"search.exclude": {
"out*/**": true,
"build/**": true,
"**/*.build": true,
"**/*.log": true,
"**/*.dist": true,
"**/.DS_Store": true,
"**/*.git": true,
"**/.opam": true
.host:/ /mnt/hgfs fuse.vmhgfs-fuse allow_other 0 0
@victorgabrielbs
victorgabrielbs / .vimrc
Last active March 30, 2025 19:50
.vimrc
call plug#begin()
Plug 'autozimu/LanguageClient-neovim', {
\ 'branch': 'next',
\ 'do': 'bash install.sh'
\ }
Plug 'vim-airline/vim-airline'
Plug 'Raimondi/delimitMate'
Plug 'powerman/vim-plugin-AnsiEsc'
@victorgabrielbs
victorgabrielbs / script.py
Last active March 13, 2024 22:01
webscrapping explainshell.com
import sys
from selenium import webdriver
from selenium.webdriver.edge.options import Options
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from bs4 import BeautifulSoup
def perform_scraping(command):
$destino = "$env:USERPROFILE\Pictures\Wallpapers"
if (-not (Test-Path $destino)) {
New-Item -ItemType Directory -Path $destino | Out-Null
}
$arquivos = Get-ChildItem -Path $PWD -File -Recurse | Where-Object { $_.Extension -match "png|jpg" }
foreach ($arquivo in $arquivos) {
Move-Item -Path $arquivo.FullName -Destination $destino -Force
#!/bin/zsh
if [[ $# -eq 0 ]]; then
echo "Por favor, forneça um arquivo de texto como argumento."
exit 1
fi
file_content=$(<"$1")
file_content=${file_content//$'\n'/ }