Skip to content

Instantly share code, notes, and snippets.

View gabrielmoura's full-sized avatar

Gabriel Moura gabrielmoura

  • Computei
  • Brasil, Rio de Janeiro
  • 19:50 (UTC -03:00)
  • LinkedIn in/gmouradev
View GitHub Profile

Keybase proof

I hereby claim:

  • I am gabrielmoura on github.
  • I am gabrielmoura (https://keybase.io/gabrielmoura) on keybase.
  • I have a public key whose fingerprint is 5ACD 3AD2 CE3A 5062 134D 17A6 17DE D5C7 313A A77D

To claim this, I am signing this object:

@gabrielmoura
gabrielmoura / perfectelementary.bash
Created May 11, 2017 03:55
HowTo Install the perfect Elementary-OS
#Download Elementary OS from here:
#http://sourceforge.net/projects/elementaryos/files/stable/
#First you update your system
sudo apt-get update && sudo apt-get dist-upgrade
#Install Google Chrome
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'
@gabrielmoura
gabrielmoura / PKGBUILD-SCRYPT
Created August 17, 2017 00:21
Pacote PKGBUILD para scrypt
# Maintainer: Dominic Black <thephenix@gmail.com>
# Maintainer: Gabriel Moura <g@srmoura.com.br>
pkgname=php-scrypt
pkgver="1.4.2"
pkgrel=1
pkgdesc="Derivation function designed to be far more secure against hardware brute-force attacks"
arch=('i686' 'x86_64')
url='https://github.com/DomBlack/php-scrypt'
license=('BSD2')
source=(
= Arch Linux step-by-step installation =
= http://blog.fabio.mancinelli.me/2012/12/28/Arch_Linux_on_BTRFS.html =
== Boot the installation CD ==
== Create partition ==
cfdisk /dev/sda
* Create a partition with code 8300 (Linux)
@gabrielmoura
gabrielmoura / fail2ban.md
Created December 27, 2017 23:35 — forked from bonsi/fail2ban.md
fail2ban – stop HTTP(S) route abuse/brute forcing

If you're not familiar: What is fail2ban? fail2ban is an awesome linux service/monitor that scans log files (e.g. auth.log for SSH) for potentially malicious behavior. Once fail2ban is tripped it will ban users for a specified duration by adding rules to Iptables. If you're unfamiliar with fail2ban Chris Fidao has a wonderful (& free!) series about security including setting up fail2ban here.

Recently Laravel released a new feature in 5.1 to throttle authentication attempts by simply adding a trait to your authentication controller. The Laravel throttle trait uses the inputted username, and IP address to throttle attempts. I love seeing this added to a framework out of the box, but what about some of our other apps not built on Laravel? Like a WordPress login? Or even an open API etc.? Ultimately,

pkgname=nerolinux
pkgver=4.0.0.0
pkgrel=0
pkgdesc="Nero Linux Disc Burning Software. Nero Linux is a flexible application, which supports all important Nero Burning ROM features on Linux systems. - Data CDs, DVDs and Blu-ray discs - Bootable CDs, DVDs and Blu-ray using the El-Torito standard - Audio CDs with various audio formats - Mixed-Mode CDs and Enhanced CDs (CD EXTRA) - Disc Images (ISO, NRG, and Cue Sheets) - DVD-Video and miniDVD - Multisession discs"
arch=('any')
url="http://www.nero.com/ptb/downloads/previous-versions/download-linux4-update.php"
license=('nero')
provides=('nero')
depends=('desktop-file-utils' 'glib2' 'gtk2' 'hicolor-icon-theme')
backup=('etc/nero/config')
@gabrielmoura
gabrielmoura / openpgp.txt
Created July 25, 2018 01:35
Identidade Vinculada do OpenKeychain
This Gist confirms the Linked Identity in my OpenPGP key, and links it to this GitHub account.
Token for proof:
[Verifying my OpenPGP key: openpgp4fpr:dde43dea10ca4eed5d7f881e76ce3619a00292af]
@gabrielmoura
gabrielmoura / Nvidia GPU principal
Created October 23, 2018 15:45
Nvidia GPU principal
sudo pacman -Rns bumblebee --noconfirm
sudo nano /etc/X11/xorg.conf.d/20-display.conf
Section "ServerLayout"
Identifier "layout"
Screen 0 "nvidia"
Inactive "intel"
EndSection
@gabrielmoura
gabrielmoura / Server Docker
Last active June 18, 2019 17:51
Servidor Docker para ambiente de desenvolvimento
# v3 syntax
version: '3'
services:
postgres:
image: postgres
container_name: app-postgres
environment:
POSTGRES_PASSWORD: "password"
ports:
@gabrielmoura
gabrielmoura / tmux.md
Created June 27, 2019 20:25 — forked from andreyvit/tmux.md
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a