Skip to content

Instantly share code, notes, and snippets.

View duard's full-sized avatar

Carlos Eduardo duard

View GitHub Profile
@duard
duard / mysql-install-macos-homebrew.md
Created October 28, 2020 17:18
Instalar Mysql no macOS

This is a fork of original gist https://gist.github.com/nrollr/3f57fc15ded7dddddcc4e82fe137b58e, with slight changes on pointing to 5.7 version branch, instead of 8 (latest default of MySQL in Hombrew).

Install MySQL 5.7 on macOS

This procedure explains how to install MySQL using Homebrew on macOS (Sierra 10.12 and up)

Install Homebrew

  • Installing Homebrew is effortless, open Terminal and enter :
    $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • Note: Homebrew will download and install Command Line Tools for Xcode 8.0 as part of the installation process.
@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