<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>TommyBlue.it</title>
    <link>https://tommyblue.it/</link>
    <description>Recent content on TommyBlue.it</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-us</language>
    <lastBuildDate>Sat, 22 Feb 2020 22:31:07 +0100</lastBuildDate><atom:link href="https://tommyblue.it/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>How to use a launch template in AWS Batch compute environment with custom user_data file</title>
      <link>https://tommyblue.it/2020/02/22/how-to-use-a-launch-template-in-aws-batch-compute-environment-with-custom-user_data-file/</link>
      <pubDate>Sat, 22 Feb 2020 22:31:07 +0100</pubDate>
      
      <guid>https://tommyblue.it/2020/02/22/how-to-use-a-launch-template-in-aws-batch-compute-environment-with-custom-user_data-file/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://aws.amazon.com/it/batch/&#34;&gt;AWS Batch&lt;/a&gt; is a service from AWS to run batch processes on custom compute environments.&lt;/p&gt;
&lt;p&gt;Among all the services I&amp;rsquo;ve used on AWS, Batch is, in my opinion, the most rough and less integrated with &lt;a href=&#34;https://www.terraform.io/&#34;&gt;Terraform&lt;/a&gt;. One example of how Batch isn&amp;rsquo;t the most shining service in the AWS world is the integration between the Batch compute environment and the EC2 launch template.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Complete backup of a SmugMug account</title>
      <link>https://tommyblue.it/2019/04/05/complete-backup-of-a-smugmug-account/</link>
      <pubDate>Fri, 05 Apr 2019 23:47:14 +0200</pubDate>
      
      <guid>https://tommyblue.it/2019/04/05/complete-backup-of-a-smugmug-account/</guid>
      <description>&lt;p&gt;I&amp;rsquo;m a happy customer of the &lt;a href=&#34;https://www.smugmug.com/&#34;&gt;SmugMug&lt;/a&gt; service where I store all my photos
(~50GB divided in ~120 galleries).&lt;/p&gt;
&lt;p&gt;I really love their interface, the mobile app, the website, etc. but they miss a very important
feature IMHO: &lt;strong&gt;it&amp;rsquo;s not possible to make a complete download of all the photos&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;That&amp;rsquo;s why I wrote a &lt;a href=&#34;https://github.com/tommyblue/smugmug-backup&#34;&gt;program&lt;/a&gt; that does it.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>How to add a JS frontend to an API-only Phoenix app</title>
      <link>https://tommyblue.it/2018/10/19/how-to-add-a-js-frontend-to-an-api-only-phoenix-app/</link>
      <pubDate>Fri, 19 Oct 2018 18:26:09 +0000</pubDate>
      
      <guid>https://tommyblue.it/2018/10/19/how-to-add-a-js-frontend-to-an-api-only-phoenix-app/</guid>
      <description>&lt;p&gt;If you generated a &lt;a href=&#34;https://phoenixframework.org/&#34;&gt;Phoenix&lt;/a&gt; app with the &lt;code&gt;--no-brunch&lt;/code&gt; option you probably needed an API backend app.&lt;/p&gt;
&lt;p&gt;What if, with your app growing, you realize you&amp;rsquo;d like to add also some frontend code?
This short how-to will show you how integrate a &lt;a href=&#34;https://webpack.js.org/&#34;&gt;Webpack&lt;/a&gt; based app with
support to &lt;a href=&#34;https://www.typescriptlang.org/&#34;&gt;Typescript&lt;/a&gt;, &lt;a href=&#34;https://reactjs.org/&#34;&gt;React&lt;/a&gt; and &lt;a href=&#34;https://sass-lang.com/&#34;&gt;Sass&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>API Authentication with Phoenix and React - part 2</title>
      <link>https://tommyblue.it/2018/03/31/api-authentication-with-phoenix-and-react-part-2/</link>
      <pubDate>Sat, 31 Mar 2018 19:34:35 +0000</pubDate>
      
      <guid>https://tommyblue.it/2018/03/31/api-authentication-with-phoenix-and-react-part-2/</guid>
      <description>In the first part of this post I&amp;rsquo;ve shown how to configure the API server to let the user authenticate, return an authentication token, and request it to access protected routes. Now I&amp;rsquo;m going to configure a React app to consume that API and manage authentication.
