Skip to content

Instantly share code, notes, and snippets.

View dantebarba's full-sized avatar

Dante Barba dantebarba

View GitHub Profile
@dantebarba
dantebarba / modules.94dc165d6ab055fc0ad0.js
Last active July 14, 2020 23:49
twitter.app module file with fixed image display
This file has been truncated, but you can view the full file.
(window.webpackJsonp=window.webpackJsonp||[]).push([[0],[function(a,n,e){"use strict";a.exports=e(541)},function(a,n,e){"use strict";Object.defineProperty(n,"_register",{value:function(a,n){if(this.hasOwnProperty("language")||Object.defineProperty(this,"language",{value:a,enumerable:!1,writable:!1,configurable:!1}),this.language!==a)throw new Error("Changing dynamically the language from "+this.language+" to "+a+" is not allowed.");if("undefined"!==typeof n){var e=Object.getOwnPropertyNames(n)[0],i=Object.getOwnPropertyDescriptor(n,e);Object.defineProperty(this,e,i)}return function(a,n){this[a]=n}.bind(this)}.bind(n),enumerable:!1})},function(a,n,e){var i=e(828),r=e(272),o=36e5,t=6e4,s=2,u=/[T ]/,l=/:/,m=/^(\d{2})$/,c=[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],h=/^(\d{4})/,d=[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],g=/^-(\d{2})$/,k=/^-?(\d{3})$/,b=/^-?(\d{2})-?(\d{2})$/,p=/^-?W(\d{2})$/,f=/^-?W(\d{2})-?(\d{1})$/,y=/^(\d{2}([.,]\d*)?)$/,v=/^(\d{2}):?(\d{2}([.,]\d*)?)$/,w=/^(\d{2}):?(\d{2}):?(\d{2}
@dantebarba
dantebarba / svn_to_git.rst
Created November 26, 2019 15:47 — forked from epicserve/svn_to_git.rst
Convert SVN Repositories to Git Repositories

Convert SVN Repositories to Git Repositories

This guide on how to convert an SVN repository to a git repository was mostly taken from John Albin Wilkins post on Converting a Subversion repository to Git.

1. Retrieve a list of all Subversion committers

:

@dantebarba
dantebarba / install_CUPS_all_defaults.sh
Created May 27, 2019 02:26 — forked from aweijnitz/install_CUPS_all_defaults.sh
Installing CUPS printer on Debian and add PDF printer
#!/bin/bash
sudo apt-get -y install cups
sudo apt-get -y install cups-pdf
# add pdf printer to cups
# - named files end up in ~/PDF/
# - unnamed files are stored in /var/spool/cups-pdf/ANONYMOUS/, such as PDF:s created by streaming bytes over an API
sudo lpadmin -p cups-pdf -v cups-pdf:/ -E -P /usr/share/ppd/cups-pdf/CUPS-PDF.ppd
@dantebarba
dantebarba / rclone-move-dms.md
Last active April 27, 2019 02:53
How-To backup and delete - Docker Media Server on-demand backup

rclone move DanteConePlex:/root/docker/radarr/movies $STORAGE_LOCATION/library/movies/DanteConePlex -v --min-age 30d --delete-empty-src-dirs --dry-run

docker run --name rclone-test -v "${PWD}:/source" -v "${PWD}:/destination" -v "${PWD}/logs:/tmp/" -e SYNC_SRC="/source" -e SYNC_DEST="/destination" -e FORCE_SYNC=1 -e CHECK_URL="https://hc-ping.com/06de24bc-d02a-4167-8a1b-e5ab9f36da59" -e COMMAND="copy" -e CRON="* * * * *" docker-rclone:latest

Como resuelvo la automatizacion y el autodeploy en un VPS para desplegar mi media server:

  1. Primero deberia tener alguna forma de pasar un archivo a un servidor con lo basico de linux.

  2. Una opcion es usar wget que esta en todos los linux, y pegarle a una url predefinida estática. Esta url deberia contener un archivo .py que sea responsable de todo

  3. El archivo .py se debería encargar de: Instalar git si no existe (aunque podiramos ausmir que ya viene instalado).

  4. Luego de instalar git deberia hacer un pull del proyecto de media server (o de un proyecto pasado por parametro, como si fuese un startpoint).

  5. Una vez clonado el proyecto, deberia levantar el archivo siguiente de forma automatica. Podria estar en la carpeta "autostart".

  6. El siguiente archivo python deberia:

  7. Bajar docker y docker compose

@dantebarba
dantebarba / README.md
Created February 4, 2019 03:03 — forked from brunocascio/README.md
Conceptos de Normalización de Bases de datos
@dantebarba
dantebarba / instalar-eclipse-kepler.md
Last active August 9, 2018 16:09
Instalacion y configuracion: Eclipse Kepler

Autor: Dante Barba

Instalar Eclipse Kepler.

  • ¿Por que Eclipse Kepler?. Me parece el mas estable y agil de todos los que probé hasta ahora.
  • ¿Que problemas tiene?. Algunos problemas de compatibilidad menores.

  1. Descargamos Eclipse Kepler de: http://www.eclipse.org/downloads/packages/release/Kepler/SR2. Recomiendo la versión "Kepler for Java EE Developers".
  2. Descomprimimos el Eclipse en cualquier carpeta deseada para su uso.