Convert MP4 file to animated WEBP file in ffmpeg CLI
1. Install ffmpeg CLI through homebrew
In terminal.app, install ffmpeg through homebrew
brew install ffmpeg
Validate the installation:
""" | |
Example to bypass distil security (https://www.distilnetworks.com/) with Selenium. | |
They use the javascript field navigator.webdriver to ban Selenium | |
The solution is to inject javascript code before the laoding og the webpage, to set webdriver to false | |
Works only with chromium driver | |
""" | |
from datetime import datetime | |
import os | |
import sys |
string = input('') | |
for i in string: | |
if i == ' ': | |
print(' ', end=' ') | |
else: | |
print(":regional_indicator_" + i + ":", end=' ') |
In terminal.app, install ffmpeg through homebrew
brew install ffmpeg
Validate the installation:
project-folder/
.git
wp-admin/
wp-content/
wp-includes/
.htaccess
-i
- ignore errors
-c
- continue
-t
- use video title as file name
--extract-audio
- extract audio track
export const getAMPMTimeFromDate = (date: Date) => { | |
let hours = date.getHours(); | |
let minutes = date.getMinutes() as any; | |
let ampm = hours >= 12 ? '오후' : '오전'; | |
hours = hours % 12; | |
hours = hours ? hours : 12; | |
minutes = minutes.toString().padStart(2, '0'); | |
let strTime = ampm + ' ' + hours + ':' + minutes; | |
return strTime; | |
}; |
export async function timeout<T>(promise: Promise<T>, ms: number): Promise<T> { | |
let timer: NodeJS.Timeout; | |
const res = await Promise.race([ | |
promise, | |
new Promise<'timeout'>(resolve => { | |
timer = setTimeout(() => resolve('timeout'), ms); | |
}) | |
] as const).finally(() => clearTimeout(timer)); | |
if (res === 'timeout') { |
# Simple docker-compose file example for Traefik | |
# Feature: Let's encrypt(ACME), Log(Debug level), Secure Dashboard(https connection, require password), Redirect http requests to https, Example docker container connection(whoami) | |
# @Poxios, 2022 | |
version: '3' | |
services: | |
reverse-proxy: | |
image: traefik | |
container_name: reverse-proxy |
def generate_text_bar_graph(length: int, min_value: int, score: int, max_value: int):
if score <= min_value:
return f'[{min_value} ⚡{"―"*(length-1)} {max_value}]'
elif max_value <= score:
return f'[{min_value} {"―"*(length-1)}⚡ {max_value}]'
def roundUp(num: int): return int(num) + \
1 if (num - int(num)) >= 0.5 else int(num)