The app uses React Router to manage routes and Redux for the state of the app.
Protect private routes I&amp;rsquo;m going to define a PrivateRoute component as a wrapper around Route.</description>
    </item>
    
    <item>
      <title>API Authentication with Phoenix and React - part 1</title>
      <link>https://tommyblue.it/2018/03/28/api-authentication-with-phoenix-and-react-part-1/</link>
      <pubDate>Wed, 28 Mar 2018 20:08:09 +0000</pubDate>
      
      <guid>https://tommyblue.it/2018/03/28/api-authentication-with-phoenix-and-react-part-1/</guid>
      <description>Scenario: you just wrote a cool web app using React for the frontend part and Phoenix as the API server. Then you realize everybody can poke around your stuff and you decide it’s time to restrict the access to known users, how to do it?
I’ll configure a Phoenix server to manage access tokens, used by a React app to make authenticated calls.
This blog post only deals with the backend part and consists of these steps:</description>
    </item>
    
    <item>
      <title>React&#43;Sass&#43;Typescript with Phoenix framework using Webpack</title>
      <link>https://tommyblue.it/2017/09/05/react-sass-typescript-with-phoenix-framework-using-webpack/</link>
      <pubDate>Tue, 05 Sep 2017 19:37:00 +0000</pubDate>
      
      <guid>https://tommyblue.it/2017/09/05/react-sass-typescript-with-phoenix-framework-using-webpack/</guid>
      <description>If you’re playing with Elixir and Phoenix you’ll probably already know that Phoenix uses Brunch.io to build the assets pipeline. I initially started building my app with React / Redux + SASS and I was quite happy, but when I decided to add Typescript to the recipe, I found Brunch.io wasn’t very helpful!
I’ve already used these tools using Webpack as building tool, so I decided to switch to it. I had a working Webpack configuration I was using in other projects, so I only had to find out how to apply it to Phoenix.</description>
    </item>
    
    <item>
      <title>How to logrotate rails logs</title>
      <link>https://tommyblue.it/2014/04/11/how-to-logrotate-rails-logs/</link>
      <pubDate>Fri, 11 Apr 2014 06:59:27 +0000</pubDate>
      
      <guid>https://tommyblue.it/2014/04/11/how-to-logrotate-rails-logs/</guid>
      <description>If you deploy a rails app forgetting to configure logs automatic rotation, few weeks later won&amp;rsquo;t be difficult to find something like this:
$ ls -lh log/production.log -rw-rw-r-- 1 www-data www-data 93,2M apr 10 17:49 production.log Think if you have to find some error log inside a 100MB file, not easy&amp;hellip; :)
Setting log rotation isn&amp;rsquo;t difficult at all. I know two main ways.
Use syslog This is a really easy solution.</description>
    </item>
    
    <item>
      <title>Generate the sitemap of a Ghost blog during deploy</title>
      <link>https://tommyblue.it/2014/04/02/generate-the-sitemap-of-a-ghost-blog-during-deploy/</link>
      <pubDate>Wed, 02 Apr 2014 07:53:27 +0000</pubDate>
      
      <guid>https://tommyblue.it/2014/04/02/generate-the-sitemap-of-a-ghost-blog-during-deploy/</guid>
      <description>Waiting for a sitemap generator inside the core of Ghost (planned as &amp;ldquo;future implementation&amp;rdquo;) I decided to implement a way to generate an up-to-date sitemap.xml during deployment. As you can read in the previous post I&amp;rsquo;m deploying this blog with Capistrano and capistrano-node-deploy. So I added a deploy:generate_sitemap task which is executed at the end of the deployment process.
