Skip to content

Instantly share code, notes, and snippets.

@renerdias
renerdias / brother.md
Last active April 11, 2022 13:28
LINUX - IMPRESSORA E SCANNER

SCANNER

Configurar scanner em rede

brsaneconfig4 -a name=NOME_PARA_O_SCANNER model=MODELO_SCANNER(Ex. DCP-L2520DW) ip=IP_DO_SCANNER

Tem sim mano:

git fetch --all;
git reset --hard origin/<branch-desejada>

git fetch vai trazer todas as alterações do repositório remoto sem fazer um merge ou um rebase.

git reset vai resetar sua branch para ficar igual ao estado do que você acabou de dar o "git fetch". O -- hard muda todos os seus arquivos para que eles fiquem idênticos ao da origin/branch-desejada.

@renerdias
renerdias / .bashrc
Created December 28, 2021 23:08
Terminal Config Git
#-------------------------------------------------------------------------------------------------------
#if [ "$color_prompt" = yes ]; then
#PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
#else
#PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
#fi
#unset color_prompt force_color_prompt
@renerdias
renerdias / 1-pitr_conf.sh
Last active December 13, 2021 12:03
Postgresql PITR - Backup Incremental
#!/bin/bash
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# Postgresql PITR - Backup Incremental #
# #
# = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = #
# #
# Parte 1 - Configuração #
# #
@renerdias
renerdias / markdown-emojis.md
Last active August 26, 2021 16:27
markdown-emojis

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@renerdias
renerdias / default nginx configuration file
Created January 11, 2020 16:04 — forked from xameeramir/default nginx configuration file
The default nginx configuration file inside /etc/nginx/sites-available/default
##
# You should look at the following URL's in order to grasp a solid understanding
# of Nginx configuration files in order to fully unleash the power of Nginx.
# http://wiki.nginx.org/Pitfalls
# http://wiki.nginx.org/QuickStart
# http://wiki.nginx.org/Configuration
#
# Generally, you will want to move this file somewhere, and start with a clean
# file but keep this around for reference. Or just disable in sites-enabled.
#
-- Create a mySQL table to hold hashed passwords and random salt
--
-- SQL create script for for table `users`
--
CREATE TABLE IF NOT EXISTS `users` (
`user_id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`email` varchar(30) NOT NULL,
`reg_date` date NOT NULL,
@renerdias
renerdias / auditoria_fim.sql
Created April 23, 2019 21:36
Cria tabela de auditoria para todas as tabelas em public
select
tablename,
auditoria.func_criar_tabela_auditoria(tablename, false)
from
pg_tables
where
schemaname = 'public'
order by
tablena
@renerdias
renerdias / auditoria_inicio.sql
Created April 23, 2019 21:35
Cria o schema de auditoria e uma tabela com dados comuns de auditoria
create schema auditoria;
create table auditoria.ta_padrao (
id_auditoria bigint not null,
dt_auditoria timestamp not null,
op_auditoria char(1) not null,
pid int not null,
application_name text not null,
client_hostname text not null
);
@renerdias
renerdias / func_auxiliar.sql
Created April 23, 2019 21:34
Funções auxiliares para auditoria
create or replace function auditoria.func_application_name(iprocpid int) returns text as
$body$
declare
tApplicationName text;
begin
select
application_name into tApplicationName
from
pg_stat_activity
where