Skip to content

Instantly share code, notes, and snippets.

View victorouttes's full-sized avatar

Victor Outtes victorouttes

View GitHub Profile
@victorouttes
victorouttes / postgres-redhat.md
Created November 6, 2019 19:51
Configuração postgres REDHAT

Instale o postgres:

sudo yum install postgresql-server postgresql-contrib
sudo postgresql-setup initdb
sudo service postgresql start
sudo service postgresql enable
sudo iptables -I INPUT 5 -p tcp --dport 5432 -j ACCEPT
sudo service postgresql restart
@victorouttes
victorouttes / pyodbc.md
Created November 30, 2019 19:03
Usar pyodbc

Download Dependencies depends on your platform, (for other OS Download your Dependencies)

This example for Ubuntu:

# sudo su 
curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -

#Download appropriate package for the OS version
#Choose only ONE of the following, corresponding to your OS version
@victorouttes
victorouttes / select2_bootstrap_height.css
Last active December 27, 2019 19:50
Make select2 dropdown match boostrap height
.select2-selection__rendered {
line-height: 32px !important;
}
.select2-container--default .select2-selection--single {
height: 37px !important;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
height: 35px !important;
@victorouttes
victorouttes / gpg-error.md
Created January 2, 2020 12:30
GPG error on update

Error:

GPG error: http://ppa.launchpad.net trusty InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 8BAF9A6F

Execute the following commands in terminal

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys <PUBKEY>
@victorouttes
victorouttes / qlik.md
Created January 10, 2020 17:15
Ajuda do qlik

Set Analysis

Filtro

{<COLUNA_FILTRO={'valor a ser filtrado'}>} COLUNA

Filtro com OU

@victorouttes
victorouttes / geolocalizacao.md
Created January 16, 2020 18:50
Geolocalização em Django (django rest framework)

Configuração

Para utilizar o campo PointField (com o sqlite3), que armazena latitude e longitude no django, você precisa instalar no linux:

sudo apt install libsqlite3-mod-spatialite
sudo apt install gdal-bin

Depois você precisa instalar o pacote "django-extra-fields" para permitir você usar no DRF a serialização correta:

@victorouttes
victorouttes / dolphin-crash.md
Created February 12, 2020 12:09
KDE Dolphin crash with samba (smb)

In your home .config directory, there is a file dolphinrc. Rename it something like dolphinrcOLD, then start Dolphin.

@victorouttes
victorouttes / intel-wireless-ac-9462.md
Last active May 12, 2022 15:42
Intel wireless AC 9462 driver linux
sudo apt update
sudo apt install git build-essential
git clone https://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/backport-iwlwifi.git
cd backport-iwlwifi/
make defconfig-iwlwifi-public
sed -i 's/CPTCFG_IWLMVM_VENDOR_CMDS=y/# CPTCFG_IWLMVM_VENDOR_CMDS is not set/' .config
make -j4
sudo make install
sudo modprobe iwlwifi
@victorouttes
victorouttes / red-hat-8-docker.md
Last active April 6, 2020 17:48
red hat 8 docker (RHEL8)

Se não tiver DNF no servidor:

sudo yum install dnf -y
sudo dnf install 'dnf-command(config-manager)'
sudo dnf config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo
sudo dnf install docker-ce
sudo systemctl start docker
@victorouttes
victorouttes / npm-globally.md
Created May 3, 2020 18:18
NPM install globally
sudo mkdir -p /opt/npm/.npm-global
sudo chmod -R +777 /opt/npm
npm config set prefix '/opt/npm/.npm-global'
sudo vim /etc/profile
export PATH=/opt/npm/.npm-global/bin:$PATH