Skip to content

Instantly share code, notes, and snippets.

View viniciusvts's full-sized avatar

Vinicius de Santana viniciusvts

View GitHub Profile

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
/**
* Automatiza a criação e inserção do codiguin do free fire
* Do jeito em que está, deve ser executado em https://reward.ff.garena.com/en
* @param prefix prefixo do codiguin
* @param tamanho tamanho do codiguin
*/
function tentaCodiguin(prefix, tamanho) {
// cria codiguin
for (var e = tamanho - prefix.length, t = "", n = "023456789ABCDEFGHJKLMNPQRSTUVWXYZ", o = n.length, c = 0; c < e; c++)
t += n.charAt(Math.floor(Math.random() * o));

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>

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

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