This is the Capfile extract:
namespace :deploy do task :generate_sitemap do run &amp;#34;cd #{latest_release}&amp;amp;&amp;amp; .</description>
    </item>
    
    <item>
      <title>Git: Content-addressable filesystem and Version Control System</title>
      <link>https://tommyblue.it/2013/11/29/git-content-addressable-filesystem-and-version-control-system/</link>
      <pubDate>Fri, 29 Nov 2013 10:03:40 +0000</pubDate>
      
      <guid>https://tommyblue.it/2013/11/29/git-content-addressable-filesystem-and-version-control-system/</guid>
      <description>  GIT: Content-addressable filesystem and Version Control System  from Tommaso Visconti  </description>
    </item>
    
    <item>
      <title>Paypal Express Checkout with Ruby on Rails and paypal-sdk-merchant</title>
      <link>https://tommyblue.it/2013/07/02/paypal-express-checkout-with-ruby-on-rails-and-paypal-sdk-merchant/</link>
      <pubDate>Tue, 02 Jul 2013 20:12:19 +0000</pubDate>
      
      <guid>https://tommyblue.it/2013/07/02/paypal-express-checkout-with-ruby-on-rails-and-paypal-sdk-merchant/</guid>
      <description>In my last work, Agrimè.it, an ecommerce built using Ruby on rails, I had to implement the cart payment using Paypal Express Checkout.
Sadly, I found that was the worst time to do it, because Paypal was migrating the classic API to the new REST API and the documentation was a real mess! Walking through the doc links, I jumped (without a particular logic) from the new to the old API reference and vice versa.</description>
    </item>
    
    <item>
      <title>Passare a Vim grazie ad Emacs</title>
      <link>https://tommyblue.it/2012/09/01/passare-a-vim-grazie-ad-emacs/</link>
      <pubDate>Sat, 01 Sep 2012 17:38:51 +0000</pubDate>
      
      <guid>https://tommyblue.it/2012/09/01/passare-a-vim-grazie-ad-emacs/</guid>
      <description>Grazie Sciamp per avermi convinto a passare a Vim parlandomi di Emacs :)
Lo so, sembra uno scherzo, eppure è proprio vero! Era da tanto che volevo cambiare editor passando da Textmate a qualcos&amp;rsquo;altro, ho intravisto Sublime Text 2, ma volevo qualcosa di open source. Da un po&#39; di tempo Alessandro stava rompendo le scatole a tutti su quanto è figo Emacs :) e avevo iniziato a lavorarci un po&#39;, ma non sono mai riuscito ad entrarci in sintonia.</description>
    </item>
    
    <item>
      <title>Create a contact form for Jekyll</title>
      <link>https://tommyblue.it/2012/08/28/create-a-contact-form-for-jekyll/</link>
      <pubDate>Tue, 28 Aug 2012 10:49:43 +0000</pubDate>
      
      <guid>https://tommyblue.it/2012/08/28/create-a-contact-form-for-jekyll/</guid>
      <description>As I promised to a reader who wrote me an email some days ago, with this post I&amp;rsquo;ll explain how I built the contact form of this website using Sinatra and Sendgrid. As you know (or you&amp;rsquo;re just learning) this site is made by Jekyll, a static site generator written in Ruby. As the result of the work of Jekyll it is a static HTML website, so it&amp;rsquo;s not immediate to build a contact form.</description>
    </item>
    
    <item>
      <title>Rubyfatt 1.0 - software di fatturazione per partite IVA</title>
      <link>https://tommyblue.it/2012/08/23/rubyfatt-1.0-software-di-fatturazione-per-partite-iva/</link>
      <pubDate>Thu, 23 Aug 2012 08:29:40 +0000</pubDate>
      
      <guid>https://tommyblue.it/2012/08/23/rubyfatt-1.0-software-di-fatturazione-per-partite-iva/</guid>
      <description>Approfittando della pausa estiva sono riuscito a lavorare un po&#39; su Rubyfatt, il software che mi sono scritto per la gestione della mia partita IVA.
