Skip to content

Instantly share code, notes, and snippets.

View wedermac's full-sized avatar

Weder Araujo wedermac

View GitHub Profile
@jhowbhz
jhowbhz / FixAudio.js
Last active September 29, 2025 19:16
const ffmpegPath = require('ffmpeg-static');
const ffmpeg = require('fluent-ffmpeg');
const fs = require('fs/promises');
const path = require('path');
const os = require('os');
const tmp = require('tmp');
ffmpeg.setFfmpegPath(ffmpegPath);
static async downloadToTmp(url) {
@troyfontaine
troyfontaine / readme.md
Last active July 17, 2025 02:01
Resize root partition (or how to remove the default /home partition) on CentOS 7 online

Resize root partition (or how to remove the default /home partition) on CentOS 7 online

This process requires that you are able to ssh OR log in locally using the root user account and that no services be running as users out of /home on the target machine.

The examples are from a default installation with no customization-you NEED to know what you're working with for volumes/partitions to not horribly break things.

By default, CentOS 7 uses XFS for the file system and Logical Volume Manager (LVM), creating 3 partitions: /,/home and swap.

NOTE: If you want to be sure that nothing is writing to /home you can either modify the host to boot into single-user mode OR try to use the systemctl isolate runlevel1.target command to switch (not tested! should work).

@dpasqua
dpasqua / interval.sh
Last active April 9, 2024 20:06
Script que irá executar um determinado comando a cada 15 segundos. Script é ideal para ser utilizado no crontab, caso queira um processo seja executado em intervalos menores que 1 minuto, que é o intervalo mínimo permitido no crontab.
#!/bin/bash
# Script que irá executar um determinado comando a cada 15 segundos.
# Script é ideal para ser utilizado no crontab, caso queira um processo seja executado em intervalos
# menores que 1 minuto, que é o intervalo mínimo permitido no crontab.
#
# Pode ser facilmente adaptado para outros intervalos diferente de 15 segundos.
# Neste exemplo, o script será executado nos momentos: 0, 15, 30 e 45 (para por aqui).
# O próximo momento será executado pelo crontab que iniciará um novo ciclo.