Skip to content

Instantly share code, notes, and snippets.

Avatar

Gustavo Arnosti Neves tavinus

  • Araraquara / SP / Brazil
View GitHub Profile
@tavinus
tavinus / menu-template.bat
Last active Dec 17, 2020
Template de programa .bat com menu
View menu-template.bat
:: Fonte original: https://www.youtube.com/watch?v=Rb4-Ff55-YI
::
:: Modificado para não fechar a janela do CMD ao final
:: Se abrir do explorer ainda fecha, se abrir do prompt não
::
:: Desativadas as opções 1, 2 e 3 (seguro contra idiotas)
::
:: tavinus @ 17/12/2020
::
:: v0.0.4
@tavinus
tavinus / dwagent_uninstall.md
Last active Dec 10, 2020
Manual Uninstall dwagent from Windows
View dwagent_uninstall.md

DWAgent Manual Uninstall

We faced a situation where the DWAgent client would not run and we could not uninstal or reinstall it.

The solution is to manually remove it before installing again.

This guide is for Windows 10, it may work for other Windows versions as well.

1- Delete the program folder

%PROGRAMFILES%\DWAgent
@tavinus
tavinus / nextcloud_cron_tweaks.md
Last active Dec 26, 2020
Nextcloud Cron Tweaks
View nextcloud_cron_tweaks.md

Making Nextcloud's Cron Behave

Nextcloud needs frequent background jobs to keep running properly.

Depending on the situation this "cron job" may take a very long time, overlapping with the default 5 minute delay between jobs. Which may end up running several instances of the job.

To mitigate this we have 2 options:

  • Use a systemd service+timer
  • Encapsulate the cronjob into a bash script that checks if it is already running

The systemd approach has official support and will (by default) not run on top of a previous run (if still running).

@tavinus
tavinus / youtube-dl-mp4.md
Last active Nov 21, 2020
Bash alias for forced MP4 youtube-dl
View youtube-dl-mp4.md

Youtube-DL MP4

Add the alias to your shell profile.

Depending on your system, shell and local/remote connection, the file sourced(loaded) may change.

For BASH and Debian, you could edit ~/.bash_profile

nano ~/.bash_profile
View index.html
<div class="moon"></div>
<div class="moon__crater moon__crater1"></div>
<div class="moon__crater moon__crater2"></div>
<div class="moon__crater moon__crater3"></div>
<div class="star star1"></div>
<div class="star star2"></div>
<div class="star star3"></div>
<div class="star star4"></div>
<div class="star star5"></div>
@tavinus
tavinus / onlyofficeDocsLXCBuster.md
Last active Apr 16, 2021
OnlyOffice Docs into a LXC Debian 10
View onlyofficeDocsLXCBuster.md
@tavinus
tavinus / timestampToHuman.md
Last active Sep 23, 2020
Convert an epoch timestamp to a human readable format
View timestampToHuman.md
@tavinus
tavinus / puppeteerDebianHeadless.md
Created Sep 11, 2020
Minimal Puppeteer NodeJS Debian 10 Buster
View puppeteerDebianHeadless.md

System

Debian 10 Buster headless

Chromium dependencies

Shared Libraries needed

$ sudo apt install libnss3 libatk1.0-0 libatk-bridge2.0-0 libcups2 libgbm1 libasound2 libpangocairo-1.0-0 libxss1 libgtk-3-0

Install nvm

Local user

@tavinus
tavinus / deb10bitwardenInstall.md
Last active May 7, 2021
Debian 10 BitwardenRS install (no docker)
View deb10bitwardenInstall.md
@tavinus
tavinus / upgrade-nghttp2
Created Apr 3, 2020 — forked from noplanman/upgrade-nghttp2
Upgrade nghttp2 for brew with a fix for older MacOS versions
View upgrade-nghttp2
#!/usr/bin/env bash
# Update brew repo.
printf "%s" "Updating brew repo..."
brew update &> /dev/null
echo ""
# Get the currently installed and new version of nghttp2.
printf "%s" "Fetch installed and stable nghttp2 versions..."
VERSION_INSTALLED="$(brew list --versions | grep nghttp2 | awk '{print $2}')"