Senza dilungarmi troppo, dalla versione 1.0 il software è ormai maturo e può essere usato senza problemi (spero). Vi rimando alla pagina ufficiale all&#39;indirizzo: http://rubyfatt.kreations.it in cu si trova la lista di tutte le caratteristiche e le istruzioni per installarlo.
Ovviamente ogni aiuto è ben accetto, trovate tutto sulla pagina di Github del progetto</description>
    </item>
    
    <item>
      <title>Monitoraggio distribuito con Nagios/Icinga e NSCA</title>
      <link>https://tommyblue.it/2012/06/13/monitoraggio-distribuito-con-nagios/icinga-e-nsca/</link>
      <pubDate>Wed, 13 Jun 2012 11:30:15 +0000</pubDate>
      
      <guid>https://tommyblue.it/2012/06/13/monitoraggio-distribuito-con-nagios/icinga-e-nsca/</guid>
      <description>Sebbene Icinga/Nagios e NRPE siano un&amp;rsquo;ottima coppia per monitorare le macchine (sia via socket che internamente), a volte possono non bastare. Potrebbe infatti essere utile distribuire i check su più macchine, sia per un fattore di carico sia per aggirare eventuali firewall.
Partendo quindi da una macchina con un server Icinga o Nagios funzionante, come descritto qui, mostrerò come configurare un secondo server remoto che comunica via NSCA il risultato dei check al server principale.</description>
    </item>
    
    <item>
      <title>Sostituire un disco in un raid software</title>
      <link>https://tommyblue.it/2012/04/26/sostituire-un-disco-in-un-raid-software/</link>
      <pubDate>Thu, 26 Apr 2012 11:47:30 +0000</pubDate>
      
      <guid>https://tommyblue.it/2012/04/26/sostituire-un-disco-in-un-raid-software/</guid>
      <description>Ho recentemente scoperto un&amp;rsquo;interessante opzione di sfdisk che risolve molti problemi quando si deve sostituire un disco di un raid software. Integro quindi l&amp;rsquo;articolo originale segnlando questa opzione, da usare nel caso in cui al comando:
sfdisk -d /dev/sda | sfdisk /dev/sdb  sfdisk si rifiuti di partizionare correttamente /dev/sdb a causa di problemi con i cilindri. Dato che Linux è molto meno schizzinoso del DOS, esiste un&amp;rsquo;opzione per ignorare problemi che con Linux, appunto, non sono tali:</description>
    </item>
    
    <item>
      <title>Bind Log Analyzer: Simple analysis and SQL storage for Bind logs</title>
      <link>https://tommyblue.it/2012/04/03/bind-log-analyzer-simple-analysis-and-sql-storage-for-bind-logs/</link>
      <pubDate>Tue, 03 Apr 2012 13:34:43 +0000</pubDate>
      
      <guid>https://tommyblue.it/2012/04/03/bind-log-analyzer-simple-analysis-and-sql-storage-for-bind-logs/</guid>
      <description>Bind Log Analyzer is my first gem :)
It analyzes a Bind query log file and stores the logs into a database (using ActiveRecord). See the details and the source code on GitHub and get the gem on RubyGems. Or simply install it with:
gem install bind_log_analyzer  Starting from version 0.2.1 it includes a simple Sinatra webserver to show some reports and (soon) some cool graphs.</description>
    </item>
    
    <item>
      <title>Accesso SSH inverso</title>
      <link>https://tommyblue.it/2011/11/10/accesso-ssh-inverso/</link>
      <pubDate>Thu, 10 Nov 2011 10:09:40 +0000</pubDate>
      
      <guid>https://tommyblue.it/2011/11/10/accesso-ssh-inverso/</guid>
      <description>Può tornare utile accedere via SSH ad un pc/server non pubblico. Capita ad esempio quando un cliente disperato sta provando a mettere le mani sul server impallato e tu stai cercando di dettargli i comandi al telefono (generalmente con pessimi risultati).
