Spideroak

I've been using a new backup solution, SpiderOak. SpiderOak is a Zero-knowledge solution, that means 100% of the data is private and only readable by you, ensuring confidentiality of your data. With SpiderOak ONE, your files are encrypted long before they cross the internet to our servers. We only store your encrypted data in generalized blocks which means only you can unlock your backup, ever. It has a GNU/Linux client among others, and they are working on an Android
- Spideroak

Read more

Clean Code, functions

I am reading Clean Code: A Handbook of Agile Software Craftmanship. Here my highlights from the Functions chapter. The way every developer with experience should read this book is like you know nothing, a blank canvas, draw your picture from there. Having less than two arguments is always preferable. There are two very common reasons to pass a single argument into a function. You may be asking a question about that argument, as in boolean fileExists(“MyFile”). Or you may
- Clean Code, functions

Read more

ExtendedArray for PHP

Today I released an ExtendedArray for PHP, you can check It out in Github. An example: use TA\ExtendedArray\Type\ExtendedArray; $fruits = new ExtendedArray( array( 'tropical' => 'pineapple', 'farm' => 'strawberry' ) ); $fruits->has('tropical'); // true $fruits->hasOne(array('tropical', 'asian')); // true $fruits->hasAll(array('tropical', 'asian')); // false $fruits->get('canary', 'banana'); // 'banana' $fruits->get('tropical', 'banana'); // 'pineapple' $fruits->getSubArray(array('tropical')); // array('tropical' => 'pineapple'); $fruits->toArray(); // array('tropical' => 'pineapple', 'farm' => 'strawberry'); You can access the keys as an object or as an
- ExtendedArray for PHP

Read more

Supervisor groups in Stouts.supervisor for Ansible

This week I made a pull request to support groups in Stouts.supervisor. It was simple, I refactored the code a bit to use a Jinja macro to build the sections, since the configuration structure in the sections is all the same. {% macro set_section(section_label, sections) %} {% for section in sections %} [{{ section_label }}:{{ section.name }}] {% for option, value in section.items() %} {% if option != 'name' %} {{ option }} = {{ value }} {% endif %} {% endfor %} {% endfor %} {% endmacro %} ... {{ set_section('program', supervisor_tasks) }} ... {{ set_section('group', supervisor_
- Supervisor groups in Stouts.supervisor for Ansible

Read more

javaguirre.ghost, my first Ansible role

Yesterday I created my first Ansible role, a role to manage, configure and install Ghost, the blogging platform. Why? Because I checked the others and they weren't atomic, I wanted a role managing only Ghost, not the database, installing node, or configuring NGINX all in one. You can install it this way. > ansible-galaxy install javaguirre.ghost I prefer to use roles doing only one thing right, because It's easier to configure, to replace and maintain and If I have
- javaguirre.ghost, my first Ansible role

Read more

Ansible and the Galaxy, roles

According to their site, Ansible is a radically simple IT automation engine that automates cloud provisioning, configuration management, application deployment, intra-service orchestration, and many other IT needs. If you want to know how to start with Ansible here's a good tutorial, you could also start in their official documentation. If you don't know anything about Ansible, please follow the previous links, this post is a bit more advanced. Two weekends ago I read the preview of the new Ansible book
- Ansible and the Galaxy, roles

Read more

Auth with Behat token workaround

Behat is a very nice behaviour-driven framework well suited for Symfony. A workaround is always some hack you need to solve a problem not in an optimal way, but in my case I found it good enough to solve my problem in a timely fashion. This is about user authentication for Behat and how you could do It. /** * @Given /^I am logged in as "([^"]*)"$/ */ public function loggedIn($email) { // Find a user $user = $this->myservice->find( 'User', array('email' => $email) ); if
- Auth with Behat token workaround

Read more

Chromecast, first steps

A friend of mine gave me a Chromecast for my birthday, and I gotta say I found it very nice and full of possibilities. Plenty of Android apps are prepared for streaming to chromecast and there are a few games that proves the potential of the platform too. I've used the apps from rtve and atresplayer with success (spanish tv), and I am able to stream my own videos with a great quality with videostream (I have the premium account)
- Chromecast, first steps

Read more

i3, the tiling window manager

This year I've been in a journey to be more comfortable with my window manager/desktop, dwm served me well for a long time, but I needed more flexibility and ease of configuration. My journey came to an end for now, with i3, a tiling window manager with a very good documentation and very similar to dwm functionality-wise. For the status bar I am using py3status, which is a Python library for i3 that works. The code could be better,
- i3, the tiling window manager

Read more

Using Cyberghost VPN on ArchLinux

Last week I started using a VPN, You can read in this lifehacker article on why you could use one. I started using it for two reasons: Ciphered and tunneled communications Geolocated video For me It's more a matter of security and freedom too, the other reasons are secondary. I use Cyberghost, but you can see in this extense article which one to choose if you're interested. I chose Cyberghost because they are in Europe (Romania), because they don't keep
- Using Cyberghost VPN on ArchLinux

Read more