Skip to content

Instantly share code, notes, and snippets.

@takitani
takitani / linux_cedilha_ajuste
Last active March 28, 2017 12:43
linux_cedilha_ajuste
Editar
sudo gedit /usr/lib/x86_64-linux-gnu/gtk-3.0/3.0.0/immodules.cache
sudo gedit /usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/immodules.cache
Adicionar :en na linha "cedilla"
sudo gedit /usr/share/X11/locale/en_US.UTF-8/Compose
substituir "ć" por "ç" e "Ć" por "Ç".
#atualizado para mint 17.1
sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get install -y git curl zsh terminator ruby1.9.3 ant vim coffeescript libcurl4-openssl-dev exuberant-ctags imagemagick
sudo locale-gen pt_BR.UTF-8
#postgres
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
@takitani
takitani / postgres_queries_and_commands.sql
Last active May 17, 2018 19:38 — forked from rgreenjr/postgres_queries_and_commands.sql
Useful PostgreSQL Queries and Commands
-- pg disk usage
-- https://wiki.postgresql.org/wiki/Disk_Usage
SELECT *, pg_size_pretty(total_bytes) AS total
, pg_size_pretty(index_bytes) AS INDEX
, pg_size_pretty(toast_bytes) AS toast
, pg_size_pretty(table_bytes) AS TABLE
FROM (
SELECT *, total_bytes-index_bytes-COALESCE(toast_bytes,0) AS table_bytes FROM (
SELECT c.oid,nspname AS table_schema, relname AS TABLE_NAME
, c.reltuples AS row_estimate
# Paste this into:
# /usr/lib/systemd/system/crashplan.service
#
# Then:
# sudo systemctl enable crashplan.service
# sudo systemctl start crashplan.service
[Unit]
Description=CrashPlan Backup Engine
After=network.target
# Não esquecer de olhar os hidden files
mkdir backup
sudo cp .gitconfig backup
sudo cp .ssh/config --parents backup
sudo cp .ssh/known_hosts --parents backup
sudo cp .ssh/id_rsa.pub --parents backup
sudo cp .ssh/id_rsa --parents backup
sudo cp -avr .DataGrip2019.3 --parents backup
sudo cp .pgpass --parents backup
sudo cp .zshrc --parents backup
@takitani
takitani / os-setup-popos
Last active November 26, 2022 21:32
Os Setup - PopOs
Current Version: 2110 - Cosmic
Date: 2021-12-18
# Troca shortcut:
Contrl + alt + T = Terminal
Contrl + E = File Manager
# Muda navegacao de janelas para padrao win
Settings -> Shortcuts -> Navigation -> Move Window One Monitor to Right / Left = Super+Shift+Right / Super+Shift+Left
@takitani
takitani / os-setup-mx-linux
Last active December 29, 2021 00:58
Os Setup - MX Linux
sudo apt install imwheel
Rodar o script mousewhell.sh
No startup, colocar ou na munheca:
imwheel --kill --buttons "4 5"
criar o arquivo em ~/.config/autostart/imwheel.desktop
[Desktop Entry]
@takitani
takitani / os-setup-fedora
Last active April 30, 2024 02:38
Os Setup - Fedora
# Version: 39
# Muda hostname
hostnamectl set-hostname opikdev
sudo dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm
sudo dnf install https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
sudo dnf install google-chrome-stable dropbox obs-studio vlc -y
# Depois de logar no dropbox, quitar e:
@takitani
takitani / os-setup-win-11
Created February 9, 2022 02:00
Os Setup - Windows 11
# Renomear User folder para remover acento do nome do AD
# Choco - no powershell com admin
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
choco install googlechrome -y
choco install firefox -y
choco install 7zip.install -y
choco install jetbrainstoolbox
@takitani
takitani / os-setup-ubuntu-22-04-gnome
Created April 29, 2022 14:39
OS Setup - Ubuntu 22.04 Gnome
# Instala o basico
sudo apt update && sudo apt upgrade -y
sudo locale-gen pt_BR.UTF-8
/usr/lib/apt/apt-helper download-file https://debian.sur5r.net/i3/pool/main/s/sur5r-keyring/sur5r-keyring_2021.02.02_all.deb keyring.deb
dpkg -i ./keyring.deb
echo "deb http://debian.sur5r.net/i3/ $(lsb_release -c -s) universe" | sudo tee /etc/apt/sources.list.d/i3.list
sudo apt update
sudo apt install i3