Free ranting about iPhone6

Here's a few things about Apple iPhone6 that have been bugging me lately:

1 - I was asked to delete all the photos from an iPhone6... I was hoping it was going to be a matter of connecting the phone to my laptop (MBP), click here, click there, select all, delete and you're done... Well, apparently, it is easier to put a rocket in Mars than deleting all the freaking photos from an iPhone6. Shame on you Apple... you made my life miserable for 1 hour (I had to delete all the photos from the phone itself.... 5467 photos!)

2 - Playing around with the same phone, I pressed the home button (btw, who can live with only one button?? for everything!! are you crazy?) for long enough to invoke Siri, with the phone locked... And she answered to me!!! Let me repeat it.. I long-pressed the home button, I asked Siri to "call mum" (not my mum obviously because it wasn't my phone) from another person locked phone... I would say it is a huge security flaw to allow anyone to make calls that way. Shame on you Apple, again.

\\psgonza

PS1: I am not an Android/Google fanboy... I own a MBP and I cannot complain, it just works.

PS2: Probably these two things I mentioned are not new if you are an iPhone user, which I am not...

PS3: Ranting is free :P

My books in 2015

Goodreads is a great social media platform for reading lovers... It allows you to discover new books, keep track of your reading (it is even integrated with Amazon Kidle) or recommend books to your friends... If reading is one of your hibbies, you should check it out.

It's far from impressive I know (some of my friends are able to read more than 40 books in a year.. don't ask me how) but, despite Netflix, I managed to read 14 books (and I have another two books "in progess"):

{% img center /img/goodreads2015.jpg 'goodreads' %}

My recommendations:

1) The martian

2) I am pilgrim

3) Ready player one

Happy reading...

\psgonza

Bye 2015 && Hello 2016

Again, it is time to say goodbye to another year... This time to 2015:

Japan:

{% img center /img/2015japan.jpg 'japan' %}

China:

{% img center /img/2015china.jpg 'china' %}

Maldives.. By air, land and sea:

{% img center /img/2015maldives.jpg 'maldives' %}

London:

{% img center /img/2015london.jpg 'london' %}

(50% business/50% leisure)

Happy New Year 2016!!!

\psgonza

Mail notification system in 2 minutes

Quick post... In case you'd like to set up a quick mail notification system for your linux machines, keep reading, otherwise, have a merry Xmas...

I'd like to receive a notification everytime there is a sucessfull ssh login in my VPS, and swatch + ssmtp make it possible very easily... The idea is to receive a notification in my email every time there is a line in /var/log/auth.log containing the strings "sshd" and "Accepted password". ie:

Dec 24 12:42:06 bynario sshd[3258]: Accepted password for myuser from 95.11.176.11 port 31738 ssh2

NOTE: Using your gmail account might give you some troubles... I decided to use a different one.

  • Install the sw:
sudo apt-get install ssmtp swatch
  • Make sure no one else can read your email password:
sudo chown root:mail /etc/ssmtp/ssmtp.conf
sudo chmod 640 /etc/ssmtp/ssmtp.conf
sudo usermod -a -G mail myuser

(myuser is the name of my local user)

  • Create /etc/swatch.conf and add the pattern and action:
watchfor /sshd.*Accepted password/
    exec echo "Subject:Bynario.com SSHD accepted password\n\n$_\n" | /usr/sbin/ssmtp <your_email>

what does it do? It will be tailing the auth.log file looking for any string matching "sshd.*Accepted password" and in case it finds something, it will send an email to with the subject "Bynario.com SSHD accepted password" and the line matching the filter in the email body.

  • Let's define the email account... Edit /etc/ssmtp/ssmtp.conf:
root=<your_email>

UseTLS=YES
UseSTARTTLS=YES
AuthMethod=LOGIN

mailhub=<your_snmp_server.com>:587
hostname=<your_server.com>

AuthUser=<your_email>
AuthPass=<your_password>

FromLineOverride=YES

(The TSL options will depend on your email provider)

  • Edit /etc/ssmtp/revaliases:
root:<your_email>:<your_snmp_server.com>:587
myuser:<your_email>:<your_snmp_server.com>:587
  • And finally, start swatch:
sudo swatch --config-file=/etc/swatch.conf --tail-file=/var/log/auth.log --tail-args=--follow=name --daemon

It would be a good idea to create an rc script or add that line to /etc/rc.local, so it is automatically started if the system is rebooted:

bynario:~$ cat /etc/rc.local
/usr/bin/swatch --config-file=/etc/swatch.conf --tail-file=/var/log/auth.log --tail-args=--follow=name --daemon
exit 0

And that's it... You should have an email in your account every time there is a new ssh connection... pretty handy.

\psgonza

2015 The year of the podcasts

Well, I know I might be terribly late on this, but for me, 2015 has been the year I have (re)discovered the podcasts...

According to Wikipedia podcasts are around 10 years old, but I never really put too much attention into them until this year. I have been an avid user of RSS feeds since long time ago, so I never really had the need of listening to other people's opinions when you can read a blog post about it (way faster than listening).

But, as it happens to almost everybody, I reached a point in life where I don't have time to spare in reading +100 post every day... Adulthood sucks, I guess (and I don't have family responsabilities, I cannot imagine how people survive to parenting.)

Earlier this year I was in a business trip in Tokyo when spring came, and with the nice weather I started to take long walks (one of the best ways to disconnect from work and with a lof of health benefits according to some studies).

First I tried to take my Amazon kindle with me, but it slows you down and you end up walking really slowly. Then I tried with audiobooks, not a bad solution at all, but not cheap (more expensive than kindle books for sure), and I'd rather read at the same time I enjoy a cup of coffee...

So not sure why, podcasts came back to my mind... I had already listen some of them in my laptop every now and then, but never really bothered to use my Android phone as a media player. And they were exactly what I was after:

1 - They are not a replacement for the blog post, but it might be the closest thing.

2 - You can listen to them while you walk/run/conmute/whatever.

3 - They are really cheap (some of them have sponsors or ask you for donation).

4 - There are several nice Android apps that handle the subscrition for you.

The number of available podcast is incredible. In my case I am mostly interested in technology, but I am sure that, on any given topic you are insterested in, there are several podcasts out there waiting for you (speaking english makes it easier of course).

This is my current Podcast Addict subscription list:

Give them a try, because some of them are really really good.

\pgonza