Skip to content

Instantly share code, notes, and snippets.

View victorgabrielbs's full-sized avatar

Victor Gabriel victorgabrielbs

View GitHub Profile
#!/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 fish
eza --long --sort=modified --reverse --color=always | head -n 10
#!/usr/bin/env bash
CHT_SH_LIST_CACHE_DIR=$HOME/'.cache/'
CHT_SH_LIST_CACHE=$HOME/'.cache/cht_sh_cached_list'
#Cache the list on first run
if [ ! -f "$CHT_SH_LIST_CACHE" ]; then
if [ ! -d "$CHT_SH_LIST_CACHE_DIR" ]; then
mkdir "$CHT_SH_LIST_CACHE_DIR"
fi
#!/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
{
"editor.fontSize": 15,
"editor.rulers": [
80,
120
],
"files.associations": {
".stylelintrc": "json",
".env.*": "dotenv",
.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):
#!/usr/bin/perl
use strict;
use warnings;
use WWW::Mechanize;
use HTML::TreeBuilder;
my $url = 'https://www.gnu.org/software/software.html';
my $mech = WWW::Mechanize->new();
$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