Skip to content

Instantly share code, notes, and snippets.

View brunurd's full-sized avatar

Bruno Araujo brunurd

View GitHub Profile
@brunurd
brunurd / ffmpeg-commands.sh
Created January 31, 2025 14:15
Video conversions and optmizations with FFMPEG
# 1080p/24fps mp4
ffmpeg -i ${INPUT} -vf "scale=1920:-1" -r 24 -c:v libx264 -crf 23 -preset fast -an ${OUTPUT}
# 720p/24fps mp4
ffmpeg -i ${INPUT} -vf "scale=720:-1" -r 24 -c:v libx264 -crf 23 -preset fast -an ${OUTPUT}
# 1080p/24fps webm
ffmpeg -i ${INPUT} -vf "scale=1080:-1" -r 24 -c:v libvpx-vp9 -b:v 0 -crf 30 -an ${OUTPUT}
# 720p/24fps webm
// short way.
document.querySelectorAll('video')[0].disablePictureInPicture=false;document.querySelectorAll('video')[0].requestPictureInPicture();
// long way.
const pInP = async el => {
el.disablePictureInPicture = false;
await el.requestPictureInPicture();
}
const videos = document.querySelectorAll('video');
pInP(videos[0]);
@brunurd
brunurd / themeGenerator.ipynb
Last active March 28, 2023 16:51
Awful Game Theme Generator
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@brunurd
brunurd / diet-suggestion.md
Created January 17, 2023 15:34
Diet suggestion by beta.openai

Diet suggestion

Source: https://beta.openai.com/playground


V1

Input

write a diversified diet with breakfast, lunch, and dinner on a table with the weight of each ingredient, the total calories of the meal, and the macronutrients quantity for each ingredient

@brunurd
brunurd / ps1.sh
Last active July 29, 2021 20:22
PS1 bolado
#!/bin/bash
DEFAULT="\[\033[0;00m\]"
RED="\[\033[1;31m\]"
GREEN="\[\033[0;32m\]"
YELLOW="\[\033[0;33m\]"
PURPLE="\[\033[0;35m\]"
CYAN="\[\033[0;36m\]"
__error_red_num() {
@brunurd
brunurd / Pipfile
Created March 12, 2021 15:34
Python custom git modules syntax
# <name> = {git = "<https_address>",ref = "<revision>"}
# Example:
vents = {git = "https://github.com/lavaleak/vents",ref = "master"}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@brunurd
brunurd / settings.json
Last active April 9, 2023 15:49
Windows Terminal - settings
{
"$help": "https://aka.ms/terminal-documentation",
"$schema": "https://aka.ms/terminal-profiles-schema",
"actions":
[
{
"command":
{
"action": "copy",
"singleLine": false
@brunurd
brunurd / config.fish
Created February 11, 2021 01:16
fish prompt as git-bash in ~/.config/fish/
function fish_prompt
set -l git_branch (git branch ^/dev/null | sed -n '/\* /s///p')
echo -e '\033[0;32m'(whoami)'@'(hostname)' \033[0;33m'(prompt_pwd)' \033[0;36m('"$git_branch"')\033[0;00m\n$ '
end