Skip to content

Instantly share code, notes, and snippets.

View thiagomgo's full-sized avatar
💜

Thiago Gomes thiagomgo

💜
  • Brazil
View GitHub Profile
@zentetsukenz
zentetsukenz / ruby_on_rails_deployment.md
Last active December 2, 2024 01:26
Deploy Ruby on Rails application with Docker Compose and Capistrano with ease

Docker

Files and Folders.

|
|\_ app
|...
|\_ docker
| |
@Eyjafjallajokull
Eyjafjallajokull / README.md
Last active April 8, 2025 15:20
AWS EBS - Find unused snapshots

This script can help you find and remove unused AWS snapshots and volumes.

There is hardcoded list of regions that it searches, adjust the value to suit your needs.

Use snapshot.py snapshot-report to generate report.csv containing information about all snapshots.

snapshot.py snapshot-cleanup lets you interactively delete snapshot if it finds it is referencing unexisting resources.

./snapshots.py --help

Kafka installation with systemd

0. Create kafka user

sudo adduser kafka
sudo adduser kafka sudo
su -l kafka

1. Download and Install kafka archive

@stefansundin
stefansundin / openssh-7.3.sh
Last active September 13, 2022 21:03
Install OpenSSH 7.3 in Ubuntu 16.04
# WARNING: Use this at your own risk. It will probably break your other packages and cause other havoc.
# These days you should just upgrade to Ubuntu 18.04.
$ ssh -V
OpenSSH_7.2p2 Ubuntu-4ubuntu2.1, OpenSSL 1.0.2g 1 Mar 2016
wget https://launchpadlibrarian.net/277739251/openssh-client_7.3p1-1_amd64.deb
wget https://launchpadlibrarian.net/298453050/libgssapi-krb5-2_1.14.3+dfsg-2ubuntu1_amd64.deb
wget https://launchpadlibrarian.net/298453058/libkrb5-3_1.14.3+dfsg-2ubuntu1_amd64.deb
wget https://launchpadlibrarian.net/298453060/libkrb5support0_1.14.3+dfsg-2ubuntu1_amd64.deb
@ethanpil
ethanpil / wp-secure.conf
Created May 12, 2017 16:16
Wordpress Security for NginX
# wp-secure.conf
#
#
# This file includes common security considerations for wordpress using nginx.
#
# The goal is to block actions which are usually dangerous to wordpress.
# Additionally, we block direct access to PHP files and folders which should not
# be accessed directly from a browser.
#
# Also have included exceptions for plugins that are known to require this access.
@AysadKozanoglu
AysadKozanoglu / using-auto-backup-vim.md
Created July 19, 2017 11:19 — forked from nepsilon/using-auto-backup-vim.md
Using auto backup with Vim — First published in fullweb.io issue #3

Using auto backup with Vim

Not using versioning on your configuration files and editing them with Vim? Use Vim’s backup option to automatically keep a copy of past versions:

To put in your ~/.vimrc:

"Turn on backup option
set backup
nbtscan 192.168.1.0-192.168.1.255
detail info host
nmap -A 192.168.1.8
get most ports
nmap --script smb-os-discovery 192.168.1.8
get mac adress ips hostnames
nmap -sP 192.168.1.0/24 | awk '/Nmap scan report for/{printf $5;}/MAC Address:/{print " => "$3;}' | sort
@AysadKozanoglu
AysadKozanoglu / remote_backup_server_data.sh
Created November 8, 2017 11:22
3 days retain backup solutio n for remote server data
#!/bin/bash
#
#author: Aysad Kozanoglu
#
#
# Directory in which to store the backups
ROOT_DIR=/mnt/backup
REMOTE_USER=root
REMOTE_PATH=/mnt/drbd/var/mail/vmail/espresto.com
@AysadKozanoglu
AysadKozanoglu / rsync_best_fast_muster.md
Last active July 31, 2019 14:48
rsync best fast file transfer muster (90MB/s on a 1Gbit NIC)

#auhtor: Aysad Kozanoglu

realizing a file transfer over 50MB-90MB/s on 1Gbit NIC

from remote to local

rsync -avHAXx --numeric-ids --progress -e "ssh -T -c arcfour -o Compression=no -x" user@[source]:[source_dir] [dest_dir]
@gdamjan
gdamjan / ssl-check.py
Last active April 14, 2024 07:16
Python script to check on SSL certificates
# -*- encoding: utf-8 -*-
# requires a recent enough python with idna support in socket
# pyopenssl, cryptography and idna
from OpenSSL import SSL
from cryptography import x509
from cryptography.x509.oid import NameOID
import idna
from socket import socket