Google Developers Live Italia: la libreria Dart Web UI

Published September 20, 2013

È online un nuovo episodio per Google Developers Live Italia, argomenti trattati: web_ui.dart, libreria che ci consente di utilizzare Model-driven Views (MDV) e Web Components in Dart. Il codice proposto è disponibile sull’account gdl-italia su github.

Un esempio di MDV:

Input

<html>
<body>
    <h1>{{ titolo }}</h1>
    <p>Hello {{ soggetto }}!</p>
    <p>L: {{ soggetto.length }}</p>
</body>
</html>
// codice Dart
String titolo = 'Esempio';
String soggetto = 'world';

Output

<html>
<body>
    <h1>Esempio</h1>
    <p>Hello world!</p>
    <p>L: 5</p>
</body>
</html>

Un esempio di Web Components:

Input

<html>
  <social-button network="facebook" username="myusername"></social-button>
  <social-button
    displayedname="Developers Italia"
    network="google+"
    username="117196874771284793338"></social-button>
</html>

Output

Screenshot

Questo episodio fa parte del programma GDL Italia che potete seguire sul blog ufficiale Developers Italia curato da +Alfredo Morresi.

  Read more

Google Developers Live Italia: Analisi di una applicazione in Dart

Published July 04, 2013

Note for non-italian readers: while this video is in Italian, discussed application — a dart implementation of tic-tac-toe — is written and commented in English, you find the source code at github. There’s a little demo around minute 4:20.

È online il secondo episodio di Google Developers Live Italia dedicato a Dart.
In questo episodio mostro l’analisi di una web application completa, OXO, una implementazione in Dart del gioco del Tris, focalizzando l’attenzione sui seguenti argomenti:

  • Manipolazione del DOM
  • Sviluppo di un server HTTP
  • Interazione server-client attraverso il protocollo WebSocket

Trovate il codice sorgente sull’account di GDL Italia su GitHub, mentre qui trovate le slides utilizzate per la presentazione.

Questo episodio fa parte del programma GDL Italia che potete seguire sul blog ufficiale Developers Italia curato da +Alfredo Morresi.

  Read more

Openbox and dual-monitor setup: placing popup dialogs

Published June 23, 2013

This post is primarly a note to self

Apparently, accordingly to the Openbox’ default configuration, in a dual-monitor setup, the primary monitor is the one on the left, and this leads to an annoying issue when you use as primary monitor the one on the right, as in my case: in fact, if the monitor on the left is off, you won’t be able to see dialogs popups, for instance the application switcher popup or the virtual desktop switcher.

  Read more

Blogging with Jekyll using Git, Github and Amazon AWS

Published June 21, 2013

I’ve been using Jekyll a lot lately, I’m totally in love with it, it’s a simple, fast and brilliant Ruby tool to generate static websites and blogs. Well, this post is not really about Jekyll per se, it’s more likely about the way I use it inside my ecosystem.
If you want to learn more about Jekyll, I think the official website is a good place to start from.

Ok, let’s talk about the way I use Jekyll: I build my website locally, then I push changes with git to my Amazon AWS instance and at the same time I keep a copy of the blog sources on Github available for consultation or forking. That’s it.

Just for completeness, Github itself has a great free hosting service for your site, Github Pages, that supports static sites and Jekyll blogs as well, but I’m already a (happy) AWS user so I decided to host my site there instead of Github Pages.

So this is the scenario, now let’s take a look at the workflow: I push changes both to AWS and Github, then a post-receive hook script on the server builds and publishes the Jekyll blog.

Screenshot

In order to obtain such workflow, we have to:

  1. Create a bare repository on the server
  2. Add a hook script to the bare repository
  3. Clone the repository locally
  4. Create a github repository
  5. Add github origin to the local repository
  6. Configure local repository in order to push changes to both AWS and github repositories

  Read more

How I shutdown my Raspberry Pi

Published May 01, 2013

I have a Raspberry Pi board and some days ago I decided to use it as a sort of print server at home, excited about the idea of being able to plug the RasPi’s power supply then turn the printer on and wirelessly send it documents from my laptop(s).
While getting ready to put my hands on it and set up the server, a problem showed up: once the print is done, I’d probably want to turn off the printer, turn off the RasPi and possibly unplug power supply; it’s a headless system, so I would connect over SSH and run the proper command to shutdown the RasPi, but what about my mother?

I mean, she’s clearly not a UNIX geek. Without a power button or a point-and-click graphical interface she wouldn’t be able to properly shutdown the RasPi, so she would probably unplug the power supply, and we all know how bad is this practice.

  Read more