This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class IntaWeather { | |
public $endPointUrl = 'http://siga2.inta.gov.ar/en/datoshistoricos/getDatosTabla'; | |
// Locations and fields scrapped from http://siga2.inta.gov.ar/en/datoshistoricos/ | |
public $locations = [ | |
'eea-reconquista-reconquista' => ['id' => 294, 'idP' => 55], | |
'eea-oliveros-villa-cañas' => ['id' => 299, 'idP' => 55], | |
]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo apt install postfix mailutils | |
# Choose host type 'No configuration' | |
$ sudo cp /usr/share/postfix/main.cf.debian /etc/postfix/main.cf | |
$ sudo vi /etc/postfix/main.cf | |
# Add lines below | |
smtp_sasl_auth_enable = yes | |
smtp_sasl_password_maps = static:apikey:paste_your_key_here | |
smtp_sasl_security_options = noanonymous |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
if [ -z "$1" ]; then | |
echo "Ingrese un CUIT" | |
exit 1 | |
fi | |
curl https://soa.afip.gob.ar/sr-padron/v2/persona/$1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Adapted from http://stackoverflow.com/a/4657776/641892 | |
file=$1 | |
subject=$2 | |
size=0 | |
offset=0 | |
recipients="foo@bar" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for file in `ls -1` | |
do | |
mv $file `echo $file | sed -e 's/_\([a-z]\)/\u\1/g' -e 's/^\([a-z]\)/\u\1/g' -` | |
done |