Skip to content

Instantly share code, notes, and snippets.

View filipedfs's full-sized avatar
👨‍🎓
In the middle of the journey

Filipe Fonseca filipedfs

👨‍🎓
In the middle of the journey
View GitHub Profile
@filipedfs
filipedfs / convert_to_audio.py
Created December 13, 2020 14:18
Convert all media files from a folder to audio
import subprocess
import os
#%%
current_directory: str = os.getcwd()
working_directory = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir))
#%%
def convert_to_audio(filename, file_extension):
@filipedfs
filipedfs / sleep.js
Created December 13, 2020 01:40
Sleep in Javascript using Promise
await new Promise((resolve)=>setTimeout(resolve, 2000));
var mediaJSON = { "categories" : [ { "name" : "Movies",
"videos" : [
{ "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" ],
"subtitle" : "By Blender Foundation",
"thumb" : "images/BigBuckBunny.jpg",
"title" : "Big Buck Bunny"
},
{ "description" : "The first Blender Open Movie from 2006",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" ],
@filipedfs
filipedfs / gist:f6a9752ebafcee4327fecd931fa29e72
Created May 19, 2020 18:00
Generate black video from ffmpeg
ffmpeg -t 5 -f lavfi -i color=c=black:s=1280x720 -c:v libx265 output.mp4
@filipedfs
filipedfs / gist:1ec253fdbed8f2bba2201ce1b6112ae4
Created March 5, 2019 18:54 — forked from jNizM/gist:019696878590071cf739
[AHK] GUI - How-to draw a line / frame
; http://ahkscript.org/boards/viewtopic.php?f=7&t=8846
; https://dl.dropboxusercontent.com/u/186419968/Scripte/Gui/Gui_Draw_Line.png
; GLOBAL SETTINGS ===============================================================================================================
#Warn
#NoEnv
#SingleInstance Force
SetBatchLines -1