Skip to content

Instantly share code, notes, and snippets.

View gabrielmoura's full-sized avatar

Gabriel Moura gabrielmoura

  • Computei
  • Brasil, Rio de Janeiro
  • 15:36 (UTC -03:00)
  • LinkedIn in/gmouradev
View GitHub Profile
@gabrielmoura
gabrielmoura / Dockerfile
Created March 2, 2024 22:16
Keycloak Tailwind Theme
FROM registry.access.redhat.com/ubi9 AS ubi-micro-build
RUN mkdir -p /mnt/rootfs
RUN dnf install --installroot /mnt/rootfs curl --releasever 9 --setopt install_weak_deps=false --nodocs -y && \
dnf --installroot /mnt/rootfs clean all && \
rpm --root /mnt/rootfs -e --nodeps setup
#####################################################################
FROM quay.io/keycloak/keycloak:23.0 as builder
# Enable health and metrics support
ENV KC_HEALTH_ENABLED=true
@gabrielmoura
gabrielmoura / PKGBUILD
Created February 8, 2024 22:37
Warp Terminal - Arch Linux
# Maintainer: irmluity <45vw4yz8g@mozmail.com>
pkgname=warp-terminal
pkgver=0.2024.01.30.16.52.stable_01
pkgrel=1
pkgdesc="Warp is a modern, Rust-based terminal with AI built in so you and your team can build great software, faster"
arch=(x86_64)
url='https://warp.dev'
license=('LicenseRef-warp')
depends=('hicolor-icon-theme' 'zlib' 'glibc')
@gabrielmoura
gabrielmoura / deploy.sh
Created October 29, 2022 18:45 — forked from cagartner/deploy.sh
Laravel Push deploy Github actions example
#!/bin/sh
set -e
vendor/bin/phpunit
(git push) || true
git checkout production
git merge master
{
"features": [
{
"geometry": {
"coordinates": [
-80.704,
37.325739
],
"type": "Point"
},
@gabrielmoura
gabrielmoura / widevine-flash_armhf.sh
Created October 1, 2019 13:58 — forked from ruario/1-README.md
Fetches a ChromeOS image for ARM and extracts the Widevine and Flash binaries, saving them in a compressed archive
#!/bin/sh -eu
# Make sure we have wget or curl
available () {
command -v "$1" >/dev/null 2>&1
}
if available wget; then
DL="wget -O-"
DL_SL="wget -qO-"
elif available curl; then
@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

@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 / 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 / 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 / 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,