Quindi basta avere un server SSH a cui il cliente possa arrivare con un utente da utilizzare. Supponendo che il server da raggiungere sia ssh-server.test.com e l&amp;rsquo;utente test, basta che digiti il comando:</description>
    </item>
    
    <item>
      <title>IPv6 in pochi passi con ALIX e SixXS</title>
      <link>https://tommyblue.it/2011/08/03/ipv6-in-pochi-passi-con-alix-e-sixxs/</link>
      <pubDate>Wed, 03 Aug 2011 12:41:51 +0000</pubDate>
      
      <guid>https://tommyblue.it/2011/08/03/ipv6-in-pochi-passi-con-alix-e-sixxs/</guid>
      <description>Come ormai saprete (1 - 2) ho un debole per gli embedded ALIX di PcEngines. In questo caso userò una scheda 2d13 con RTC, indispensabileÂ perchéÂ se il vostro orologio non è sincronizzato con quello del broker IPv4-IPv6 (Â±30 secondi) non avrete la connessione IPv6!
Come da tradizione il sistema operativo è Debian Voyage, ma tutta la procedura può comunque essere applicata ad una qualsiasi macchina con installato un os Debian-based (a meno di qualche piccola modifica).</description>
    </item>
    
    <item>
      <title>Realizzare un sistema di monitoraggio con Icinga</title>
      <link>https://tommyblue.it/2011/03/08/realizzare-un-sistema-di-monitoraggio-con-icinga/</link>
      <pubDate>Tue, 08 Mar 2011 15:45:38 +0000</pubDate>
      
      <guid>https://tommyblue.it/2011/03/08/realizzare-un-sistema-di-monitoraggio-con-icinga/</guid>
      <description>In questa breve guida spiegherò come installare Icinga (un fork di Nagios che ha ormai superato il genitore) e Icinga Web su Ubuntu 10.04 server.
Molti passi sono uguali a quelli che ho già descritto nelle due guide sull&amp;rsquo;installazione di Nagios (1 e 2).
Operazioni preliminari Installare i pacchetti necessari: apt-get install apache2 bsd-mailx build-essential libgd2-xpm-dev libjpeg62 libjpeg62-dev libpng12-0 libpng12-0-dev snmp libsnmp-base git-core mysql-server mysql-client libdbi0 libdbi0-dev libdbd-mysql Aggiungere utenti e gruppi: addgroup --system icinga adduser --system --no-create-home --home /usr/local/icinga --ingroup icinga --disabled-password icinga addgroup --system icinga-cmd usermod -a -G icinga-cmd icinga usermod -a -G icinga-cmd www-data Creare il database:  #&amp;gt; mysql -u root -p mysql&amp;gt; CREATE DATABASE icinga; GRANT USAGE ON *.</description>
    </item>
    
    <item>
      <title>Sostituire un disco in un Raid 1 con mdadm</title>
      <link>https://tommyblue.it/2010/09/28/sostituire-un-disco-in-un-raid-1-con-mdadm/</link>
      <pubDate>Tue, 28 Sep 2010 12:16:31 +0000</pubDate>
      
      <guid>https://tommyblue.it/2010/09/28/sostituire-un-disco-in-un-raid-1-con-mdadm/</guid>
      <description>Lo devo fare da anni, finalmente prendo appunti per una cosa che mi capita di fare almeno un paio di volte l&amp;rsquo;anno e che, puntualmente, mi scordo come si fa :-)
