Skip to content

Instantly share code, notes, and snippets.

View pixelead0's full-sized avatar
👨‍💻
Programando.... ando...

AdanGQ pixelead0

👨‍💻
Programando.... ando...
View GitHub Profile
@pixelead0
pixelead0 / transcribe_audio_to_text.py
Created May 21, 2024 01:15
transcribe_audio_to_text
import os
from pydub import AudioSegment
import speech_recognition as sr
print("# Define las rutas")
path = '/app/audio/a00'
audio_file_path = f"{path}.m4a"
output_directory = '/app/audio/segments'
@pixelead0
pixelead0 / list_all_pads.sh
Created July 11, 2022 17:49
List all pads - etherpad
# List all pads - etherpad
# https://github-wiki-see.page/m/ether/etherpad-lite/wiki/How-to-list-all-pads
# https://etherpad.org/doc/latest/#index_http_api
ETHERPAD_HOST='http://127.0.0.1:9001'
# can be found in APIKEY.txt file in the Etherpad installation directory
ETHERPAD_API_KEY='...'
#Get api version
@pixelead0
pixelead0 / settings.json
Created March 19, 2022 01:39
vscode config
{
"window.zoomLevel": 2,
"editor.columnSelection": false,
"workbench.colorTheme": "Arkademy",
"files.associations": {
"*.bash": "shellscript",
"*.jinja": "html"
},
"explorer.confirmDelete": false,
"[jinja]": {
@pixelead0
pixelead0 / .openconnect
Created October 27, 2021 01:49
Para conectarse a la vpn de globalProtect desde la terminal de linux
ContraseñaUltraSegura
@pixelead0
pixelead0 / dates_helper.py
Created October 22, 2021 14:48
Funciones utiles para trabajar con fechas
import datetime
import logging
logger = logging.getLogger(__name__)
class DatesHelper(object):
def convert_string_to_datetime(self, date=datetime.datetime.now()):
if type(date) == str or type(date) == unicode:
@pixelead0
pixelead0 / docker_tricks.sh
Created June 17, 2021 13:35
Comandos docker
# Ver logs del ultimo contenedor creado
docker ps -lq | xargs -L 1 docker logs -f
# Crea un alias para mostrar los logs del ultimo contenedor dev_web creado
alias 'dev_web'='docker container ls | grep '"'"'dev_web'"'"' | awk '"'"'{ print $1 }'"'"' '
alias 'log_dev'='docker logs -f $(dev_web)'
#-----
CONTAINER_NAME=dev_web
docker container ls | grep "$CONTAINER_NAME" | awk "{ print $1 }"
@pixelead0
pixelead0 / odoo_update_expiration_date.sql
Created June 17, 2021 13:08
Odoo - Modificar base de datos expirada
update ir_config_parameter set value='2021-12-12 00:00:00' where key='database.expiration_date';
@pixelead0
pixelead0 / view_databases.sql
Created June 17, 2021 13:06
postgres - Listar todas las bases de datos existentes y sus fechas de creación
SELECT (pg_stat_file('base/'||oid ||'/PG_VERSION')).modification, datname FROM pg_database order by 1;
@pixelead0
pixelead0 / odoo_backup_databases.sh
Created May 4, 2021 21:21
Backup all databases from odoo
#Backup all databases from odoo
#References:
# Backup databases:
# https://github.com/odoo/odoo/blob/cd9c071c9357cef14635ef094a9f14fc5431956c/addons/web/controllers/main.py#L1185
# List databases
# https://github.com/odoo/odoo/blob/cd9c071c9357cef14635ef094a9f14fc5431956c/addons/web/controllers/main.py#L1234
MASTER_PWD=password
BACKUP_DIR=data/backup/
HOST=http://localhost:8069
@pixelead0
pixelead0 / organiza_multimedia.sh
Created May 18, 2020 00:41
Script para organizar fotos y vídeos separandolos por la fecha en que fueron tomados
#!/bin/sh
# Script para organizar fotos y vídeos separandolos por la fecha en que fueron tomados
# fuente: https://geekland.eu/clasificar-renombrar-fotos-linux/
for fil in "$@"
do
echo "*******************************"
# Obtiene tipo de archivo
FILETYPE="$(mimetype --output-format %d $fil | awk '{print $2 }')"