Skip to content

Instantly share code, notes, and snippets.

View viniciusvts's full-sized avatar

Vinicius de Santana viniciusvts

View GitHub Profile
@viniciusvts
viniciusvts / intall-mariadb.md
Last active September 18, 2023 12:54
how-to

Instalar mariadb

primeiro instala pelo gerenciador de pacotes

#pacman -S mariadb

instala os dados no caminho padrão: /var/lib/mysql

sudo mysql_install_db --user=mysql --ldata=/var/lib/mysql

inicia o servidor do banco

sudo systemctl start mariadb

@viniciusvts
viniciusvts / install-apache.md
Last active September 18, 2023 12:53
how-to

instalar o apache web server

pelo gerenciador de pacotes

pacman -S apache

configurações:

  1. editar o arquivo /etc/httpd/conf/httpd.conf
// Web Masks
/**
* Mascara de Telefone para ser usada em inputs html
* @param {KeyboardEvent} evt - O evento será entregue aqui
* @example <caption>Executa a mascara quando evento keyup é lançado.</caption>
* document.querySelector('#phone').addEventListener('keyup',execMascaraTel);
* @author Vinicius de Santana <vinicius.vts@gmail.com>
* @license CC BY-NC
*/
@viniciusvts
viniciusvts / laravel-8-project-creation.md
Last active May 27, 2022 19:20
Laravel 8 my project instalation

Install laravel

composer create-project laravel/laravel:^8.0 example-app-name
cd example-app-name

Start git flow

git flow init
git remote add origin http://repository.url.git
git push -u origin master
git push -u origin develop

Create a file with the authors

Enter in your local svn repo and execute the following command, this creates a users.txt file

svn log -q | awk -F '|' '/^r/ {gsub(/ /, "", $2); sub(" $", "", $2); print $2" = "$2" <"$2">"}' | sort -u > users.txt

An filled line example:

admin.svn = Admin Svn <admin.svn@email.com>

Init a git repository

Add submodule to project

It add the submodule:

git submodule add -b <branch> <repository_url> <diretory_path>

Clone projects with submodules:

Cloning a project who has submodules, use the clone command with the option --recurse-submodules. It will garantee submodules are also cloned.

git clone --recurse-submodules <repository_url>
/**
* Automatiza a criação e inserção do codiguin do free fire
* Objetivo: gerar codiguins automaticamente e tentar validar no site da garena
* Para executar:
* - primeiro entre e faça login em https://reward.ff.garena.com/en
* - na aba do Rewards Redemption Site, cole no terminal a function "tentaCodiguin" acima, isso habilitará o uso da função
* - execute no terminal um setInterval chamando a function, isso gerará codiguins e executará no servidor da garena:
* > codiguinIterval = setInterval(()=>{ tentaCodiguin("W8TAU", 12,1) }, 5000);
* - e para parar:
* > clearInterval(codiguinIterval);

Config deploy

In gitlab:

If your repository is not public generate a new deploy token:

  • Go to Settings >> Repository >> Deploy Tokens
  • Generate a new Deploy Token. You get an username and a deploy_token

In Jenkins

Jenkins version tested: (ver. 2.235.2)

  • Go to settings of a project