Skip to content

Instantly share code, notes, and snippets.

View fcsest's full-sized avatar
🏠
Working from home

Fernando Souza fcsest

🏠
Working from home
View GitHub Profile
@fcsest
fcsest / setup.sh
Created April 9, 2024 20:52
Setup shells for starship and configure nushell
#!/bin/bash
echo 'Criando diretório nushell...'
mkdir -p ${HOME}/.config/nushell/
echo 'Configurando nushell...'
echo 'mkdir ~/.cache/starship\\nstarship init nu | save -f ~/.cache/starship/init.nu\\n\\nalias cat = batcat --style=auto\\nalias ls = exa --icons -la\\nalias r = radian' >> ${HOME}/.config/nushell/env.nu
echo '$env.config = {show_banner: false}\\n\\nsource ~/.cache/starship/init.nu' >> ${HOME}/.config/nushell/config.nu
echo 'Configurando starship...'
@fcsest
fcsest / starship.toml
Created November 14, 2023 18:39
My starship configuration file.
format = """
$os\
$username\
$hostname\
$localip\
$shell\
$directory\
$fossil_branch\
$git_branch\
$git_commit\
@fcsest
fcsest / cargo_requirements.txt
Last active July 18, 2022 17:30
Install my rust functions in Arch Linux
sudo pacman -S rust
cargo install bandwhich bat du-dust fd-find grex hyperfine nu procs ripgrep sd tealdeer tokei zellij zoxide
cargo install starship --locked
@fcsest
fcsest / .Rprofile
Last active April 20, 2022 14:37
My Rprofile for development in VSCode.
# setting options
options(width = 80)
# we set the cloud mirror, which is "network-close" to everybody, as default
local({
r <- getOption("repos")
r["CRAN"] <- "https://cloud.r-project.org"
options(repos = r)
})
@fcsest
fcsest / config.fish
Last active July 19, 2022 19:15
My fish shell config for ArchWSL.
#------------------------------------------------------------------------------#
# Remove start message
set fish_greeting
#------------------------------------------------------------------------------#
# WSL Setttings
set -gx DISPLAY $(grep -m 1 nameserver /etc/resolv.conf | awk '{print $2}'):0.0
set -gx LIBGL_ALWAYS_INDIRECT 1
#------------------------------------------------------------------------------#
# Docker Settings
set -gx DOCKER_BUILDKIT 1
@fcsest
fcsest / stop_ngrok.sh
Created April 14, 2022 13:21
Stop ngrok process in fish shell with "source strop_ngrok.sh".
#!/bin/sh
echo "Stopping background ngrok process..."
kill -9 $(ps -ef | grep 'ngrok' | grep -v 'grep' | awk '{print $2}')
echo "ngrok stopped"
@fcsest
fcsest / start_ngrok.sh
Created April 14, 2022 13:20
Start ngrok connection in background in fish shell with "source start_ngrok.sh".
#!/bin/sh
set NGROK_PUBLIC_URL ""
echo "Start ssh-access ngrok in background"
nohup ngrok start ssh-access &>/dev/null &
echo -e "Extracting ngrok port..."
while [ -z "$NGROK_PUBLIC_URL" ];
sleep 1
@fcsest
fcsest / enable_systemctl.sh
Last active May 5, 2022 12:56
Script to enable systemctl in ArchWSL(to restart ssh and docker services). p.s.: run as root(sudo su)
mv /usr/bin/systemctl /usr/bin/systemctl.old
curl https://raw.githubusercontent.com/gdraheim/docker-systemctl-replacement/master/files/docker/systemctl.py > /usr/bin/systemctl
chmod +x /usr/bin/systemctl
@fcsest
fcsest / drop_cache.sh
Last active April 14, 2022 13:46
Drop caches in WSL2.
echo 1 | sudo tee /proc/sys/vm/drop_caches