Skip to content

Instantly share code, notes, and snippets.

View vitormattos's full-sized avatar
💻

Vitor Mattos vitormattos

💻
View GitHub Profile
@vitormattos
vitormattos / steps.sh
Created October 26, 2025 00:01
Steps to test Libresign Reminders
# Make the setup of Reminders at Nextcloud Administration settings > LibreSign > Reminders
# Check if you are looking the date of the next execution of this job
# List all background jobs
occ background-job:list
# Or use the filter by class name to find only Reminder job
# You will see the job ID, class name, and next execution date
occ background-job:list --class "OCA\Libresign\BackgroundJob\Reminder"
# Request a test signature at LibreSign using an email you have access to
@vitormattos
vitormattos / test.php
Last active June 20, 2022 14:27
benchmark between string casting and srtcal
<?php
/**
* How to use?
*
* Run:
* php test.php <number of loops>
* Example:
* php test.php 100000
*/
{{Info/Empresa
| nome = PHPRio - Comunidade PHP do Estado do Rio de Janeiro
| imagem = PHPRio.png
| img-tam = 150px
| img-des = Logomarca do '''PHPRio'''
| fundação = [[15 de maio]] de [[2007]] (em [[Rio_de_Janeiro_(estado)|Rio de Janeiro]])
| sede = [[Rio_de_Janeiro_(estado)|Rio de Janeiro]], {{BRA}}
| tipo empresa = [[Comunidade]]
| genero =
| indústria =
@vitormattos
vitormattos / INSS_IR.js
Created August 11, 2020 14:12
Cálculo INSS, IR e remuneração bruta
/**
* @param {number} Valor bruto para calcular inss
* @customfunction
*/
function INSS(bruto, producao_interna, teto = 5645.80) {
if(producao_interna == '' || producao_interna == 0 || producao_interna == '0') {
aliquota = 0.2;
} else {
aliquota = 0.11;
}
@vitormattos
vitormattos / cloudSettings
Last active January 10, 2023 19:21
Visual Studio Code Settings Sync Gist
{"lastUpload":"2023-01-10T19:20:17.598Z","extensionVersion":"v3.4.3"}
Montar ambiente
Touch screen scrooling no Firefox
https://askubuntu.com/questions/978226/how-to-make-touch-screen-scrolling-work-in-firefox-quantum
@vitormattos
vitormattos / wait-for-db
Last active June 29, 2020 01:37
Script to wait for db is receiving new connections
#!/usr/bin/env php
<?php
function dbIsUp() {
try {
$dsn = getenv('DB_TYPE').':dbname='.getenv('DB_NAME').';host='.getenv('DB_HOST');
new PDO($dsn, getenv('DB_USER'), getenv('DB_PASSWD'));
} catch(Exception $e) {
echo $e->getMessage().PHP_EOL;
return false;
}
{
"banned": [
],
"byRegex": [
"[同号]{1}","(253239090){1}"
]
}
@vitormattos
vitormattos / MonologTelegramHandler.php
Last active October 11, 2016 21:45
Send logs from application to a Telegram group
<?php
namespace App\Handler;
use Monolog\Handler\MailHandler;
use Monolog\Handler\AbstractHandler;
use Telegram\Bot\Api;
class MonologTelegramHandler extends MailHandler {
/**
*
* @var Api
*/
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac