Skip to content

Instantly share code, notes, and snippets.

@mauroao
mauroao / copy_audio.py
Last active July 30, 2023 00:11
audio 2x from file1 and video from file2
import sys
import subprocess
def extract_audio(input_file, output_file):
subprocess.run(['ffmpeg', '-i', input_file, '-vn', '-acodec', 'copy', output_file])
def concatenate_audio(input_file, output_file):
subprocess.run(['ffmpeg', '-i', f'concat:{input_file}|{input_file}', '-c', 'copy', output_file])
def get_video_duration(input_file):

Melhorar o Windows 10

Desabilitar agendador de tarefas

  • Windows + R
  • taskschd.msc
  • Excluir tudo;

Desabilitar serviços

@mauroao
mauroao / index.js
Last active June 21, 2020 02:27
javascript_page_objects
const { Builder } = require('selenium-webdriver');
require('chromedriver');
const Page = require('./page');
(async function example() {
const driver = await new Builder().forBrowser('chrome').build();
try {
const page = new Page(driver);
await page.openAndTestPage();
} finally {

Setup de projeto Node.js em Windows (resumo)

1. Instalação:

Instalar os seguintes programas:

  • Node.js;
  • Visual Studio Code;

Instalar os seguintes plugins do visual studio:

@mauroao
mauroao / readLineAssync.js
Last active November 13, 2023 14:59
Node.js - Read line from stdin asynchronously (async / await)
const readline = require('readline');
const readLineAsync = () => {
const rl = readline.createInterface({
input: process.stdin
});
return new Promise((resolve) => {
rl.prompt();
rl.on('line', (line) => {
@mauroao
mauroao / README-Template.md
Created April 18, 2019 16:38 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites