Skip to content

Instantly share code, notes, and snippets.

View elamperti's full-sized avatar

Enrico Lamperti elamperti

View GitHub Profile
@elamperti
elamperti / feriados.js
Last active August 7, 2020 01:19
Feriados Argentina
/*
* Feriados Argentina
*
* Extrae los feriados de https://www.argentina.gob.ar/interior/feriados
* Trivialmente adaptable a scripts y/o buena referencia para otros lenguajes.
* Comentado en inglés porque empezó como parte de un proposal para la API de holidata.
*
* Si esto te ahorró unas horas de coding o te fue de ayuda dejá un comentario,
* pagame un café (?) o escribime un mail!
*
@elamperti
elamperti / mag2tor.sh
Last active January 17, 2021 20:15
Cron script to transform magnet links into .torrent files
#!/bin/bash
## Follow the guide:
## https://github.com/elamperti/dotfiles/blob/master/docs/sonarr-with-tixati.md
## Or see the magnet2torrent.py script here:
## https://github.com/elamperti/Magnet2Torrent
magnet_folder=$USER/.sonarr
if [ ! -d "${magnet_folder}" ]; then
@elamperti
elamperti / ddns-start.sh
Created April 3, 2017 05:20
Marlin's firmware DDNS update for Google Domains
#!/bin/sh
# (Copied from Marlin's examples)
# This script should be placed at /jffs/scripts/ddns-start
# chmod a+x ddns-start
# Finally set to custom in WAN -> DDNS.
# more info: https://github.com/RMerl/asuswrt-merlin/wiki/Custom-DDNS#google-domains
# Get the following login info from Google Domains' dashboard
U=???
#!/bin/bash
# AUTHOR: (c) Rob W 2012, modified by MHC (http://askubuntu.com/users/81372/mhc)
# NAME: GIFRecord 0.1
# DESCRIPTION: A script to record GIF screencasts.
# LICENSE: GNU GPL v3 (http://www.gnu.org/licenses/gpl.html)
# DEPENDENCIES: byzanz,gdialog,notify-send (install via sudo add-apt-repository ppa:fossfreedom/byzanz; sudo apt-get update && sudo apt-get install byzanz gdialog notify-osd)
# Time and date
TIME=$(date +"%Y-%m-%d_%H%M%S")
@elamperti
elamperti / gist:3111691
Created July 14, 2012 14:47
RegEx para teléfonos de Argentina
/(?<=\s|:)\(?(?:(0?[1-3]\d{1,2})\)?(?:\s|-)?)?((?:\d[\d-]{5}|15[\s\d-]{7})\d+)/