abidibo.net

Weblog

Set material-ui TextField value for testing purposes

material-ui react redux sinon testing

Recently I began my trip in the world of react and redux. Everyone is hot with these "new" technologies, and after my previous experiences with angular I decided to give it a try.

In this entry I just want to share a tip about how to set the value of a material-ui TextField for testing purposes.

Scenario

I have a simple login form, with username and password fields, and a submit button. When the submit button is clicked, a function ...

read the full post


Django debug with vim and vdebug

dbgp debug django python vim

I'm currently re-configuring all my vim stuff, operation which I perform every x months/years. I used to debug django application using pdb and its set_trace method, this time I decided to integrate a debugging tool inside vim as I always did for PHP using xdebug.

I decided (after some other attempts), to use vdebug, which (as described in the ...

read the full post


How I developed my first gnome-shell extension

gnome gnome-shell qaepq

Recently I installed qpaeq as a system wide mixer on my ubuntu 14.04 machine. Now I want a way to launch it from the status bar, so I began looking for a way to create a simple gnome-extension. Lucky me, the extensions are written in js, unfortunately the documentation is not so good.

A good starting point is this excellent post (a bit outdated, not all scripts presented work).

Let's proceed by steps.

Create a boilerplate project

We can ...

read the full post




How to get the best of your low end smartwatch

android smartwatch tasker u8

On April 1, 2015 I wrote an article about how to get the best of your U8 smartwatch, it turned out to be the most read content om my website, summing now more than 88k visits.

The article shows a way to enhance the U8 smartwatch capabilities with the help of Tasker, an app available on the google play store.

Even if my original article targeted the U8 smartwatch by U Watch, indeed the concepts and ideas fit well also ...

read the full post


Android development, fetch data from API and execute a callback

android java programming

I love first-class function programming languages (js and python for example), and I use to pass callbacks everywhere, especially when dealing with events or async tasks.

I'm a completely newbie with Java, but I started learning it because I decided time has come to develop android native applications. One of the first functionality I needed and I wanted to master is retrieving information (in json format, in my case) from some sort of API in order to display it in my application.

The equivalent in a modern js application would be making an ajax call to a server endpoint and process the data when fetched. This of course involves the use of callbacks, since data are fetched asynchronously and must ...

read the full post


U8 SmartWatch Voice Commands

android smartwatch tasker u8

Hi everybody!

It turns out that our astonishing watch can perform voice commands to the phone.
And that's good news! You can perform as Michael Knight and women will tear their air to be at your side.

I thought about this possibility long time ago' but foolishly I supposed that there was no way to stream my fucking voice from the watch to the phone (except during a phone call), now I've discovered I was wrong.

When the watch is ...

read the full post


Show google analytics statistics in django admin

django django-admin

In this post we'll see how to show google analytics statistics inside your admin index. If you use django-suit as your admin application then you could simply install django-otto-admin and follow the provided instructions to get it working.

Requirements

First of all we need to create a google developer project and a service account which will allow us to authenticate to the google analytics account.

Follow the steps in the Google Identity Platform documentation to create a service account from the Google Developer Console.

Once the service account is created, you can click the Generate New JSON Key button to create and download the key and add it to your project. Place the json file in a secure place, not ...

read the full post


Modal django forms with bootstrap 4

bootstrap django modals

Some time ago' I wrote an article about how to implement django forms with bootstrap 3 modals. It turned out to be a quite interesting theme since many people surfed and read that page. So now I'll refresh these concepts changing them a bit, in fact we'll see how to implement django forms with bootstrap 4-alpha modals.

Aperitif

Some preliminary stuff.

I'm almost bored with overwriting the model form class of my generic view in order to add bootstrap classes to form fields, so I'll use django-widget-tweaks. Let's install it:

(.virtualenv)$ pip install django-widget-tweaks 

Add widget_tweaks to your installed apps ...

read the full post


Your Smartwatch Loves Tasker!

Your Smartwatch Loves Tasker!

Now available for purchase!

Featured