Skip to content

Instantly share code, notes, and snippets.

View r1w1s1's full-sized avatar
:octocat:

Ricardson (r1w1s1) r1w1s1

:octocat:
View GitHub Profile
echo 0 > /sys/fs/selinux/enforce
#checking the status
sestatus
@r1w1s1
r1w1s1 / output
Created January 10, 2017 19:07 — forked from halberom/output
ansible - using lookup to get a date timestamp into a variable
...
TASK: [debug var=mydate] ******************************************************
ok: [localhost] => {
"mydate": "20140605101824"
}
...
@r1w1s1
r1w1s1 / tmux-cheatsheet.markdown
Created June 30, 2017 21:13 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@r1w1s1
r1w1s1 / ssh_config
Last active September 30, 2017 15:47
~/.ssh/config Example
Host *
ServerAliveInterval 60 #Avoid disconnection
StrictHostKeyChecking no #Disable SSH Host Key Checking
UserKnownHostsFile /dev/null #avoid create the ssh/known_hosts file
Host prod
HostName xx.xx.xx.xx
User root
Host qa
@r1w1s1
r1w1s1 / function.js
Created March 6, 2018 01:28 — forked from vgeshel/function.js
AWS Lambda function for forwarding SNS notifications to Slack
console.log('Loading function');
const https = require('https');
const url = require('url');
// to get the slack hook url, go into slack admin and create a new "Incoming Webhook" integration
const slack_url = 'https://hooks.slack.com/services/...';
const slack_req_opts = url.parse(slack_url);
slack_req_opts.method = 'POST';
slack_req_opts.headers = {'Content-Type': 'application/json'};
@r1w1s1
r1w1s1 / .Xdefaults
Created March 30, 2018 17:11 — forked from ei-grad/.Xdefaults
My urxvt config.
!! Appearance
urxvt.termName: rxvt-unicode
urxvt.scrollBar: false
urxvt.background: black
urxvt.foreground: gray
!! Font prefferenes
urxvt.font: xft:DejaVu Sans Mono:pixelsize=13
urxvt.boldFont: xft:DejaVu Sans Mono:pixelsize=13:weight=bold
urxvt.letterSpace: -1
!! Larger history limit
@r1w1s1
r1w1s1 / Caddyfile
Created May 31, 2018 16:05 — forked from abiosoft/Caddyfile
Caddy wordpress docker-compose
:80
root /usr/src/wordpress
gzip
fastcgi / wordpress:9000 php
rewrite {
if {path} not_match ^\/wp-admin
to {path} {path}/ /index.php?_url={uri}
}
log stdout
errors stderr
@r1w1s1
r1w1s1 / php5.6-pgsql.Dockerfile
Created June 8, 2018 17:14 — forked from ben-albon/php5.6-pgsql.Dockerfile
Docker PHP Image with PostgreSQL Driver
FROM php:5.6-apache
RUN apt-get update && apt-get install -y libpq-dev && docker-php-ext-install pdo pdo_pgsql
COPY src/ /var/www/html
@r1w1s1
r1w1s1 / Praticas_SRE.md
Last active August 21, 2021 17:39
Gist das melhores práticas de SRE

Práticas SRE

Métricas e Monitoramento Planejamento e Capacidade Gestão de Mudanças Resposta a Incidentes Cultura
Dashboard Previsão Consultoria no Desenho Plantão Trabalho Manual
SLOs Baseada em Demanda Processo de Lançamento Analises Engenharia Alinhada
Ánalises Performance Automação Postmortems Blamelessness
@r1w1s1
r1w1s1 / Jenkinsfile
Created June 13, 2022 14:20 — forked from merikan/Jenkinsfile
Some Jenkinsfile examples
Some Jenkinsfile examples