Skip to content

Instantly share code, notes, and snippets.

View cristopher-rodrigues's full-sized avatar
🏠
Working from home

Cristopher Rodrigues cristopher-rodrigues

🏠
Working from home
View GitHub Profile

Install PgAudit

docker exec -it postgres sh -c 'apt-get update && apt-get install -y --no-install-recommends \
  postgresql-$PG_MAJOR-pgaudit'

Add required changes

$PGDATA/postgresql.conf

@cristopher-rodrigues
cristopher-rodrigues / ssh.markdown
Last active July 11, 2020 17:02
SSH POWER BASH
SOUND WHEN GET A RESPONSE

ping -i 60 -a ADDRESS
S.O/HARD INFOS

@cristopher-rodrigues
cristopher-rodrigues / zsh-theme.sh
Last active March 4, 2019 16:21
cristopher.zsh-theme
PROMPT='%{$fg_bold[red]%}☠ λ%{$fg_bold[black]%}%p %{$fg[black]%}%~% %{$fg_bold[cyan]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%} '
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[green]%}[%{$fg[cyan]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[green]%}] %{$fg[yellow]%}⚡%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[green]%}]"
@cristopher-rodrigues
cristopher-rodrigues / a.md
Created February 23, 2018 17:58
symlink to sublime
ln -s "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" /usr/local/bin/subl
@cristopher-rodrigues
cristopher-rodrigues / travis-slack.md
Created February 16, 2018 14:41
travis slack notifcation
@cristopher-rodrigues
cristopher-rodrigues / a.md
Created October 9, 2017 17:31
mongo drop db
use mydb
db.dropDatabase();
> { "dropped" : "mydb", "ok" : 1 }
#!/usr/bin/env bash
defaults write com.apple.finder AppleShowAllFiles YES; # show hidden files
defaults write com.apple.dock persistent-apps -array; # remove icons in Dock
defaults write com.apple.dock tilesize -int 36; # smaller icon sizes in Dock
defaults write com.apple.dock autohide -bool true; # turn Dock auto-hidng on
defaults write com.apple.dock autohide-delay -float 0; # remove Dock show delay
defaults write com.apple.dock autohide-time-modifier -float 0; # remove Dock show delay
defaults write com.apple.dock orientation right; # place Dock on the right side of screen
defaults write NSGlobalDomain AppleShowAllExtensions -bool true; # show all file extensions
select column_name, data_type, character_maximum_length
from INFORMATION_SCHEMA.COLUMNS where table_name = '<name of table>';
echo 'alias myip="curl ipecho.net/plain ; echo"' >> ~/.zshrc && source ~/.zshrc
@cristopher-rodrigues
cristopher-rodrigues / a.md
Created March 22, 2017 15:16
CloudFormation

http://docs.aws.amazon.com/pt_br/AWSCloudFormation/latest/UserGuide/GettingStarted.Walkthrough.html http://docs.aws.amazon.com/pt_br/AWSCloudFormation/latest/UserGuide/quickref-general.html

A template is a JSON or YAML text file that contains the configuration information about the AWS resources you want to create in the stack. For this walkthrough, the sample template includes six top-level sections: AWSTemplateFormatVersion, Description, Parameters, Mappings, Resources, and Outputs; however, only the Resources section is required.

RESOURCES: The Resources section contains the definitions of the AWS resources you want to create with the template.

PARAMETERS: You use the Parameters section to declare values that can be passed to the template when you create the stack. A parameter is an effective way to specify sensitive information, such as user names and passwords, that you don't want to store in the template itself.