Skip to content

Instantly share code, notes, and snippets.

View duard's full-sized avatar

Carlos Eduardo duard

View GitHub Profile
@duard
duard / pgsql.sql
Created August 4, 2020 11:54
Update mass postgree na base
DO $$
DECLARE
kc record;
ik record;
BEGIN
RAISE NOTICE 'inicio...';
FOR kc IN SELECT * FROM kit_correios kc WHERE id_ref in (12, 45) LOOP
RAISE NOTICE 'Verificando kit id = % id_ref % volumes %', kc.id_kit_correio, kc.id_ref, kc.qt_volumes;
FOR ik IN SELECT * FROM informacoes_kit ik WHERE id_kit_correio = kc.id_kit_correio LOOP
@duard
duard / pgsql.sql
Created August 4, 2020 11:54
Update mass postgree na base
DO $$
DECLARE
kc record;
ik record;
BEGIN
RAISE NOTICE 'inicio...';
FOR kc IN SELECT * FROM kit_correios kc WHERE id_ref in (12, 45) LOOP
RAISE NOTICE 'Verificando kit id = % id_ref % volumes %', kc.id_kit_correio, kc.id_ref, kc.qt_volumes;
FOR ik IN SELECT * FROM informacoes_kit ik WHERE id_kit_correio = kc.id_kit_correio LOOP
@duard
duard / update-blu-fix-checklist-template-in-workOrder.sql
Created July 30, 2020 07:44
update-blu-fix-checklist-template-in-workOrder
update
ordens_trabalho
set
id_modelo_checklist = modelos_checklist.id_modelo_checklist
from
detalhes_servico,
modelos_checklist
where
detalhes_servico.id_detalhe_servico = ordens_trabalho.id_detalhe_servico
and modelos_checklist.id_detalhe_servico = detalhes_servico.id_detalhe_servico
@duard
duard / configuration.wsl2.windows.ubuntu.bash.sh
Last active May 31, 2020 13:36
Windows WSL2 zsh ubuntu bash configuration
sudo apt update;
sudo apt install git zsh -y;
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)";
cd ~/Downloads
git clone https://github.com/denysdovhan/spaceship-prompt.git "$ZSH_CUSTOM/themes/spaceship-prompt"
ln -s "$ZSH_CUSTOM/themes/spaceship-prompt/spaceship.zsh-theme" "$ZSH_CUSTOM/themes/spaceship.zsh-theme"
sh -c "$(curl -fsSL https://raw.githubusercontent.com/zdharma/zinit/master/doc/install.sh)"
```code
sudo apt-get update
sudo apt upgrade
@duard
duard / ubuntu.postinstall.sh
Last active May 31, 2020 13:35
Ubuntu/Debian/Pop configuration postinstall
Update and Upgrade
```code
sudo apt-get update
sudo apt upgrade
```
Install everything
```code
@duard
duard / fix-tearing.txt
Created May 9, 2020 10:56
Fix ubuntu debian xfce tearing (4k full hd 60 fps) nvidia
mv ~/.config/xfce4/xfconf/xfce-perchannel-xml/displays.xml ~/.config/xfce4/xfconf/xfce-perchannel-xml/displays.xml.bkp;
echo $(xrandr | sed -nr '/(\S+) connected (primary )?([0-9]+x[0-9]+)(\+\S+).*/{ s//\1: \3 \4 { ForceFullCompositionPipeline = On }, /; H}; ${ g; s/\n//g; s/, $//; p }');
# add this to Section "Device"
Option "NoLogo" "1"
Option "RenderAccel" "1"
Option "TripleBuffer" "true"
Option "MigrationHeuristic" "greedy"
Option "AccelMethod" "sna"
@duard
duard / popcorn-time-fonts.sh
Created April 1, 2020 05:17
popcorn time font rendering
sudo add-apt-repository "deb http://us.archive.ubuntu.com/ubuntu/ artful-updates main"
sudo apt-get update
sudo apt-get install libfreetype6=2.8-0.2ubuntu2.1
sudo apt-mark hold libfreetype6
@duard
duard / popcorn-time-fonts.sh
Created April 1, 2020 05:17
popcorn time font rendering
sudo add-apt-repository "deb http://us.archive.ubuntu.com/ubuntu/ artful-updates main"
sudo apt-get update
sudo apt-get install libfreetype6=2.8-0.2ubuntu2.1
sudo apt-mark hold libfreetype6
@duard
duard / popcorn-time-fonts.sh
Created April 1, 2020 05:17
popcorn time font rendering
sudo add-apt-repository "deb http://us.archive.ubuntu.com/ubuntu/ artful-updates main"
sudo apt-get update
sudo apt-get install libfreetype6=2.8-0.2ubuntu2.1
sudo apt-mark hold libfreetype6
@duard
duard / popcorn-time-fonts.sh
Created April 1, 2020 05:17
popcorn time font rendering
sudo add-apt-repository "deb http://us.archive.ubuntu.com/ubuntu/ artful-updates main"
sudo apt-get update
sudo apt-get install libfreetype6=2.8-0.2ubuntu2.1
sudo apt-mark hold libfreetype6