Skip to content

Instantly share code, notes, and snippets.

@FoRTu
FoRTu / ssh_withuot_password.sh
Created June 5, 2018 18:53
Connect to a server over SSH without password
#Connect from SERVER-A to SERVER-B without password:
# SERVER-A:
ssh-keygen
# SERVER-A:
ssh-copy-id -i ~/.ssh/id_rsa.pub SERVER-B
#will ask you for SERVER-B password
# SERVER-A:
@FoRTu
FoRTu / APTLY_Repositorio.sh
Created October 8, 2017 10:22
[Crear un repositorio con Aptly] #tags: aptly, debian, script, repositorio
# Crear Repositorio:
aptly repo create -config="./aptly.conf" -distribution=jessie -component=main -comment="Repositorio personal para Debian 8 Jessie" Repositorio-Jessie
aptly repo create -config="./aptly.conf" -distribution=stretch -component=main -comment="Repositorio personal para Debian 9 Stretch" Repositorio-Stretch
# Agegar paquete .deb al repositorio:
aptly repo add -config="./aptly.conf" Repositorio-Jessie ../Packaging\ DEBs/opentracker_11-12-2015.amd64/opentracker_11-12-2015_amd64.deb
aptly repo add -config="./aptly.conf" Repositorio-Stretch ../Packaging\ DEBs/opentracker_11-12-2015.amd64/opentracker_11-12-2015_amd64.deb
# Buscar paquetes y ver su informacion:
aptly package search -config="./aptly.conf" 'opentracker'
@FoRTu
FoRTu / Leer archivo de configuracion.md
Last active September 18, 2017 09:23
[Python: Leer configuracion desde un archivo tipo .conf] #tags: python, conf, files, archivos, configuracion

El archivo tipo .conf debera tener una cabecera entre corchetes [ ] y los parametros deberan tener = o : para asignarles eel valor:

[Cabecera]
path1 = "D:\test1\first"
path2 = "D:\test2\second"
path3 = "D:\test2\third"

El codigo Python debera tener algo parecido a esto:

@FoRTu
FoRTu / insync.service
Created June 11, 2017 15:08
[SystemD: insync] Google dive cliente Insync #tags: systemd, services, insync, google,
[Unit]
Description=Insync Service
After=network.target
RequiresMountsFor=/PATH/TO/YOUR/MOUNTED/SHARE
[Service]
Type=oneshot
User=YOURUSERHERE
ExecStart=/usr/bin/insync-headless start
ExecStop=/usr/bin/insync-headless quit