Skip to content

Instantly share code, notes, and snippets.

View sandrocarval's full-sized avatar

Sandro Ribeiro sandrocarval

  • Brazil
  • 13:52 (UTC -03:00)
View GitHub Profile
@sandrocarval
sandrocarval / ubuntu-2310-setup.sh
Last active October 14, 2023 19:54
Ubuntu 23.10 setup
# Initial setup and updates. Reboot after the update!
sudo apt update
sudo apt install flatpak gnome-software-plugin-flatpak -y
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
sudo apt update -y
# Base packages
sudo apt install curl wget git net-tools apt-transport-https software-properties-common gpg gnupg xz-utils unzip fonts-roboto fonts-roboto-slab fonts-inter fonts-hack fonts-firacode fonts-jetbrains-mono fonts-jetbrains-mono gnome-tweaks gnome-shell-extension-manager -y
# Base dev packages
sudo mkdir /opt/obsidian
sudo wget -O icon.png "https://dl.dropboxusercontent.com/s/6wv77rkpdcgug4e/20201104173308_obsidian%20icon.png" -P /opt/obsidian
sudo wget -O obsidian.AppImage "https://github.com/obsidianmd/obsidian-releases/releases/download/v0.12.10/Obsidian-0.12.10.AppImage" -P /opt/obsidian
sudo chmod +x /opt/obsidian/obsidian.AppImage
sudo tee -a /usr/share/applications/obsidian.desktop <<-EOF
[Desktop Entry]
Version=1.0
Type=Application
@sandrocarval
sandrocarval / popos_2004_setup.sh
Last active July 30, 2021 17:01
PopOS 20.04 setup
# First, upgrade what you have
sudo apt update && sudo apt upgrade -y
# Base stuff
sudo apt install curl wget net-tools apt-transport-https software-properties-common gnupg fonts-roboto fonts-roboto-slab fonts-inter fonts-hack fonts-firacode gnome-tweaks code -y
# Dev stuff
sudo apt install build-essential git libbz2-dev zlib1g-dev libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev libffi-dev libbz2-dev dirmngr gpg automake autoconf libreadline-dev libncurses-dev libssl-dev libyaml-dev libxslt-dev libffi-dev libtool unixodbc-dev jq python3-pip -y
# Node LTS (latest = 14.x) + Yarn
@sandrocarval
sandrocarval / fedora-kde-setup.sh
Last active December 30, 2023 20:28
Fedora KDE setup
# Repos
sudo dnf install https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
sudo dnf copr enable kwizart/fedy -y
sudo dnf copr enable zawertun/hack-fonts -y
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
sudo dnf update -y
# REBOOT
@sandrocarval
sandrocarval / windows10-2004-wsl2-setup.md
Last active August 14, 2020 18:40
Windows 10 2004 + WSL2 setup
@sandrocarval
sandrocarval / op7_cleanup.sh
Last active April 8, 2020 19:20
OnePlus 7 cleanup
sudo adb shell pm disable-user com.android.traceur
sudo adb shell pm disable-user com.oneplus.opbugreportlite
sudo adb shell pm disable-user com.oneplus.brickmode
sudo adb shell pm disable-user net.oneplus.odm
sudo adb shell pm disable-user net.oneplus.odm.provider
sudo adb shell pm disable-user com.google.android.apps.wellbeing
# The command below needs to be executed after every reboot
sudo adb shell settings put global device_idle_constants inactive_to=2592000000,motion_inactive_to=2592000000,light_after_inactive_to=3000000,light_max_idle_to=21600000,light_idle_to=3600000,light_idle_maintenance_max_budget=600000,light_idle_maintenance_max_budget=600000,min_light_maintenance_time=30000
@sandrocarval
sandrocarval / gtk.css
Created May 30, 2017 13:52
Reduce window title bar height in Gnome 3.22
/* Copy this CSS to ~/.config/gtk-3.0/gtk.css, and restart or logout+login */
window.ssd headerbar.titlebar {
min-height: 0;
}
window.ssd headerbar.titlebar button.titlebutton {
padding-top: 0px;
padding-bottom: 0px;
min-height: 0;
@sandrocarval
sandrocarval / goadt
Created December 21, 2016 16:27 — forked from dforocha/goadt
script to do the ssh on adtsys machines
#!/bin/bash
export PEM_KEY="~/.ssh/aws-totvs.pem"
function list() {
echo "ADTsys server list:
jerico01
jerico02
jis01
jis02
@sandrocarval
sandrocarval / gua.sh
Last active May 17, 2017 20:31
Atualiza todos os repos do cloudficacao
#!/bin/bash
# Salve este arquivo no $HOME/bin e adicione o caminho no $PATH
REPO_BASE="$HOME/repos/totvs"
for REPO in $(ls $REPO_BASE/)
do
echo "-----------------------------------------"
echo "$REPO: updating"
@sandrocarval
sandrocarval / gco.sh
Last active December 19, 2016 19:56
Script para facilitar a mudança de tags/commits nos diretórios das gems quando se dá checkout no branch do projeto principal (Jericó, JIS, JPS)
#!/bin/bash
# Salve este arquivo no $HOME/bin e adicione o caminho no $PATH
REPO_BASE="$HOME/repos"
CURRENT_REPO=$(pwd)
git checkout $1
for REPO in $(egrep "adtsys-cloud|diegoaltheman" $CURRENT_REPO/Gemfile | awk -F'"' '{print $2}')