Skip to content

Instantly share code, notes, and snippets.

View joubertredrat's full-sized avatar

Joubert RedRat joubertredrat

View GitHub Profile
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
Super Manual de comandos do GNU/Linux
-------------------------------------
AUTOR : Eder S. G. (Jordam)
E-M@IL PRINCIPAL : ederjordam@yahoo.com.br
SITE : http://geocities.yahoo.com.br/ederjordam
REGISTERED LINUX USER : 179086
@joubertredrat
joubertredrat / .editorconfig
Last active November 28, 2021 15:45
Editorconfig and gitignore for go projects
root = true
[*]
insert_final_newline = true
charset = utf-8
trim_trailing_whitespace = true
indent_style = space
indent_size = 2
[{Makefile,go.mod,go.sum,*.go}]
@joubertredrat
joubertredrat / MyCoolRepository.php
Created April 2, 2018 13:33
Doctrine custom walker
<?php
namespace Application\Infrastructure\Repository;
use Application\Domain\Model\TransactionStatus;
use Application\Infrastructure\Component\DoctrineExtensions\Query\SortableNullsWalker;
use Doctrine\ORM\EntityRepository;
use Doctrine\ORM\Query;
/**
@joubertredrat
joubertredrat / git-clone-github
Created November 18, 2021 00:42
Clone a Github repository into a new directory with user as prefix
#!/bin/sh
# git-clone-github
# Clone a Github repository into a new directory with user as prefix
# Usage: git clone-github github-repo-url
set -e
clone_url=$1
if [[ $clone_url != https://github.com/* && $clone_url != http://github.com/* ]]
then
@joubertredrat
joubertredrat / readme.md
Last active November 2, 2020 18:09
Install Gogs from binary on VestaCP panel

Install Gogs from binary on VestaCP

This tutorial was written based on Ubuntu 14.04 with VestaCP.

For this example, I created user cooler, domain repo.my.cooler and database cooler_repo on VestaCP panel.

To install Gogs, you will need to use user with admin rights, on my tutorial I'm using default admin user from VestaCP.

1 - install supervisor.

@joubertredrat
joubertredrat / howto.md
Created June 12, 2020 13:09 — forked from petrkohut/howto.md
How to have redis-cli and psql installed on machine using Docker

How to install redis-cli and psql client on your machine with Docker

Preparing docker images

We will use minimalistic Linux distribution called Alpine (5MB)

Dockerfile of redis-cli

FROM alpine:latest
RUN apk --update add redis
@joubertredrat
joubertredrat / options-ssl-apache.conf
Created August 11, 2016 14:42
Let's Encrypt SSL configuration to get A on SSL Labs test
# Baseline setting to Include for SSL sites
SSLEngine on
# Intermediate configuration, tweak to your needs
SSLProtocol all -SSLv2 -SSLv3
SSLCipherSuite ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA
SSLHonorCipherOrder on
SSLCompression off
@joubertredrat
joubertredrat / readme.md
Last active September 26, 2019 13:04
Regras do concurso cosplay na escola E.E Professor João Câmara

Concurso cosplay na escola E.E Professor João Câmara

Regras

  • A inscrição deverá ser feita pelo formulário online .
  • É necessário enviar pelo menos uma foto do personagem de referência.
  • O cosplay será avaliado por 2 critérios, fidelidade e desenvoltura na apresentação por 3 pessoas juradas.
  • O cosplayer terá 1 minuto para realizar sua apresentação, o cosplayer que exceder este tempo será penalizado.

Premiação

@joubertredrat
joubertredrat / test.php
Last active September 19, 2019 17:38
A bizarre mock that works
<?php
namespace Tests;
use GuzzleHttp\Client;
use Tests\TestCase;
/**
* Any Test
*
#!/usr/bin/env bash
l=$(wmctrl -l | grep -i -o "0[xX][0-9a-z]*")
for i in $(echo $l); do
wmctrl -i -r $i -b toggle,maximized_horz,maximized_vert
done
for i in $(echo $l); do
wmctrl -i -r $i -b toggle,maximized_horz,maximized_vert