Skip to content

Instantly share code, notes, and snippets.

@sanchon
sanchon / sshWithoutPassword.md
Last active October 23, 2020 20:13
passwordless ssh from A to B

Crear clave publica en A (solo si A es una máquina nueva)

A> ssh-keygen -t rsa (enter / enter / enter)

Crear carpeta .ssh en B (solo si B es una maquina nueva)

A> ssh B mkdir -p .ssh

Añadir la clave de A a B

@sanchon
sanchon / queryFicherosOnDeckSubs.sql
Created August 15, 2014 19:55
Bajar Subtítulos de Series On Deck
.headers OFF
.output ficherosondecksubs.txt
select distinct P.file --, IAbuelo.title as serie, IPadre.[index] as temporada, I.[index] as episodio
from METADATA_ITEMS I
inner join LIBRARY_SECTIONS L
on I.library_section_id = L.id
left outer join METADATA_ITEM_SETTINGS S
on I.guid = S.guid
inner join MEDIA_ITEMS M
on I.id = M.metadata_item_id
@sanchon
sanchon / series.sh
Last active March 18, 2016 01:41
Script para subtitular y clasificar las series
#!/bin/bash
RUTA_FINISHED="/mnt/discoInterno2/downloads/torrents-finished"
RUTA_WITHSUBS="/mnt/discoInterno2/downloads/torrents-withsubs"
# --------------------------------------------------------------------------------
# 1.- Sacamos los ficheros de video de sus posibles subdirectorios
# --------------------------------------------------------------------------------
# primero movemos los ficheros de sus subdirectorios a la RUTA_FINISHED