Il punto è questo: sostituire un disco in un array Raid 1 quando si rompe. Riporto gli appunti presi qualche anno fa sulla wiki del LILiK.
La situazione di un raid 1 con un disco rotto è più o meno questa:</description>
    </item>
    
    <item>
      <title>DNS e Postfix: come non generare &#34;spam&#34;</title>
      <link>https://tommyblue.it/2010/01/18/dns-e-postfix-come-non-generare-spam/</link>
      <pubDate>Mon, 18 Jan 2010 00:02:50 +0000</pubDate>
      
      <guid>https://tommyblue.it/2010/01/18/dns-e-postfix-come-non-generare-spam/</guid>
      <description>&lt;p&gt;&lt;strong&gt;Edit (29/01/2010): Aggiunte una correzione per far funzionare la firma DKIM su server di relay&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Ho recentemente configurato alcuni server per l&amp;rsquo;invio di email. Parte del lavoro ha riguardato la corretta configurazione di Postfix e del server DNS per evitare che le email inviate venissero rilevate come spam.
&lt;em&gt;In una diversa guida spiegherò come ottimizzare la configurazione di Postfix per grandi quantità  di email (â‰¥1.000.000/mese). Dato che già  in molti me lo hanno chiesto: no, non si tratta di server per l&amp;rsquo;invio di spam, ma server per il &lt;a href=&#34;http://en.wikipedia.org/wiki/E-mail_marketing&#34; target=&#34;_blank&#34;&gt;mail marketing&lt;/a&gt; (quando il servizio sarà  pubblico potrò tranquillamente rivelarne il nome).
&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;La configurazione ha riguardato &lt;strong&gt;tre punti principali&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Impostazione del record AÂ e del reverse address&lt;/li&gt;
	&lt;li&gt;Impostazione di SPF&lt;/li&gt;
	&lt;li&gt;Configurazione di DKIM e DomainKeys&lt;/li&gt;
&lt;/ul&gt;</description>
    </item>
    
    <item>
      <title>Attivare un array raid software esistente con mdadm</title>
      <link>https://tommyblue.it/2009/09/09/attivare-un-array-raid-software-esistente-con-mdadm/</link>
      <pubDate>Wed, 09 Sep 2009 05:53:20 +0000</pubDate>
      
      <guid>https://tommyblue.it/2009/09/09/attivare-un-array-raid-software-esistente-con-mdadm/</guid>
      <description>Può capitare, ad esempio se si avvia con una live un sistema con dischi in raid software con mdadm, che si debba attivare il raid esistente. Un tipico esempio può essere il dover recuperare dati da dischi estratti da un computer non più avviabile.
Se si avesse a disposizione il file di configurazione di mdadm /etc/mdadm.conf, attivare un array specifico consisterebbe in:
# mdadm -As /dev/md0 Con l&amp;rsquo;opzione -s (&amp;ndash;scan) la configurazione viene letta dal file.</description>
    </item>
    
    <item>
      <title>Convertire il filesystem della partizione root</title>
      <link>https://tommyblue.it/2009/03/19/convertire-il-filesystem-della-partizione-root/</link>
      <pubDate>Thu, 19 Mar 2009 09:05:06 +0000</pubDate>
      
      <guid>https://tommyblue.it/2009/03/19/convertire-il-filesystem-della-partizione-root/</guid>
      <description>Ovvero come installare Fedora 10 da cd utilizzando XFS come filesystem per la root (/) :)
Nota: avrete bisogno di due partizioni di almeno 4/5 GB
L&amp;rsquo;uso di XFS è molto utile specialmente se utilizzato in coppia con LVM (in particolare per espandere le partizioni &amp;ldquo;al volo&amp;rdquo;), cosa che spiegherò di seguito. I passi sono molto semplici:
 Avviate dal cd di Fedora 10 Installate normalmente Fedora utilizzando una partizione LVM di almenoÂ 5.</description>
    </item>
    
  </channel>
</rss>
